Copied the 1.0.0 release to 'tags'.
git-svn-id: https://svn.apache.org/repos/asf/directory/studio/tags/1.0.0@706603 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..946e8d9
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,566 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<project default="bundle">
+ <property name="target" value="${basedir}/target" />
+ <property name="target.build" value="${target}/ApacheDirectoryStudio" />
+ <property name="target.userguides" value="${target}/userguides" />
+
+ <!-- Setting up OS Name-->
+ <condition property="studio-rcp.os.name" value="macosx" >
+ <os name="Mac OS X"/>
+ </condition>
+ <condition property="studio-rcp.os.name" value="linux" >
+ <os family="unix" />
+ </condition>
+ <condition property="studio-rcp.os.name" value="win32">
+ <os family="windows" />
+ </condition>
+
+ <!-- Setting up OS Extension-->
+ <condition property="studio-rcp.os.extension" value=".app" >
+ <equals arg1="${studio-rcp.os.name}" arg2="macosx"/>
+ </condition>
+ <condition property="studio-rcp.os.extension" value="" >
+ <equals arg1="${studio-rcp.os.name}" arg2="linux"/>
+ </condition>
+ <condition property="studio-rcp.os.extension" value=".exe">
+ <equals arg1="${studio-rcp.os.name}" arg2="win32"/>
+ </condition>
+
+ <!-- Setting up a special property if target OS is Mac OS X-->
+ <condition property="isTargetMacOSX" value="true" >
+ <equals arg1="${studio-rcp.os.name}" arg2="macosx"/>
+ </condition>
+
+ <!-- HELP TASK -->
+ <target name="help" description="Shows help">
+ <echo>Available commands:</echo>
+ <echo> bundle - Generate and bundles a complete version of Apache Directory Studio</echo>
+ <echo> When bundling you can specify the target operating system using this option:</echo>
+ <echo> o -Dstudio-rcp.os.name=macosx for Mac OS X</echo>
+ <echo> o -Dstudio-rcp.os.name=linux for Linux</echo>
+ <echo> o -Dstudio-rcp.os.name=win32 for Windows</echo>
+ <echo> and the target architecture using this option:</echo>
+ <echo> o -Dstudio-rcp.os.arch=i386 for i386 architecture (Linux and Mac OS X)</echo>
+ <echo> o -Dstudio-rcp.os.arch=x86 for x86 architecture (Windows only)</echo>
+ <echo> o -Dstudio-rcp.os.arch=ppc for PowerPC architecture</echo>
+ <echo> o -Dstudio-rcp.os.arch=amd64 for AMD64 architecture</echo>
+ <echo> clean - Delete any generated file (javadoc, classes, jars, distribution)</echo>
+ <echo> javadoc - Generate Javadoc files</echo>
+ <echo> userguides - Generate HTML and PDF user guides</echo>
+ <echo> resolve - Resolves the library dependencies using Ivy</echo>
+ </target>
+
+ <!-- BUNDLE TASK -->
+ <target name="bundle" description="Bundles the complete application">
+ <condition property="application.plugins" value="${target.build}/Apache Directory Studio.app/Contents/Resources/Java/plugins" >
+ <equals arg1="${studio-rcp.os.name}" arg2="macosx"/>
+ </condition>
+ <condition property="application.plugins" value="${target.build}/plugins" >
+ <or>
+ <equals arg1="${studio-rcp.os.name}" arg2="linux"/>
+ <equals arg1="${studio-rcp.os.name}" arg2="win32"/>
+ </or>
+ </condition>
+ <condition property="application.features" value="${target.build}/Apache Directory Studio.app/Contents/Resources/Java/features" >
+ <equals arg1="${studio-rcp.os.name}" arg2="macosx"/>
+ </condition>
+ <condition property="application.features" value="${target.build}/features" >
+ <or>
+ <equals arg1="${studio-rcp.os.name}" arg2="linux"/>
+ <equals arg1="${studio-rcp.os.name}" arg2="win32"/>
+ </or>
+ </condition>
+
+ <!-- Creation of the build folder -->
+ <mkdir dir="${target.build}" />
+
+ <!-- Creation of the Apache Directory Studio RCP application -->
+ <ant dir="studio-rcp" inheritAll="no" />
+ <!-- Copy of the RCP app -->
+ <copy todir="${target.build}">
+ <fileset dir="studio-rcp/target/ApacheDirectoryStudio">
+ <include name="**" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Apache Directory Studio RCP Help application -->
+ <ant dir="studio-rcp-help" inheritAll="no" />
+ <!-- Copy of the Apache Directory Studio RCP Help Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-rcp-help/target/">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Schemas Editor Plugin -->
+ <ant dir="studio-schemaeditor" inheritAll="no" />
+ <!-- Copy of the Schemas Editor Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-schemaeditor/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Schemas Editor Help Plugin -->
+ <ant dir="studio-schemaeditor-help" inheritAll="no" />
+ <!-- Copy of the Schemas Editor Help Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-schemaeditor-help/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Connection Core Plugin -->
+ <ant dir="studio-connection-core" inheritAll="no" />
+ <!-- Copy of the Connection Core Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-connection-core/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Connection UI Plugin -->
+ <ant dir="studio-connection-ui" inheritAll="no" />
+ <!-- Copy of the Connection UI Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-connection-ui/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Browser Core Plugin -->
+ <ant dir="studio-ldapbrowser-core" inheritAll="no" />
+ <!-- Copy of the Browser Core Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-ldapbrowser-core/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Browser Common Plugin -->
+ <ant dir="studio-ldapbrowser-common" inheritAll="no" />
+ <!-- Copy of the Browser Common Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-ldapbrowser-common/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the LDIF Editor Plugin -->
+ <ant dir="studio-ldifeditor" inheritAll="no" />
+ <!-- Copy of the LDIF Editor Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-ldifeditor/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Browser UI Plugin -->
+ <ant dir="studio-ldapbrowser-ui" inheritAll="no" />
+ <!-- Copy of the Browser UI Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-ldapbrowser-ui/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Browser Help Plugin -->
+ <ant dir="studio-ldapbrowser-help" inheritAll="no" />
+ <!-- Copy of the Browser Help Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-ldapbrowser-help/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Value Editors Plugin -->
+ <ant dir="studio-valueeditors" inheritAll="no" />
+ <!-- Copy of the Value Editors Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-valueeditors/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the ACI Item Editor Plugin -->
+ <ant dir="studio-aciitemeditor" inheritAll="no" />
+ <!-- Copy of the ACI Item Edtior Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-aciitemeditor/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Jars Plugin -->
+ <ant dir="studio-jars" inheritAll="no" />
+ <!-- Copy of the Jars Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-jars/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Apache DS Configuration Plugin -->
+ <ant dir="studio-apacheds-configuration" inheritAll="no" />
+ <!-- Copy of the Jars Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-apacheds-configuration/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Apache DS Configuration Help Plugin -->
+ <ant dir="studio-apacheds-configuration-help" inheritAll="no" />
+ <!-- Copy of the Jars Plugin in the "plugins" folder of the RCP app -->
+ <copy todir="${application.plugins}">
+ <fileset dir="studio-apacheds-configuration-help/target">
+ <include name="*.jar" />
+ </fileset>
+ </copy>
+
+
+ <!-- Creation of the Apache Directory Studio RCP Feature -->
+ <ant dir="studio-rcp-feature" inheritAll="no" />
+ <!-- Copy of the Apache Directory Studio RCP Feature in the "features" folder -->
+ <copy todir="${application.features}">
+ <fileset dir="studio-rcp-feature/target">
+ <exclude name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Schemas Editor Feature -->
+ <ant dir="studio-schemaeditor-feature" inheritAll="no" />
+ <!-- Copy of the Schemas Editor Feature in the "features" folder -->
+ <copy todir="${application.features}">
+ <fileset dir="studio-schemaeditor-feature/target">
+ <exclude name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the LDAP Browser Feature -->
+ <ant dir="studio-ldapbrowser-feature" inheritAll="no" />
+ <!-- Copy of the LDAP Browser Feature in the "features" folder -->
+ <copy todir="${application.features}">
+ <fileset dir="studio-ldapbrowser-feature/target">
+ <exclude name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the LDIF Editor Feature -->
+ <ant dir="studio-ldifeditor-feature" inheritAll="no" />
+ <!-- Copy of the LDIF Editor Feature in the "features" folder -->
+ <copy todir="${application.features}">
+ <fileset dir="studio-ldifeditor-feature/target">
+ <exclude name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Apache DS Configuration Feature -->
+ <ant dir="studio-apacheds-configuration-feature" inheritAll="no" />
+ <!-- Copy of the Apache DS Configuration Feature in the "features" folder -->
+ <copy todir="${application.features}">
+ <fileset dir="studio-apacheds-configuration-feature/target">
+ <exclude name="*.jar" />
+ </fileset>
+ </copy>
+
+ <!-- Copy the legal stuff -->
+ <copy todir="${target.build}">
+ <fileset dir="${basedir}/docs">
+ <include name="LICENSE.txt"/>
+ <include name="NOTICE.txt"/>
+ <include name="Release Notes.txt"/>
+ </fileset>
+ </copy>
+
+ <!-- Setting Permissions -->
+ <antcall target="setPermission_${studio-rcp.os.name}" />
+ </target>
+
+
+ <!-- SETPERMISSION_MACOSX TASK -->
+ <target name="setPermission_macosx" description="Sets the right permissions on Mac OS X">
+ <chmod file="${target.build}/Apache Directory Studio.app/Contents/MacOS/ApacheDirectoryStudio" perm="755"/>
+ </target>
+
+
+ <!-- SETPERMISSION_LINUX TASK -->
+ <target name="setPermission_linux" description="Sets the right permissions on Linux">
+ <chmod file="${target.build}/ApacheDirectoryStudio" perm="755"/>
+ </target>
+
+
+ <!-- SETPERMISSION_WIN32 TASK -->
+ <target name="setPermission_win32" description="Sets the right permissions on Windows">
+ <chmod file="${target.build}/Apache Directory Studio.exe" perm="755" />
+ </target>
+
+
+ <!-- USERGUIDES TASK -->
+ <target name="userguides" description="Generates the user guides">
+ <!-- Creation of the folders -->
+ <mkdir dir="${target.userguides}" />
+
+ <!-- Creation of the Apache Directory Studio RCP user guides -->
+ <ant dir="studio-rcp-help" inheritAll="no" target="help-html" />
+ <ant dir="studio-rcp-help" inheritAll="no" target="help-pdf" />
+ <!-- Copy of the RCP user guides -->
+ <mkdir dir="${target.userguides}/apache_directory_studio" />
+ <copy todir="${target.userguides}/apache_directory_studio">
+ <fileset dir="${basedir}/studio-rcp-help/target/html">
+ <include name="**" />
+ </fileset>
+ </copy>
+ <copy todir="${target.userguides}">
+ <fileset dir="${basedir}/studio-rcp-help/target/pdf">
+ <include name="**/*.pdf" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Apache Directory Studio Browser user guides -->
+ <ant dir="studio-ldapbrowser-help" inheritAll="no" target="help-html" />
+ <ant dir="studio-ldapbrowser-help" inheritAll="no" target="help-pdf" />
+ <!-- Copy of the browser user guides -->
+ <mkdir dir="${target.userguides}/ldap_browser" />
+ <copy todir="${target.userguides}/ldap_browser">
+ <fileset dir="${basedir}/studio-ldapbrowser-help/target/html">
+ <include name="**" />
+ </fileset>
+ </copy>
+ <copy todir="${target.userguides}">
+ <fileset dir="${basedir}/studio-ldapbrowser-help/target/pdf">
+ <include name="**/*.pdf" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Apache Directory Studio Schemas Editor user guides -->
+ <ant dir="studio-schemaeditor-help" inheritAll="no" target="help-html" />
+ <ant dir="studio-schemaeditor-help" inheritAll="no" target="help-pdf" />
+ <!-- Copy of the schemas user guides -->
+ <mkdir dir="${target.userguides}/schemas_editor" />
+ <copy todir="${target.userguides}/schemas_editor">
+ <fileset dir="${basedir}/studio-schemaeditor-help/target/html">
+ <include name="**" />
+ </fileset>
+ </copy>
+ <copy todir="${target.userguides}">
+ <fileset dir="${basedir}/studio-schemaeditor-help/target/pdf">
+ <include name="**/*.pdf" />
+ </fileset>
+ </copy>
+
+ <!-- Creation of the Apache Directory Studio Apache DS Configration user guides -->
+ <ant dir="studio-apacheds-configuration-help" inheritAll="no" target="help-html" />
+ <ant dir="studio-apacheds-configuration-help" inheritAll="no" target="help-pdf" />
+ <!-- Copy of the schemas user guides -->
+ <mkdir dir="${target.userguides}/apacheds_configuration" />
+ <copy todir="${target.userguides}/apacheds_configuration">
+ <fileset dir="${basedir}/studio-apacheds-configuration-help/target/html">
+ <include name="**" />
+ </fileset>
+ </copy>
+ <copy todir="${target.userguides}">
+ <fileset dir="${basedir}/studio-apacheds-configuration-help/target/pdf">
+ <include name="**/*.pdf" />
+ </fileset>
+ </copy>
+ </target>
+
+
+ <!-- JAVADOC TASK -->
+ <target name="javadoc" description="Generate Javadoc files">
+ <ant dir="studio-aciitemeditor" inheritAll="no" target="javadoc" />
+ <ant dir="studio-apacheds-configuration" inheritAll="no" target="javadoc" />
+ <ant dir="studio-connection-core" inheritAll="no" target="javadoc" />
+ <ant dir="studio-connection-ui" inheritAll="no" target="javadoc" />
+ <ant dir="studio-dsml-parser" inheritAll="no" target="javadoc" />
+ <ant dir="studio-ldapbrowser-common" inheritAll="no" target="javadoc" />
+ <ant dir="studio-ldapbrowser-core" inheritAll="no" target="javadoc" />
+ <ant dir="studio-ldapbrowser-ui" inheritAll="no" target="javadoc" />
+ <ant dir="studio-ldifeditor" inheritAll="no" target="javadoc" />
+ <ant dir="studio-rcp" inheritAll="no" target="javadoc" />
+ <ant dir="studio-schemaeditor" inheritAll="no" target="javadoc" />
+ <ant dir="studio-valueeditors" inheritAll="no" target="javadoc" />
+ </target>
+
+
+ <!-- RETRIEVE-DEPENDENCIES TASK -->
+ <target name="retrieve-dependencies" description="Resolves the library dependencies using Ivy">
+ <ant dir="studio-aciitemeditor" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-apacheds-configuration" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-apacheds-configuration-help" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-connection-core" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-connection-ui" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-dsml-parser" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-jars" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-ldapbrowser-common" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-ldapbrowser-core" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-ldapbrowser-help" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-ldapbrowser-ui" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-ldifeditor" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-rcp" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-rcp-help" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-schemaeditor-help" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-schemaeditor" inheritAll="no" target="retrieve-dependencies" />
+ <ant dir="studio-valueeditors" inheritAll="no" target="retrieve-dependencies" />
+ </target>
+
+
+ <!-- RESOLVE TASK -->
+ <target name="resolve" depends="retrieve-dependencies" description="Backwards compatibility with older system and shortcut"/>
+
+
+ <!-- CLEAN TASK -->
+ <target name="clean" description="Deletes any generated file (javadoc, classes, jars, distribution)">
+ <ant dir="studio-aciitemeditor" inheritAll="no" target="clean" />
+ <ant dir="studio-apacheds-configuration" inheritAll="no" target="clean" />
+ <ant dir="studio-apacheds-configuration-help" inheritAll="no" target="clean" />
+ <ant dir="studio-apacheds-configuration-feature" inheritAll="no" target="clean" />
+ <ant dir="studio-connection-core" inheritAll="no" target="clean" />
+ <ant dir="studio-connection-ui" inheritAll="no" target="clean" />
+ <ant dir="studio-dsml-parser" inheritAll="no" target="clean" />
+ <ant dir="studio-jars" inheritAll="no" target="clean" />
+ <ant dir="studio-ldapbrowser-common" inheritAll="no" target="clean" />
+ <ant dir="studio-ldapbrowser-core" inheritAll="no" target="clean" />
+ <ant dir="studio-ldapbrowser-feature" inheritAll="no" target="clean"/>
+ <ant dir="studio-ldapbrowser-help" inheritAll="no" target="clean" />
+ <ant dir="studio-ldapbrowser-ui" inheritAll="no" target="clean" />
+ <ant dir="studio-ldifeditor-feature" inheritAll="no" target="clean"/>
+ <ant dir="studio-ldifeditor" inheritAll="no" target="clean" />
+ <ant dir="studio-rcp" inheritAll="no" target="clean"/>
+ <ant dir="studio-rcp-feature" inheritAll="no" target="clean"/>
+ <ant dir="studio-rcp-help" inheritAll="no" target="clean"/>
+ <ant dir="studio-schemaeditor-feature" inheritAll="no" target="clean"/>
+ <ant dir="studio-schemaeditor-help" inheritAll="no" target="clean" />
+ <ant dir="studio-schemaeditor" inheritAll="no" target="clean"/>
+ <ant dir="studio-updatesite" inheritAll="no" target="clean" />
+ <ant dir="studio-valueeditors" inheritAll="no" target="clean" />
+ <delete dir="${target}" />
+ </target>
+
+
+ <!-- RELEASE TASK -->
+ <target name="release" description="Releases">
+ <!-- Setting some properties -->
+ <property name="packages" value="${basedir}/packages" />
+ <property name="packages.macosx" value="${packages}/ApacheDirectoryStudio_MacOSX.tar.gz" />
+ <property name="packages.windows" value="${packages}/ApacheDirectoryStudio_Windows.zip" />
+ <property name="packages.linux-i386" value="${packages}/ApacheDirectoryStudio_Linux_i386.tar.gz" />
+ <property name="packages.linux-ppc" value="${packages}/ApacheDirectoryStudio_Linux_PPC.tar.gz" />
+ <property name="packages.linux-amd64" value="${packages}/ApacheDirectoryStudio_Linux_AMD64.tar.gz" />
+ <property name="packages.updatesite" value="${packages}/ApacheDirectoryStudio_UpdateSite.zip" />
+
+ <!-- Cleaning the 'packages' folder (just in case) -->
+ <delete includeemptydirs="true" failonerror="no">
+ <fileset dir="${packages}" />
+ </delete>
+
+ <!-- Creating the 'packages' folder -->
+ <mkdir dir="${packages}"/>
+
+ <!-- Cleaning latest build (just in case) -->
+ <antcall target="clean" inheritall="false"/>
+ <!-- Generating Apache Directory Studio for Mac OS X -->
+ <antcall target="bundle" inheritall="false">
+ <param name="studio-rcp.os.name" value="macosx"/>
+ <param name="studio-rcp.os.arch" value="i386"/>
+ <param name="studio-rcp.os.extension" value=".app"/>
+ </antcall>
+ <tar compression="gzip" destfile="${packages.macosx}">
+ <tarfileset dir="${target}" mode="755">
+ <include name="ApacheDirectoryStudio/Apache Directory Studio.app/Contents/MacOS/ApacheDirectoryStudio" />
+ </tarfileset>
+ <tarfileset dir="${target}">
+ <include name="**" />
+ <exclude name="ApacheDirectoryStudio/Apache Directory Studio.app/Contents/MacOS/ApacheDirectoryStudio" />
+ </tarfileset>
+ </tar>
+
+ <!-- Cleaning latest build -->
+ <antcall target="clean" inheritall="false"/>
+ <!-- Generating Apache Directory Studio for Windows -->
+ <antcall target="bundle" inheritall="false">
+ <param name="studio-rcp.os.name" value="win32"/>
+ <param name="studio-rcp.os.arch" value="x86"/>
+ <param name="studio-rcp.os.extension" value=".exe"/>
+ </antcall>
+ <zip destfile="${packages.windows}" basedir="${target}"/>
+
+ <!-- Cleaning latest build -->
+ <antcall target="clean" inheritall="false"/>
+ <!-- Generating Apache Directory Studio for Linux i386 -->
+ <antcall target="bundle" inheritall="false">
+ <param name="studio-rcp.os.name" value="linux"/>
+ <param name="studio-rcp.os.arch" value="i386"/>
+ <param name="studio-rcp.os.extension" value=""/>
+ </antcall>
+ <tar compression="gzip" destfile="${packages.linux-i386}">
+ <tarfileset dir="${target}" mode="755">
+ <include name="ApacheDirectoryStudio/ApacheDirectoryStudio" />
+ </tarfileset>
+ <tarfileset dir="${target}">
+ <include name="**" />
+ <exclude name="ApacheDirectoryStudio/ApacheDirectoryStudio" />
+ </tarfileset>
+ </tar>
+
+ <!-- Cleaning latest build-->
+ <antcall target="clean" inheritall="false"/>
+ <!-- Generating Apache Directory Studio for Linux PPC -->
+ <antcall target="bundle" inheritall="false">
+ <param name="studio-rcp.os.name" value="linux"/>
+ <param name="studio-rcp.os.arch" value="ppc"/>
+ <param name="studio-rcp.os.extension" value=""/>
+ </antcall>
+ <tar compression="gzip" destfile="${packages.linux-ppc}">
+ <tarfileset dir="${target}" mode="755">
+ <include name="ApacheDirectoryStudio/ApacheDirectoryStudio" />
+ </tarfileset>
+ <tarfileset dir="${target}">
+ <include name="**" />
+ <exclude name="ApacheDirectoryStudio/ApacheDirectoryStudio" />
+ </tarfileset>
+ </tar>
+
+ <!-- Cleaning latest build-->
+ <antcall target="clean" inheritall="false"/>
+ <!-- Generating Apache Directory Studio for Linux AMD64 -->
+ <antcall target="bundle" inheritall="false">
+ <param name="studio-rcp.os.name" value="linux"/>
+ <param name="studio-rcp.os.arch" value="amd64"/>
+ <param name="studio-rcp.os.extension" value=""/>
+ </antcall>
+ <tar compression="gzip" destfile="${packages.linux-amd64}">
+ <tarfileset dir="${target}" mode="755">
+ <include name="ApacheDirectoryStudio/ApacheDirectoryStudio" />
+ </tarfileset>
+ <tarfileset dir="${target}">
+ <include name="**" />
+ <exclude name="ApacheDirectoryStudio/ApacheDirectoryStudio" />
+ </tarfileset>
+ </tar>
+
+ <!-- Cleaning latest build-->
+ <antcall target="clean" inheritall="false"/>
+ <!-- Generating Apache Directory Studio's update site -->
+ <ant dir="studio-updatesite" inheritAll="no"/>
+ <zip destfile="${packages.updatesite}" basedir="studio-updatesite/target"/>
+ </target>
+</project>
diff --git a/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/META-INF/eclipse.inf b/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/META-INF/eclipse.inf
new file mode 100644
index 0000000..4abb80f
--- /dev/null
+++ b/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/META-INF/eclipse.inf
@@ -0,0 +1,2 @@
+#Fri May 12 16:35:23 EDT 2006
+pack200.conditioned=true
diff --git a/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/eclipse_update_120.jpg b/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/eclipse_update_120.jpg
Binary files differ
diff --git a/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/epl-v10.html b/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/epl-v10.html
new file mode 100644
index 0000000..ed4b196
--- /dev/null
+++ b/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/epl-v10.html
@@ -0,0 +1,328 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>"Contribution" means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
+</html>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/feature.properties b/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/feature.properties
new file mode 100644
index 0000000..0971946
--- /dev/null
+++ b/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/feature.properties
@@ -0,0 +1,144 @@
+###############################################################################
+# Copyright (c) 2000, 2005 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Eclipse RCP
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse.org
+
+# "updateSiteName" property - label for the update site
+updateSiteName=The Eclipse Project update site
+
+# "description" property - description of the feature
+description=Rich Client Platform
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2000, 2006 IBM Corporation and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+ IBM Corporation - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/feature.xml b/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/feature.xml
new file mode 100644
index 0000000..d50a98a
--- /dev/null
+++ b/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/feature.xml
@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.rcp"
+ label="%featureName"
+ version="3.2.0.v20060511-2000-VDNgUi843pOsLRQ"
+ provider-name="%providerName"
+ plugin="org.eclipse.rcp"
+ image="eclipse_update_120.jpg">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%updateSiteName" url="http://update.eclipse.org/updates/3.2"/>
+ </url>
+
+ <plugin
+ id="com.ibm.icu"
+ download-size="0"
+ install-size="0"
+ version="3.4.4.1"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.core.commands"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.I20060511-0800a"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.core.jobs"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v20060511"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.core.expressions"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v20060512-1326"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.core.runtime"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v20060511"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.core.runtime.compatibility.auth"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v20060511"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.osgi"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v20060510"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.help"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v20060510b"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v3232h"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jface"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.I20060511-0800a"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.jface.databinding"
+ download-size="0"
+ install-size="0"
+ version="1.0.0.I20060511-2000"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.ui"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.I20060511-0800a"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.ui.workbench"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.I20060511-1600"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.update.configurator"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v20060511"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.win32.win32.x86"
+ os="win32"
+ ws="win32"
+ arch="x86"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v3232g"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.gtk.linux.x86"
+ os="linux"
+ ws="gtk"
+ arch="x86"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v3232g"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.gtk.solaris.sparc"
+ os="solaris"
+ ws="gtk"
+ arch="sparc"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v3232g"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.gtk.solaris.x86"
+ os="solaris"
+ ws="gtk"
+ arch="x86"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.HEAD"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.gtk.linux.ppc"
+ os="linux"
+ ws="gtk"
+ arch="ppc"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v3232g"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.gtk.linux.x86_64"
+ os="linux"
+ ws="gtk"
+ arch="x86_64"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v3232g"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.carbon.macosx"
+ os="macosx"
+ ws="carbon"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v3232g"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.motif.aix.ppc"
+ os="aix"
+ ws="motif"
+ arch="ppc"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v3232g"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.motif.hpux.PA_RISC"
+ os="hpux"
+ ws="motif"
+ arch="PA_RISC"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v3232g"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.motif.linux.x86"
+ os="linux"
+ ws="motif"
+ arch="x86"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v3232g"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.gtk.linux.ia64"
+ os="linux"
+ ws="gtk"
+ arch="ia64"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.HEAD"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.motif.solaris.sparc"
+ os="solaris"
+ ws="motif"
+ arch="sparc"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v3232g"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.photon.qnx.x86"
+ os="qnx"
+ ws="photon"
+ arch="x86"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v3232g"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.motif.hpux.ia64_32"
+ os="hpux"
+ ws="motif"
+ arch="ia64_32"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.HEAD"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.rcp"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v20060511-1200"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.core.contenttype"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v20060511"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.equinox.common"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v20060512"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.equinox.preferences"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v20060511"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.equinox.registry"
+ download-size="0"
+ install-size="0"
+ version="3.2.0.v20060511"
+ unpack="false"/>
+
+</feature>
diff --git a/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/license.html b/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/license.html
new file mode 100644
index 0000000..c6af966
--- /dev/null
+++ b/dependencies/eclipse/3.2/features/org.eclipse.rcp_3.2.0.v20060511-2000-VDNgUi843pOsLRQ/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/linux/amd64/org.eclipse.swt.gtk.linux.x86_64_3.2.1.v3235.jar b/dependencies/eclipse/3.2/linux/amd64/org.eclipse.swt.gtk.linux.x86_64_3.2.1.v3235.jar
new file mode 100644
index 0000000..239d7a9
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/amd64/org.eclipse.swt.gtk.linux.x86_64_3.2.1.v3235.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/linux/amd64/rcp/configuration/config.ini b/dependencies/eclipse/3.2/linux/amd64/rcp/configuration/config.ini
new file mode 100644
index 0000000..5ae9d2f
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/amd64/rcp/configuration/config.ini
@@ -0,0 +1,9 @@
+#Product Runtime Configuration File
+
+osgi.splashPath=platform:/base/plugins/org.apache.directory.studio
+eclipse.product=org.apache.directory.studio.product
+osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
+osgi.bundles.defaultStartLevel=4
+
+# The workspace location
+osgi.instance.area.default=@user.home/.ApacheDirectoryStudio
diff --git a/dependencies/eclipse/3.2/linux/amd64/rcp/eclipse b/dependencies/eclipse/3.2/linux/amd64/rcp/eclipse
new file mode 100755
index 0000000..1a399a3
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/amd64/rcp/eclipse
Binary files differ
diff --git a/dependencies/eclipse/3.2/linux/amd64/rcp/startup.jar b/dependencies/eclipse/3.2/linux/amd64/rcp/startup.jar
new file mode 100644
index 0000000..ab2acc6
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/amd64/rcp/startup.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/linux/amd64/rcp/studio.xpm b/dependencies/eclipse/3.2/linux/amd64/rcp/studio.xpm
new file mode 100644
index 0000000..400a037
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/amd64/rcp/studio.xpm
@@ -0,0 +1,1590 @@
+/* XPM */
+static char * test2_xpm[] = {
+"48 48 1539 2",
+" c None",
+". c #E5F4FB",
+"+ c #EFF8FC",
+"@ c #EEF8FC",
+"# c #EDF7FC",
+"$ c #ECF7FC",
+"% c #EAF6FC",
+"& c #E8F5FB",
+"* c #E7F4FB",
+"= c #E5F3FA",
+"- c #E2F1F9",
+"; c #E0F0F8",
+"> c #DDEEF7",
+", c #DAECF5",
+"' c #D6E9F4",
+") c #D3E8F4",
+"! c #CEE4F0",
+"~ c #CBE2F0",
+"{ c #C8E1F0",
+"] c #C3DEEE",
+"^ c #BFDBEC",
+"/ c #BAD8EB",
+"( c #B6D4E8",
+"_ c #B1D1E5",
+": c #ACCDE3",
+"< c #A7C9E0",
+"[ c #A2C5DE",
+"} c #9DC1DB",
+"| c #97BDD8",
+"1 c #92B8D6",
+"2 c #8DB4D2",
+"3 c #88B0CF",
+"4 c #82ABCC",
+"5 c #7DA7C9",
+"6 c #77A2C6",
+"7 c #729DC3",
+"8 c #6D99BF",
+"9 c #6894BC",
+"0 c #628EB8",
+"a c #5F8BB6",
+"b c #F2FAFD",
+"c c #EFF8FD",
+"d c #E6F5FB",
+"e c #E4F3FA",
+"f c #E3F3FA",
+"g c #E2F2FA",
+"h c #E0F1F9",
+"i c #DEF0F9",
+"j c #DBEEF8",
+"k c #D9EDF7",
+"l c #D8EDF8",
+"m c #D4EAF5",
+"n c #C9DBE5",
+"o c #C9D9E2",
+"p c #C7DBE6",
+"q c #BBCDD8",
+"r c #BDD3DF",
+"s c #BEDBEC",
+"t c #B9D8EC",
+"u c #B7D5E8",
+"v c #ADD1E6",
+"w c #A8CDE5",
+"x c #A3C8E1",
+"y c #9EC4DD",
+"z c #9AC0DB",
+"A c #95BCD9",
+"B c #90B8D6",
+"C c #8BB4D3",
+"D c #85AFCF",
+"E c #81ABCD",
+"F c #7BA7CA",
+"G c #76A2C6",
+"H c #729EC3",
+"I c #6C99C0",
+"J c #6794BC",
+"K c #6290B9",
+"L c #5D8BB6",
+"M c #5F8BB5",
+"N c #F3FAFE",
+"O c #E8F5FC",
+"P c #E7F5FB",
+"Q c #E6F4FB",
+"R c #E5F4FA",
+"S c #E1F2FA",
+"T c #E0F0F9",
+"U c #DEF0F8",
+"V c #DCEFF9",
+"W c #DAEFFA",
+"X c #CDE1ED",
+"Y c #D1DBE1",
+"Z c #C8D4DB",
+"` c #C3D2DA",
+" . c #B9C7CF",
+".. c #BCCAD3",
+"+. c #B6CAD6",
+"@. c #B0C8D7",
+"#. c #B6CCDB",
+"$. c #ACC4D2",
+"%. c #A7C8DD",
+"&. c #A3C6DE",
+"*. c #9FC3DB",
+"=. c #9DC4DF",
+"-. c #96BEDA",
+";. c #92BAD7",
+">. c #8DB7D5",
+",. c #88B2D1",
+"'. c #83AECF",
+"). c #7EA9CC",
+"!. c #79A4C8",
+"~. c #74A0C6",
+"{. c #6F9CC3",
+"]. c #6A98BF",
+"^. c #6693BB",
+"/. c #608FB8",
+"(. c #5C8AB5",
+"_. c #5D89B5",
+":. c #F2F9FD",
+"<. c #E4F4FB",
+"[. c #E1F1FA",
+"}. c #DFF1FA",
+"|. c #DDF0FA",
+"1. c #D9ECF4",
+"2. c #D3E7F2",
+"3. c #D0E1EB",
+"4. c #CBDAE3",
+"5. c #C9D7DE",
+"6. c #C8D7E0",
+"7. c #BED1DB",
+"8. c #C7CED2",
+"9. c #BAC7CE",
+"0. c #BBCCD5",
+"a. c #BBC9D0",
+"b. c #ACC3D1",
+"c. c #AFC0CB",
+"d. c #A1BBCB",
+"e. c #A5C0D1",
+"f. c #9BBCD3",
+"g. c #98C2E0",
+"h. c #94BDDB",
+"i. c #8FBAD9",
+"j. c #89B5D4",
+"k. c #84B1D1",
+"l. c #81ACCE",
+"m. c #7BA8CA",
+"n. c #76A3C7",
+"o. c #719FC4",
+"p. c #6C9AC1",
+"q. c #6796BE",
+"r. c #6391BB",
+"s. c #5F8DB7",
+"t. c #5A88B4",
+"u. c #5A87B3",
+"v. c #E3F4FC",
+"w. c #E1F3FC",
+"x. c #DFF0F9",
+"y. c #DAE9F1",
+"z. c #CEDFE7",
+"A. c #D2DEE5",
+"B. c #CFD9DF",
+"C. c #CAD5DB",
+"D. c #C0D2DC",
+"E. c #BDD0DB",
+"F. c #D1DFE6",
+"G. c #C5D3DB",
+"H. c #BBC9D2",
+"I. c #C1D2DC",
+"J. c #B2C7D4",
+"K. c #C1CDD5",
+"L. c #B2C5D1",
+"M. c #9BB5C6",
+"N. c #9FBACC",
+"O. c #94B7CF",
+"P. c #8FB8D6",
+"Q. c #8CB3D0",
+"R. c #86B1D1",
+"S. c #81ADCF",
+"T. c #7BA9CD",
+"U. c #79A6CA",
+"V. c #72A0C5",
+"W. c #6F9DC3",
+"X. c #6A98C0",
+"Y. c #6594BC",
+"Z. c #608FBA",
+"`. c #5C8BB6",
+" + c #5886B3",
+".+ c #5685B1",
+"++ c #E3F2F9",
+"@+ c #DEEEF5",
+"#+ c #DDEFF8",
+"$+ c #D9EAF2",
+"%+ c #D4DEE3",
+"&+ c #C7D5DD",
+"*+ c #DCE6EB",
+"=+ c #DBDEE0",
+"-+ c #BDD0D9",
+";+ c #D5DFE5",
+">+ c #BCCCD5",
+",+ c #BFD4E1",
+"'+ c #BED2DE",
+")+ c #C6D8E2",
+"!+ c #C2CFD8",
+"~+ c #BACCD7",
+"{+ c #A6BBC9",
+"]+ c #BCCFDA",
+"^+ c #B8C9D4",
+"/+ c #8FB0C6",
+"(+ c #92B1C5",
+"_+ c #9BB1C0",
+":+ c #91AFC4",
+"<+ c #83A4BC",
+"[+ c #7DA5C3",
+"}+ c #7CA4C3",
+"|+ c #83A8C4",
+"1+ c #739FC1",
+"2+ c #70A0C6",
+"3+ c #6C9BC2",
+"4+ c #6192BB",
+"5+ c #5D8DB8",
+"6+ c #5989B5",
+"7+ c #5586B1",
+"8+ c #5181AE",
+"9+ c #E4F3FB",
+"0+ c #E3F3FB",
+"a+ c #E1F3FB",
+"b+ c #DCE7EC",
+"c+ c #D3DFE6",
+"d+ c #D3E0E7",
+"e+ c #D0DFE6",
+"f+ c #D1DDE4",
+"g+ c #D0DFE7",
+"h+ c #CFD5D9",
+"i+ c #CEE1EA",
+"j+ c #C4CED3",
+"k+ c #AFC7D5",
+"l+ c #C2D4DD",
+"m+ c #C6D6E0",
+"n+ c #C3CFD5",
+"o+ c #B5BFC4",
+"p+ c #9CB5C6",
+"q+ c #B2C9D8",
+"r+ c #A9BCC9",
+"s+ c #94B7CD",
+"t+ c #94BDDA",
+"u+ c #A3B7C5",
+"v+ c #90A5B5",
+"w+ c #82A4BC",
+"x+ c #8FAFC6",
+"y+ c #96ADBE",
+"z+ c #829BAE",
+"A+ c #6D96B6",
+"B+ c #6C9EC6",
+"C+ c #6898C0",
+"D+ c #6393BC",
+"E+ c #5F8EBA",
+"F+ c #5A8AB7",
+"G+ c #5587B3",
+"H+ c #5485B1",
+"I+ c #4C7CAC",
+"J+ c #E3F2FA",
+"K+ c #DEF1FA",
+"L+ c #D6E2E9",
+"M+ c #EBEBEC",
+"N+ c #D6E4EB",
+"O+ c #CADCE5",
+"P+ c #DFEAEF",
+"Q+ c #D7E3E8",
+"R+ c #B9CFDB",
+"S+ c #D5DBDD",
+"T+ c #C2D9E5",
+"U+ c #C6D7E1",
+"V+ c #CAD3D8",
+"W+ c #C7D3DA",
+"X+ c #C4D3DB",
+"Y+ c #B2C3CD",
+"Z+ c #B6C0C7",
+"`+ c #B1C7D4",
+" @ c #A0BED1",
+".@ c #A6BAC7",
+"+@ c #93B3C7",
+"@@ c #9CBED5",
+"#@ c #92AEC1",
+"$@ c #ABBBC6",
+"%@ c #82A3BC",
+"&@ c #92B7D1",
+"*@ c #B0B8BE",
+"=@ c #728EA4",
+"-@ c #6595BC",
+";@ c #699BC5",
+">@ c #6595BE",
+",@ c #6092BB",
+"'@ c #5B8DB8",
+")@ c #5789B5",
+"!@ c #5384B2",
+"~@ c #5282B0",
+"{@ c #4477A8",
+"]@ c #EAF6FB",
+"^@ c #E1F2F9",
+"/@ c #DAE9F0",
+"(@ c #D0E2EB",
+"_@ c #ECF0F0",
+":@ c #ECF0F2",
+"<@ c #C9DCE5",
+"[@ c #D1E1E9",
+"}@ c #D4E0E6",
+"|@ c #CCDCE3",
+"1@ c #D3DADE",
+"2@ c #C5D5DF",
+"3@ c #C3DCEA",
+"4@ c #D6DBDD",
+"5@ c #BDC8CF",
+"6@ c #D0D8DD",
+"7@ c #CBD4D9",
+"8@ c #ABC1CF",
+"9@ c #9DBED4",
+"0@ c #B7C2C9",
+"a@ c #97B1C2",
+"b@ c #8AAAC1",
+"c@ c #91B3CB",
+"d@ c #9DB4C4",
+"e@ c #5F8DAF",
+"f@ c #ABC6D9",
+"g@ c #BABDC0",
+"h@ c #5A84A4",
+"i@ c #6E9CC2",
+"j@ c #6C95B7",
+"k@ c #5E8FB8",
+"l@ c #598EBB",
+"m@ c #598BB7",
+"n@ c #5486B3",
+"o@ c #5182B0",
+"p@ c #4D7FAD",
+"q@ c #3B70A3",
+"r@ c #DDF1FB",
+"s@ c #D7E6EE",
+"t@ c #D6E0E6",
+"u@ c #CADFEA",
+"v@ c #DCE3E7",
+"w@ c #DBE0E4",
+"x@ c #C0D6E3",
+"y@ c #CCDFE9",
+"z@ c #CFDADF",
+"A@ c #E5EBEE",
+"B@ c #DBE0E3",
+"C@ c #C1D5E0",
+"D@ c #A9C0CD",
+"E@ c #E0EDF3",
+"F@ c #E4E6E7",
+"G@ c #A5B4BE",
+"H@ c #98B6C9",
+"I@ c #B0CFE2",
+"J@ c #BFC5C9",
+"K@ c #95ADBE",
+"L@ c #8DADC4",
+"M@ c #86ADC9",
+"N@ c #92ACC0",
+"O@ c #759FBE",
+"P@ c #A6B7C4",
+"Q@ c #718CA1",
+"R@ c #759EBE",
+"S@ c #9EAFBC",
+"T@ c #537DA0",
+"U@ c #4E86B5",
+"V@ c #6A93B6",
+"W@ c #5685AF",
+"X@ c #5184B3",
+"Y@ c #4678AA",
+"Z@ c #31689F",
+"`@ c #DEEFF9",
+" # c #DCEFF8",
+".# c #DAEEF9",
+"+# c #D6EBF7",
+"@# c #CEDAE0",
+"## c #D7DFE4",
+"$# c #CBE2EF",
+"%# c #DDE4E8",
+"&# c #BCD8E7",
+"*# c #C0D1DB",
+"=# c #C7D4DC",
+"-# c #BDC9D0",
+";# c #D7DDE0",
+"># c #D2D7DB",
+",# c #9DBDD1",
+"'# c #BDDBED",
+")# c #BFCAD1",
+"!# c #B2C1CB",
+"~# c #A0BDCF",
+"{# c #C7CCCF",
+"]# c #9FB1BC",
+"^# c #77A1BF",
+"/# c #93BBD7",
+"(# c #9CAFBC",
+"_# c #85A6BF",
+":# c #89A3B6",
+"<# c #5A89AD",
+"[# c #7E9DB6",
+"}# c #547C9D",
+"|# c #749DBE",
+"1# c #AABCCB",
+"2# c #5C7E9B",
+"3# c #4D80AD",
+"4# c #4E83B2",
+"5# c #4E80AF",
+"6# c #3A70A4",
+"7# c #2C659C",
+"8# c #DAEEF7",
+"9# c #D9EEF8",
+"0# c #D7ECF8",
+"a# c #CAE1ED",
+"b# c #CEDCE3",
+"c# c #CAD9E1",
+"d# c #DEE4E8",
+"e# c #C3D6E1",
+"f# c #B5CDDA",
+"g# c #C6D0D6",
+"h# c #AEC6D6",
+"i# c #B5CCDA",
+"j# c #EEE9E6",
+"k# c #B6CDDA",
+"l# c #93C2E0",
+"m# c #B8CAD6",
+"n# c #CBD0D2",
+"o# c #8CAFC6",
+"p# c #A4C8DF",
+"q# c #CBCDCE",
+"r# c #96ABB9",
+"s# c #609AC2",
+"t# c #B2CBDD",
+"u# c #94A9B8",
+"v# c #81A0B8",
+"w# c #7397B4",
+"x# c #779CBA",
+"y# c #6C91AE",
+"z# c #6E96B7",
+"A# c #AAB8C4",
+"B# c #939EA7",
+"C# c #3D709C",
+"D# c #4E84B5",
+"E# c #4F81B1",
+"F# c #477BAC",
+"G# c #2E679E",
+"H# c #2E659C",
+"I# c #D8EDF7",
+"J# c #D7EBF6",
+"K# c #D3E7F1",
+"L# c #D3ECF8",
+"M# c #CFE4ED",
+"N# c #CFDAE0",
+"O# c #C6E1EF",
+"P# c #BFD5E0",
+"Q# c #C4D9E4",
+"R# c #C4D8E3",
+"S# c #B7CDD9",
+"T# c #BDD5E3",
+"U# c #D3E1E7",
+"V# c #D6E1E8",
+"W# c #8ABBD8",
+"X# c #CADDE8",
+"Y# c #E0E3E5",
+"Z# c #79AECE",
+"`# c #C2DBEA",
+" $ c #C7CBCD",
+".$ c #6DA0C2",
+"+$ c #AACCE3",
+"@$ c #F4EEEA",
+"#$ c #82A4BD",
+"$$ c #76ACD2",
+"%$ c #8DA8BC",
+"&$ c #799AB3",
+"*$ c #7499B5",
+"=$ c #6594B8",
+"-$ c #88A5BC",
+";$ c #9AB1C2",
+">$ c #C6C8CA",
+",$ c #7E909F",
+"'$ c #30638F",
+")$ c #5088BA",
+"!$ c #5685B0",
+"~$ c #5F83A5",
+"{$ c #326BA0",
+"]$ c #29639C",
+"^$ c #2D649B",
+"/$ c #DFEFF8",
+"($ c #D6EBF6",
+"_$ c #D5EBF6",
+":$ c #D3E8F5",
+"<$ c #CDDEE7",
+"[$ c #CBDFEA",
+"}$ c #CAE7F5",
+"|$ c #C9DBE4",
+"1$ c #C8D9E2",
+"2$ c #BCD3E0",
+"3$ c #B8D0DD",
+"4$ c #D4E0E7",
+"5$ c #CCDCE4",
+"6$ c #C5D7E2",
+"7$ c #C6D3DB",
+"8$ c #CDD8DE",
+"9$ c #B6D3E4",
+"0$ c #8EC1DF",
+"a$ c #D2DCE1",
+"b$ c #ACC1CE",
+"c$ c #B4CDDC",
+"d$ c #B0C0CB",
+"e$ c #669EC3",
+"f$ c #BCD9EC",
+"g$ c #FFFDF8",
+"h$ c #88A5B9",
+"i$ c #87ABC5",
+"j$ c #7B9AB1",
+"k$ c #6E95B2",
+"l$ c #6A9ABF",
+"m$ c #9BB4C7",
+"n$ c #92A4B4",
+"o$ c #B4BDC3",
+"p$ c #919EA8",
+"q$ c #4B779C",
+"r$ c #7498B7",
+"s$ c #3971A2",
+"t$ c #6890B4",
+"u$ c #587A9A",
+"v$ c #1E5C98",
+"w$ c #2A649D",
+"x$ c #2A629A",
+"y$ c #DCEDF7",
+"z$ c #D3E9F5",
+"A$ c #D1E9F5",
+"B$ c #CFE8F5",
+"C$ c #C9DEE9",
+"D$ c #C9D5DA",
+"E$ c #BEDBEB",
+"F$ c #BFD1DB",
+"G$ c #D5DADD",
+"H$ c #B4D1E1",
+"I$ c #B1D0E1",
+"J$ c #DFE4E7",
+"K$ c #ADC1CC",
+"L$ c #A8C0CF",
+"M$ c #CBD5DC",
+"N$ c #C4D0D8",
+"O$ c #86B9D9",
+"P$ c #ABCBDF",
+"Q$ c #EDE7E4",
+"R$ c #B9C9D4",
+"S$ c #649CC1",
+"T$ c #BDD6E7",
+"U$ c #FFFFFF",
+"V$ c #A0B0BC",
+"W$ c #799AB1",
+"X$ c #869EB0",
+"Y$ c #98B7CF",
+"Z$ c #829AAC",
+"`$ c #5F809B",
+" % c #CBD0D3",
+".% c #91A4B4",
+"+% c #40749E",
+"@% c #7C96AC",
+"#% c #7494B0",
+"$% c #8EA3B5",
+"%% c #3F6385",
+"&% c #2A639A",
+"*% c #29639D",
+"=% c #2A6199",
+"-% c #D9EBF6",
+";% c #D0E7F4",
+">% c #CDE7F4",
+",% c #CDE8F8",
+"'% c #C7E1EE",
+")% c #C1D1DA",
+"!% c #D5DBDF",
+"~% c #C3D5DE",
+"{% c #AFCAD7",
+"]% c #CED8DE",
+"^% c #E0E8EC",
+"/% c #ABCDDF",
+"(% c #ABC5D3",
+"_% c #D4D9DA",
+":% c #97C0D8",
+"<% c #A0C1D5",
+"[% c #BBD3E2",
+"}% c #72AACE",
+"|% c #ECEFF2",
+"1% c #C7D0D6",
+"2% c #8BA8BC",
+"3% c #6AA0C5",
+"4% c #DBE9F4",
+"5% c #C5C8CB",
+"6% c #7794A8",
+"7% c #91ADC1",
+"8% c #7C9BB1",
+"9% c #8EABC2",
+"0% c #8CA3B6",
+"a% c #4478A1",
+"b% c #A6BAC9",
+"c% c #F3F1EE",
+"d% c #7D93A7",
+"e% c #6F8EA8",
+"f% c #61809B",
+"g% c #7B94AB",
+"h% c #7F8F9C",
+"i% c #4A6580",
+"j% c #41688F",
+"k% c #225C96",
+"l% c #296099",
+"m% c #D5EAF5",
+"n% c #CBE4F2",
+"o% c #CCE4F1",
+"p% c #C8E1EE",
+"q% c #C5E0F0",
+"r% c #BFDCEC",
+"s% c #BACDD8",
+"t% c #D7D9DB",
+"u% c #BED4E0",
+"v% c #AECADA",
+"w% c #CED3D6",
+"x% c #CCD7DE",
+"y% c #A9C9DB",
+"z% c #D5DDE3",
+"A% c #BED1DE",
+"B% c #76B3D8",
+"C% c #BAD3E3",
+"D% c #E6E6E6",
+"E% c #76A9CA",
+"F% c #B0CEE1",
+"G% c #C3CBD0",
+"H% c #84A4B9",
+"I% c #83B1D2",
+"J% c #BCC7CF",
+"K% c #69879B",
+"L% c #80A4BE",
+"M% c #8FAABE",
+"N% c #98B0C2",
+"O% c #93A8B8",
+"P% c #44769D",
+"Q% c #99B6CD",
+"R% c #E2E2E1",
+"S% c #4D6B84",
+"T% c #6B8CA7",
+"U% c #2C6496",
+"V% c #809FBC",
+"W% c #7F8A95",
+"X% c #204F7B",
+"Y% c #255A8E",
+"Z% c #265F97",
+"`% c #275E98",
+" & c #D1E7F3",
+".& c #C3DDEC",
+"+& c #C7D6DF",
+"@& c #C8D5DC",
+"#& c #BAD1DF",
+"$& c #BDD6E4",
+"%& c #B5D4E7",
+"&& c #BDD4E1",
+"*& c #D9E0E5",
+"=& c #ABCDE2",
+"-& c #BDCFDA",
+";& c #B6C7D1",
+">& c #C3D4DE",
+",& c #A4C2D5",
+"'& c #CBD8E0",
+")& c #B9D2E1",
+"!& c #99BCD3",
+"~& c #E8E9E8",
+"{& c #AFC9DA",
+"]& c #88B7D6",
+"^& c #DCDEE0",
+"/& c #85A2B5",
+"(& c #92BAD6",
+"_& c #A5B5C0",
+":& c #9EB1BF",
+"<& c #769BB5",
+"[& c #92AFC5",
+"}& c #B8C0C5",
+"|& c #5881A1",
+"1& c #74A1C4",
+"2& c #FFFCF8",
+"3& c #9AA4AD",
+"4& c #3B6B93",
+"5& c #3072AB",
+"6& c #6595BF",
+"7& c #818F9C",
+"8& c #10416E",
+"9& c #165A9A",
+"0& c #1F5F9F",
+"a& c #296299",
+"b& c #275D95",
+"c& c #CDE5F3",
+"d& c #C2DDEC",
+"e& c #CBD5DB",
+"f& c #AFCCDC",
+"g& c #B9CEDA",
+"h& c #ABC8D8",
+"i& c #C8D1D6",
+"j& c #CEDBE3",
+"k& c #A8CBE0",
+"l& c #ABC6D6",
+"m& c #98BFD6",
+"n& c #B4CAD7",
+"o& c #C3D5E0",
+"p& c #C6CCD1",
+"q& c #8FAABC",
+"r& c #C2CED5",
+"s& c #D9DFE3",
+"t& c #98B8CF",
+"u& c #FFFDF9",
+"v& c #94ACBD",
+"w& c #81A8C5",
+"x& c #EEEEED",
+"y& c #A3B1BC",
+"z& c #9AB6CA",
+"A& c #D4D7D9",
+"B& c #5B7D98",
+"C& c #6693B8",
+"D& c #C9D4DD",
+"E& c #C3C5C8",
+"F& c #6C7D8B",
+"G& c #567996",
+"H& c #2567A1",
+"I& c #4079AC",
+"J& c #65819B",
+"K& c #134573",
+"L& c #135798",
+"M& c #4377A9",
+"N& c #4B739B",
+"O& c #225990",
+"P& c #255C96",
+"Q& c #C9E2F1",
+"R& c #C0DDEE",
+"S& c #B6D5E5",
+"T& c #AEC6D5",
+"U& c #CAD6DD",
+"V& c #B6D3E5",
+"W& c #B8CDD9",
+"X& c #98BFD5",
+"Y& c #B5C9D5",
+"Z& c #BDD3E0",
+"`& c #ACC6D5",
+" * c #99BBD1",
+".* c #99C0D9",
+"+* c #A7BDCA",
+"@* c #F2F0EE",
+"#* c #A9C7DC",
+"$* c #5492BA",
+"%* c #AFC3D0",
+"&* c #EDECED",
+"** c #FFFFFE",
+"=* c #94ADBF",
+"-* c #88ACC5",
+";* c #B9C1C8",
+">* c #B6BDC3",
+",* c #708CA2",
+"'* c #779DBB",
+")* c #86A0B6",
+"!* c #849CB0",
+"~* c #718BA1",
+"{* c #457095",
+"]* c #7597B7",
+"^* c #A2B9CE",
+"/* c #8293A3",
+"(* c #446686",
+"_* c #6587A6",
+":* c #5C7A97",
+"<* c #5E7994",
+"[* c #486684",
+"}* c #1C5289",
+"|* c #C5E0EF",
+"1* c #B7D3E4",
+"2* c #C1D4DF",
+"3* c #BCCED9",
+"4* c #D3DDE2",
+"5* c #A7C5D8",
+"6* c #B3C7D4",
+"7* c #ADCADC",
+"8* c #9BBED3",
+"9* c #ABC0CC",
+"0* c #C5D2DA",
+"a* c #C7D1D8",
+"b* c #9CBBD0",
+"c* c #7EB0D0",
+"d* c #B1C6D3",
+"e* c #EFEBE8",
+"f* c #83B3D4",
+"g* c #6AA1C7",
+"h* c #F8F8F7",
+"i* c #8EA8BB",
+"j* c #A7C2D6",
+"k* c #6A859A",
+"l* c #849FB5",
+"m* c #CFD8DF",
+"n* c #8098AA",
+"o* c #3D709B",
+"p* c #90A9BD",
+"q* c #417098",
+"r* c #9BB6CE",
+"s* c #9EA7AF",
+"t* c #778593",
+"u* c #416382",
+"v* c #436A8F",
+"w* c #456B8F",
+"x* c #3C6288",
+"y* c #33577C",
+"z* c #1D4D7F",
+"A* c #245A94",
+"B* c #C0DCED",
+"C* c #B3D2E4",
+"D* c #B3C8D4",
+"E* c #B0C6D3",
+"F* c #A1C1D4",
+"G* c #BDCDD6",
+"H* c #CFDCE3",
+"I* c #C3D8E4",
+"J* c #B4C8D5",
+"K* c #9ABED4",
+"L* c #95B6CC",
+"M* c #B0C2CE",
+"N* c #C7D2D9",
+"O* c #A8BAC6",
+"P* c #8EB5CF",
+"Q* c #5E9EC9",
+"R* c #A4BCCD",
+"S* c #D3D8DC",
+"T* c #5F98C1",
+"U* c #CBDCE8",
+"V* c #94AABB",
+"W* c #CAD8E3",
+"X* c #BBC1C5",
+"Y* c #396E98",
+"Z* c #F5FCFF",
+"`* c #BEBEC0",
+" = c #7696B0",
+".= c #B8D1E5",
+"+= c #567B9B",
+"@= c #3974A7",
+"#= c #9BA8B4",
+"$= c #15426B",
+"%= c #003D7F",
+"&= c #12599C",
+"*= c #145898",
+"== c #105190",
+"-= c #165695",
+";= c #265D96",
+">= c #245992",
+",= c #245993",
+"'= c #BBD9EA",
+")= c #B1D4E9",
+"!= c #A9C5D6",
+"~= c #A8C5D6",
+"{= c #AECBDC",
+"]= c #9BB8CA",
+"^= c #ACBDC7",
+"/= c #C6CFD4",
+"(= c #B1BFC8",
+"_= c #C6D2DA",
+":= c #B6D1E2",
+"<= c #8BB0C8",
+"[= c #98B2C3",
+"}= c #DCE1E5",
+"|= c #BCCCD7",
+"1= c #8DBAD8",
+"2= c #5E9ECB",
+"3= c #C6D1DA",
+"4= c #A2B9CA",
+"5= c #A6C1D5",
+"6= c #A8B6C1",
+"7= c #DBDDDE",
+"8= c #6C8DA7",
+"9= c #AFCBE0",
+"0= c #C5C4C4",
+"a= c #919EA9",
+"b= c #D4D6D7",
+"c= c #AEAFB1",
+"d= c #244F74",
+"e= c #95ACC0",
+"f= c #7D8D9B",
+"g= c #245785",
+"h= c #6B90B3",
+"i= c #406B95",
+"j= c #3F6B96",
+"k= c #6986A3",
+"l= c #466F97",
+"m= c #416489",
+"n= c #396088",
+"o= c #24578E",
+"p= c #225793",
+"q= c #B6D5E9",
+"r= c #ADD2E9",
+"s= c #A6C7DC",
+"t= c #A4BCCB",
+"u= c #9FBCCE",
+"v= c #93B8D0",
+"w= c #85AFCA",
+"x= c #94B3C8",
+"y= c #B6C4CD",
+"z= c #9DBFD5",
+"A= c #BCD0DD",
+"B= c #CBCDD0",
+"C= c #DEDEDE",
+"D= c #70A7CE",
+"E= c #337DB3",
+"F= c #ACBBC7",
+"G= c #C8D2D9",
+"H= c #E8EAEC",
+"I= c #8A9FB1",
+"J= c #ADB3B9",
+"K= c #B9C0C5",
+"L= c #EAE6E2",
+"M= c #2F4D66",
+"N= c #002E66",
+"O= c #27659A",
+"P= c #A4B3BF",
+"Q= c #51728F",
+"R= c #225D93",
+"S= c #2B5A87",
+"T= c #2B5781",
+"U= c #426282",
+"V= c #576F86",
+"W= c #4A6A89",
+"X= c #28507B",
+"Y= c #456180",
+"Z= c #255384",
+"`= c #205693",
+" - c #B1D1E6",
+".- c #A7CCE5",
+"+- c #A6CAE0",
+"@- c #9DC3DC",
+"#- c #92B9D3",
+"$- c #9EC4DB",
+"%- c #97C4E1",
+"&- c #90BBD7",
+"*- c #8ABBDC",
+"=- c #85BADE",
+"-- c #7CADCC",
+";- c #98B4C8",
+">- c #C9D4DA",
+",- c #89A3B5",
+"'- c #3D6C8F",
+")- c #B1BEC7",
+"!- c #1568A6",
+"~- c #4984AF",
+"{- c #FFFFFB",
+"]- c #EBEEF1",
+"^- c #B2B6B9",
+"/- c #47657D",
+"(- c #D9DCDD",
+"_- c #3F5C76",
+":- c #1E5A8F",
+"<- c #729BBE",
+"[- c #C2D0DC",
+"}- c #B3B8BC",
+"|- c #4B6683",
+"1- c #5B80A4",
+"2- c #6086AA",
+"3- c #53799F",
+"4- c #476D93",
+"5- c #6A839D",
+"6- c #395D82",
+"7- c #336293",
+"8- c #355D8B",
+"9- c #22548B",
+"0- c #215691",
+"a- c #ACCEE4",
+"b- c #A3C9E2",
+"c- c #9CC2DC",
+"d- c #A2C2D6",
+"e- c #ACC1D0",
+"f- c #A5B7C2",
+"g- c #A2B9C7",
+"h- c #B4C8D6",
+"i- c #8CBBDB",
+"j- c #62A3CE",
+"k- c #3788BF",
+"l- c #186CA7",
+"m- c #719AB8",
+"n- c #2C72A4",
+"o- c #3E76A0",
+"p- c #A1B4C0",
+"q- c #1B659C",
+"r- c #CDDBE5",
+"s- c #FFFFFC",
+"t- c #335772",
+"u- c #3D73A0",
+"v- c #6F8598",
+"w- c #3E6A8F",
+"x- c #7D99B1",
+"y- c #738696",
+"z- c #A5A8AB",
+"A- c #1E466A",
+"B- c #1D5287",
+"C- c #3A648B",
+"D- c #547493",
+"E- c #496887",
+"F- c #45678A",
+"G- c #667C93",
+"H- c #37597E",
+"I- c #4F6D8E",
+"J- c #315984",
+"K- c #205289",
+"L- c #215490",
+"M- c #A7CAE1",
+"N- c #9EC4DE",
+"O- c #99C3DF",
+"P- c #98BAD2",
+"Q- c #97B3C6",
+"R- c #88ADC6",
+"S- c #8EAEC3",
+"T- c #98B4C7",
+"U- c #97AFC1",
+"V- c #AFC2D0",
+"W- c #98BDD6",
+"X- c #91B6CF",
+"Y- c #7EA3BE",
+"Z- c #386C91",
+"`- c #9FAFB9",
+" ; c #D0D9DF",
+".; c #004E92",
+"+; c #6795B7",
+"@; c #7594AB",
+"#; c #9CB6CA",
+"$; c #A7ACB0",
+"%; c #001454",
+"&; c #76A6CE",
+"*; c #D2D1D1",
+"=; c #49637F",
+"-; c #2B567F",
+";; c #C8D0D8",
+">; c #597186",
+",; c #084C8B",
+"'; c #296FB0",
+"); c #11579A",
+"!; c #094D8F",
+"~; c #175492",
+"{; c #1A5591",
+"]; c #0E4783",
+"^; c #1A518A",
+"/; c #2B5685",
+"(; c #275382",
+"_; c #1E518B",
+":; c #21548F",
+"<; c #A1C5DE",
+"[; c #98C0DC",
+"}; c #91BDDB",
+"|; c #8CBBDA",
+"1; c #8DBCDC",
+"2; c #8BBBDD",
+"3; c #6BA0C6",
+"4; c #7BA2BE",
+"5; c #8B98A1",
+"6; c #718696",
+"7; c #8E9EAB",
+"8; c #7B8C98",
+"9; c #7390A4",
+"0; c #547994",
+"a; c #CDCBCA",
+"b; c #BFD0DC",
+"c; c #5884A5",
+"d; c #DDDEDE",
+"e; c #F1F2F3",
+"f; c #365C7A",
+"g; c #3B6EA1",
+"h; c #FEFFFF",
+"i; c #4C667C",
+"j; c #265587",
+"k; c #D8E4EE",
+"l; c #A8A8AA",
+"m; c #506B82",
+"n; c #5D80A1",
+"o; c #5E7E9D",
+"p; c #6887A4",
+"q; c #5D81A5",
+"r; c #406993",
+"s; c #1B528B",
+"t; c #245E9B",
+"u; c #255C9A",
+"v; c #1C5696",
+"w; c #1F5693",
+"x; c #235690",
+"y; c #21528D",
+"z; c #93BCD9",
+"A; c #90BAD7",
+"B; c #8DB8D6",
+"C; c #89B6D6",
+"D; c #7BA4C2",
+"E; c #7695AB",
+"F; c #728999",
+"G; c #1B5885",
+"H; c #025B9A",
+"I; c #1D6CA6",
+"J; c #3C79A6",
+"K; c #B9C3C9",
+"L; c #627E93",
+"M; c #265F8A",
+"N; c #E9E4DF",
+"O; c #57748C",
+"P; c #86A3BA",
+"Q; c #F7F7F7",
+"R; c #859BAD",
+"S; c #BFCCD3",
+"T; c #CDCECF",
+"U; c #4F7291",
+"V; c #F3FAFC",
+"W; c #C0B8B1",
+"X; c #0C3B68",
+"Y; c #1D578D",
+"Z; c #2F5E89",
+"`; c #325C86",
+" > c #516F8E",
+".> c #6A7D91",
+"+> c #82909F",
+"@> c #617A93",
+"#> c #194E86",
+"$> c #21528A",
+"%> c #2F5B8B",
+"&> c #27588F",
+"*> c #20538E",
+"=> c #21528C",
+"-> c #97BDD9",
+";> c #8EB8D6",
+">> c #8BB6D5",
+",> c #88B4D3",
+"'> c #8EB8D7",
+")> c #72A6CA",
+"!> c #497DA1",
+"~> c #477291",
+"{> c #1E6497",
+"]> c #68A7D5",
+"^> c #8CAFC8",
+"/> c #487799",
+"(> c #C1D2DE",
+"_> c #657D8F",
+":> c #034E87",
+"<> c #1067AA",
+"[> c #608DAF",
+"}> c #C2CFD9",
+"|> c #8AA5BB",
+"1> c #F8F9FA",
+"2> c #E9E5E2",
+"3> c #929EA8",
+"4> c #DFE4E9",
+"5> c #ECE5DF",
+"6> c #334C63",
+"7> c #315A7F",
+"8> c #88A3BD",
+"9> c #1B5C9D",
+"0> c #2162A0",
+"a> c #1E5D9A",
+"b> c #0A4C90",
+"c> c #134A83",
+"d> c #476586",
+"e> c #496582",
+"f> c #395C82",
+"g> c #365C86",
+"h> c #29527F",
+"i> c #2A5281",
+"j> c #205089",
+"k> c #20518C",
+"l> c #91B9D6",
+"m> c #89B4D3",
+"n> c #86B2D2",
+"o> c #8BB5D4",
+"p> c #76A7CC",
+"q> c #4689BB",
+"r> c #367FB4",
+"s> c #3A7FB4",
+"t> c #6F99B7",
+"u> c #AEB4B7",
+"v> c #52728A",
+"w> c #5380A4",
+"x> c #9FA3A6",
+"y> c #1E547F",
+"z> c #347FBC",
+"A> c #2772AE",
+"B> c #004B90",
+"C> c #C3D3DF",
+"D> c #FEFEFE",
+"E> c #E6E7E8",
+"F> c #3E5B75",
+"G> c #EFF6FC",
+"H> c #2B4760",
+"I> c #003E7B",
+"J> c #08549B",
+"K> c #889EB2",
+"L> c #7C94AC",
+"M> c #0E4F91",
+"N> c #3A70A7",
+"O> c #4172A5",
+"P> c #295F99",
+"Q> c #1B528D",
+"R> c #154C8A",
+"S> c #2F5B8A",
+"T> c #2F5681",
+"U> c #194D89",
+"V> c #1E508A",
+"W> c #1F508B",
+"X> c #8CB5D4",
+"Y> c #83AFD0",
+"Z> c #87B1D1",
+"`> c #7BAACC",
+" , c #4C8BBB",
+"., c #4084B8",
+"+, c #4681AF",
+"@, c #7291A8",
+"#, c #5A7C96",
+"$, c #366080",
+"%, c #3F7097",
+"&, c #92A8BB",
+"*, c #426580",
+"=, c #216BA4",
+"-, c #1D6AA8",
+";, c #4684B4",
+">, c #648CAD",
+",, c #778597",
+"', c #DDE0E2",
+"), c #E9EFF4",
+"!, c #CCC5BF",
+"~, c #285885",
+"{, c #185FA3",
+"], c #1F609F",
+"^, c #35618C",
+"/, c #969FA7",
+"(, c #8296AB",
+"_, c #3C6086",
+":, c #7A8B9D",
+"<, c #315983",
+"[, c #1B5593",
+"}, c #255A94",
+"|, c #1F5591",
+"1, c #1C508D",
+"2, c #22538D",
+"3, c #21538E",
+"4, c #20508B",
+"5, c #1F4F8A",
+"6, c #87B1D0",
+"7, c #80ACCE",
+"8, c #5691BD",
+"9, c #4383B5",
+"0, c #4587B9",
+"a, c #477EA9",
+"b, c #3A6B8F",
+"c, c #2D6997",
+"d, c #4578A1",
+"e, c #6587A3",
+"f, c #537088",
+"g, c #155C96",
+"h, c #2571AD",
+"i, c #93B2CB",
+"j, c #B2B7BA",
+"k, c #3A5F7D",
+"l, c #00336E",
+"m, c #688AA7",
+"n, c #E5E9EC",
+"o, c #E4E8ED",
+"p, c #A9B0B7",
+"q, c #35536F",
+"r, c #CFD6DC",
+"s, c #306294",
+"t, c #044E96",
+"u, c #5C7FA4",
+"v, c #597694",
+"w, c #8A9AA9",
+"x, c #57708B",
+"y, c #0D3E72",
+"z, c #215389",
+"A, c #235893",
+"B, c #22548F",
+"C, c #21548E",
+"D, c #20518B",
+"E, c #1F4F89",
+"F, c #1F4D88",
+"G, c #81ACCD",
+"H, c #6599C2",
+"I, c #4483B5",
+"J, c #4885B6",
+"K, c #4383B4",
+"L, c #3E7EAF",
+"M, c #397DB2",
+"N, c #3B7BAE",
+"O, c #1E66A1",
+"P, c #5E88A9",
+"Q, c #517897",
+"R, c #216BA7",
+"S, c #3D78A9",
+"T, c #98A4AE",
+"U, c #3D5D77",
+"V, c #0F5794",
+"W, c #1A69AC",
+"X, c #3A71A2",
+"Y, c #F8F6F5",
+"Z, c #5B7288",
+"`, c #003779",
+" ' c #57748E",
+".' c #657A8F",
+"+' c #316497",
+"@' c #446F9B",
+"#' c #687D94",
+"$' c #3E6894",
+"%' c #778A9E",
+"&' c #2E5682",
+"*' c #295A90",
+"=' c #205590",
+"-' c #22558F",
+";' c #21538D",
+">' c #21518C",
+",' c #20508A",
+"'' c #1F4E89",
+")' c #1E4C87",
+"!' c #7DA8CB",
+"~' c #72A1C6",
+"{' c #4D88B7",
+"]' c #4683B4",
+"^' c #4280B1",
+"/' c #3E7DB0",
+"(' c #3B7BB0",
+"_' c #3679AF",
+":' c #3E78A7",
+"<' c #456D8F",
+"[' c #2C628F",
+"}' c #386F9C",
+"|' c #567A99",
+"1' c #436581",
+"2' c #185B92",
+"3' c #3274AE",
+"4' c #1B609E",
+"5' c #3A6F9E",
+"6' c #F0F0F0",
+"7' c #F2EEE9",
+"8' c #2B4F73",
+"9' c #0F569B",
+"0' c #2E5D8C",
+"a' c #3C6287",
+"b' c #3A638C",
+"c' c #164D86",
+"d' c #345D88",
+"e' c #325A86",
+"f' c #245182",
+"g' c #245388",
+"h' c #20528C",
+"i' c #204F8A",
+"j' c #1F4D87",
+"k' c #1E4C86",
+"l' c #5D91BC",
+"m' c #4480B2",
+"n' c #4882B2",
+"o' c #447FB1",
+"p' c #407DAF",
+"q' c #3C7AAD",
+"r' c #3978AD",
+"s' c #3776AB",
+"t' c #376D9B",
+"u' c #2C6596",
+"v' c #306FA4",
+"w' c #2B699E",
+"x' c #2C6291",
+"y' c #255D8D",
+"z' c #2C6DA6",
+"A' c #2C6AA2",
+"B' c #1A5E9C",
+"C' c #3B6E9D",
+"D' c #F1F1F1",
+"E' c #CACBCD",
+"F' c #11406F",
+"G' c #1F61A1",
+"H' c #316498",
+"I' c #3E648B",
+"J' c #19528D",
+"K' c #255C95",
+"L' c #1D5895",
+"M' c #245487",
+"N' c #1E5189",
+"O' c #1E538E",
+"P' c #215491",
+"Q' c #1E4D88",
+"R' c #1D4C87",
+"S' c #1E4A86",
+"T' c #6F9CC2",
+"U' c #4E85B4",
+"V' c #4680B1",
+"W' c #457FB0",
+"X' c #427CAF",
+"Y' c #3E7AAD",
+"Z' c #3B78AC",
+"`' c #3875AA",
+" ) c #3573A8",
+".) c #3270A7",
+"+) c #306EA5",
+"@) c #2E6EA6",
+"#) c #2F6FA6",
+"$) c #2B69A2",
+"%) c #2A69A2",
+"&) c #2D6AA2",
+"*) c #2B679F",
+"=) c #185A99",
+"-) c #3E709E",
+";) c #F6F4F3",
+">) c #ABB3BA",
+",) c #073C72",
+"') c #26619E",
+")) c #235D98",
+"!) c #24568A",
+"~) c #26598F",
+"{) c #245B96",
+"]) c #215792",
+"^) c #225690",
+"/) c #235590",
+"() c #22548E",
+"_) c #20538C",
+":) c #1D4A85",
+"<) c #467FB0",
+"[) c #477FB0",
+"}) c #447DAE",
+"|) c #407BAD",
+"1) c #3D78AB",
+"2) c #3A75A9",
+"3) c #3773A8",
+"4) c #3370A6",
+"5) c #326FA6",
+"6) c #306EA4",
+"7) c #2D6BA2",
+"8) c #2D6AA1",
+"9) c #2D69A2",
+"0) c #2B68A0",
+"a) c #2B669E",
+"b) c #2A669D",
+"c) c #125493",
+"d) c #4676A4",
+"e) c #FEFDFB",
+"f) c #98A3AF",
+"g) c #003871",
+"h) c #26609C",
+"i) c #255C94",
+"j) c #235B96",
+"k) c #235892",
+"l) c #235691",
+"m) c #1F508A",
+"n) c #1E4B86",
+"o) c #1E4A85",
+"p) c #1D4984",
+"q) c #5688B5",
+"r) c #447CAE",
+"s) c #457DAE",
+"t) c #427AAC",
+"u) c #3E77AB",
+"v) c #3C75A9",
+"w) c #3873A7",
+"x) c #3571A5",
+"y) c #326FA4",
+"z) c #316DA3",
+"A) c #2F6BA1",
+"B) c #2D69A1",
+"C) c #2D689F",
+"D) c #2C669E",
+"E) c #2A659D",
+"F) c #2A659C",
+"G) c #074B8D",
+"H) c #5B83AB",
+"I) c #A5B0BB",
+"J) c #003671",
+"K) c #255E9A",
+"L) c #245A93",
+"M) c #235792",
+"N) c #22568F",
+"O) c #1D4985",
+"P) c #1C4984",
+"Q) c #1C4883",
+"R) c #4D81AF",
+"S) c #457AAC",
+"T) c #4379AB",
+"U) c #4077AA",
+"V) c #3D75A8",
+"W) c #3A73A7",
+"X) c #3770A5",
+"Y) c #346EA4",
+"Z) c #326DA2",
+"`) c #306AA1",
+" ! c #2E69A0",
+".! c #2D679F",
+"+! c #2A649B",
+"@! c #29639B",
+"#! c #25609A",
+"$! c #084786",
+"%! c #C2D0DF",
+"&! c #355E8B",
+"*! c #134D8E",
+"=! c #235790",
+"-! c #21508B",
+";! c #1E4B87",
+">! c #1D4B86",
+",! c #1C4884",
+"'! c #1C4782",
+")! c #497CAC",
+"!! c #4478AA",
+"~! c #4176A9",
+"{! c #3E75A7",
+"]! c #3B73A6",
+"^! c #3970A5",
+"/! c #366FA3",
+"(! c #346DA2",
+"_! c #316AA1",
+":! c #2F689F",
+"<! c #2D689E",
+"[! c #2B659D",
+"}! c #2B639B",
+"|! c #286299",
+"1! c #286199",
+"2! c #245B93",
+"3! c #8A9BAC",
+"4! c #949DA7",
+"5! c #949EAA",
+"6! c #949EA9",
+"7! c #9DA3AA",
+"8! c #4F6A88",
+"9! c #114988",
+"0! c #22558E",
+"a! c #1F4E88",
+"b! c #1D4883",
+"c! c #1B4782",
+"d! c #477AAB",
+"e! c #4579A9",
+"f! c #4276A8",
+"g! c #3F74A6",
+"h! c #3D72A5",
+"i! c #396FA3",
+"j! c #376DA2",
+"k! c #346BA1",
+"l! c #31699F",
+"m! c #30679D",
+"n! c #2D659D",
+"o! c #2B649B",
+"p! c #296199",
+"q! c #275F97",
+"r! c #275E96",
+"s! c #285F97",
+"t! c #073E77",
+"u! c #002F66",
+"v! c #003068",
+"w! c #002F67",
+"x! c #18487E",
+"y! c #275992",
+"z! c #225590",
+"A! c #1E4D87",
+"B! c #1C4683",
+" ",
+" ",
+" ",
+" . . + @ # $ % & * = - ; > , ' ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+" b b c d . e f g h i j k l m n o p q r s t u _ v w x y z A B C D E F G H I J K L M ",
+" + N O P P Q R f S T U V W m X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._. ",
+" + :.P & P Q <.g [.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u. ",
+" + Q P P * . e v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.b.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+ ",
+" + . Q Q . e ++@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+q.4+5+6+7+8+ ",
+" # R = 9+e 0+a+b+c+d+e+f+g+h+` i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+ ",
+" $ f f J+g S K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@ ",
+" ]@^@S [.h }./@(@_@:@<@[@}@|@1@2@3@4@5@6@Z 7@8@9@0@a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@ ",
+" & h x.x.i r@s@t@u@v@w@x@y@z@A@B@C@B.D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@X@o@Y@Z@ ",
+" * `@#+ #j .#+#@###$#%#v@&#*#=#-#;#>#,#'#)#!#~#: {#]#^#/#(#_#:#<#[#}#|#1#2#3#4#5#6#7# ",
+" e j 8#k 9#0#2.a#b#c#] d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#A#B#C#D#E#F#G#H# ",
+" - I#I#J#K#L#M#N#O#P#Q#R#S#T#U#V#W#X#Y#Z#`# $.$+$@$#$$$%$&$*$=$-$;$>$,$'$)$!$~${$]$^$ ",
+" /$($_$:$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$f$g$h$i$j$k$l$m$n$o$p$q$r$s$t$u$v$w$x$ ",
+" y$z$A$B$C$D$y@E$F$G$H$I$J$K$L$M$N$O$P$Q$R$p+S$T$U$V$W$X$A+Y$Z$`$ %.%+%@%#%$%%%&%*%=% ",
+" -%;%>%,%'%)%!%~%{%]%^%/%(%_%:%<%@$[%}%|%1%2%3%4%5%6%7%8%9%0%a%b%c%d%e%f%g%h%i%j%k%l% ",
+" m%n%o%p%q%r%s%t%u%v%w%x%y%z%A%B%C%D%E%F%G%H%I%J%K%L%M%N%O%P%Q%U$R%S%T%U%V%W%X%Y%Z%`% ",
+" &.&+&@&#&$&%&&&*&=&-&;&>&,&'&)&!&~&{&]&^&/&(&_&:&<&[&}&|&1&U$2&3&4&5&6&7&8&9&0&a&b& ",
+" c&d&R+e&T#f&g&h&i&j&k&l&m&n&o&p&q&r&s&t&u&v&w&x&y&z&A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P& ",
+" Q&R&S&T&U&V&+.W&X&Y&Z&`& *.*+*@*#*$*%*&***=*-*U$;*>*,*'*)*!*~*{*]*^*/*(*_*:*<*[*}*P& ",
+" |*1*2*k#3*4*5*6*7*8*9*0*a*b*c*d*e*f*g*h*U$i*j*u&k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z*P&A* ",
+" B*C*D*E*F*G*H*I*J*K*L*M*N*O*P*Q*R*S*T*U*U$V*W*X*Y*Z*`* =.=+=@=#=$=%=&=*===-=;=>=A*,= ",
+" '=)=!=~={=]=^=/=(=_=:=<=[=}=|=1=2=3=4=5=U$6=7=8=9=0=a=b=c=d=e=f=g=h=i=j=k=l=m=n=o=p= ",
+" q=r=s=t=L$u=v=w=w=x=y=N*z=A=B=C=D=E=F=G=U$H=J@I=J=K=L=M=N=O=P=Q=R=S=T=U=V=W=X=Y=Z=`= ",
+" -.-+-@-#-$-%-&-*-=---;-_+>-,-'-)-!-~-{-U$U$]-^-/-(-_-:-<-[-}-|-1-2-3-4-5-6-7-8-9-0- ",
+" a-b-c-d-e-f-^+g-h-i-j-k-l-m-u&n-o-p-q-r-U$U$s-t-u-v-w-x-y-z-A-B-C-D-E-F-G-H-I-J-K-L- ",
+" M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-`- ;.;+;@;#;U$U$$;%;&;*;=;-;;;>;,;';);!;~;{;];^;/;(;_;:; ",
+" <;[;-.};|;1;2;3;4;5;6;7;8;9;0;a;b;c;d;e;U$**f;g;h;i;j;k;l;m;n;o;p;q;r;s;t;u;v;w;x;y; ",
+" c-z;A;B;C;B;D;E;F;G;H;I;J;K;L;M;N;O;P;U$U$Q;R;S;T;U;V;W;X;Y;Z;`; >.>+>@>#>$>%>&>*>=> ",
+" ->;>>>,>'>)>!>~>{>]>^>/>(>_>:><>[>}>|>U$U$1>2>3>4>5>6>7>8>9>0>a>b>c>d>e>f>g>h>i>j>k> ",
+" l>m>n>o>p>q>r>s>t>u>v>w>x>y>z>A>B>C>U$D>U$E>F>G>U$H>I>J>K>L>M>N>O>P>Q>R>S>T>U>V>j>W> ",
+" X>Y>Z>`> ,.,+,@,#,$,%,&,*,=,-,;,>,,,D%U$U$',7>),!,~,{,],^,/,(,_,:,<,[,},|,1,2,3,4,5, ",
+" 6,l.7,8,9,0,a,b,c,d,e,f,g,h,i,j,k,l,m,U$U$n,o,p,q,r,s,t,u,v,w,x,y,z,A,x;B,C,=>D,E,F, ",
+" G,E H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,U$U$U$Z,`, '.'+'@'#'$'%'&'*'='-';'>'4,,''')' ",
+" !'~'{']']'^'/'('_':'<'['}'|'1'2'3'4'5'6'U$U$7'8'9'0'a'b'c'd'e'f'&'g'3,C,h'4,i'''j'k' ",
+" !.l'm'n'o'p'q'r's't'u'v'w'x'y'z'A'B'C'D'U$U$E'F'G'H'I'J'K'L'M'N'O'P'2,=>D,5,''Q'R'S' ",
+" T'U'V'W'X'Y'Z'`' ).)+)@)#)$)%)&)*)=)-);)U$U$>),)')))!)~){)A,])^)/)()_)4,i'''Q'k'S':) ",
+" 4+<)[)})|)1)2)3)4)5)6)7)8)9)0)a)b)c)d)e)U$U$f)g)h)i)j),=k)l)^)-';'=>D,m)''F,)'n)o)p) ",
+" q)r)s)t)u)v)w)x)y)z)A)B)C)D)E)F)F)G)H)U$U$U$I)J)K)L)>=M)^)N)C,;'h'4,,'''F,)'n)O)P)Q) ",
+" R)S)T)U)V)W)X)Y)Z)`) !.!D)w$+!@!#!$!%!U$U$U$U$&!*!k)=!x;B,;'y;=>-!E,''F,;!>!:)p),!'! ",
+" )!!!~!{!]!^!/!(!_!:!<![!}!@!|!1!))2!3!4!5!6!7!8!9!M)-'0!2,y;k>4,5,a!Q')'n):)P)b!c! ",
+" d!e!f!g!h!i!j!k!l!m!n!o!x$p!q!r!s!l%t!u!v!w!N=x!y!z!();'k>4,,'''F,A!k':):)p)Q)B! ",
+" ",
+" ",
+" "};
diff --git a/dependencies/eclipse/3.2/linux/i386/org.eclipse.swt.gtk.linux.x86_3.2.1.v3235.jar b/dependencies/eclipse/3.2/linux/i386/org.eclipse.swt.gtk.linux.x86_3.2.1.v3235.jar
new file mode 100644
index 0000000..b5212d4
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/i386/org.eclipse.swt.gtk.linux.x86_3.2.1.v3235.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/linux/i386/rcp/configuration/config.ini b/dependencies/eclipse/3.2/linux/i386/rcp/configuration/config.ini
new file mode 100644
index 0000000..5ae9d2f
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/i386/rcp/configuration/config.ini
@@ -0,0 +1,9 @@
+#Product Runtime Configuration File
+
+osgi.splashPath=platform:/base/plugins/org.apache.directory.studio
+eclipse.product=org.apache.directory.studio.product
+osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
+osgi.bundles.defaultStartLevel=4
+
+# The workspace location
+osgi.instance.area.default=@user.home/.ApacheDirectoryStudio
diff --git a/dependencies/eclipse/3.2/linux/i386/rcp/eclipse b/dependencies/eclipse/3.2/linux/i386/rcp/eclipse
new file mode 100755
index 0000000..7488ce5
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/i386/rcp/eclipse
Binary files differ
diff --git a/dependencies/eclipse/3.2/linux/i386/rcp/startup.jar b/dependencies/eclipse/3.2/linux/i386/rcp/startup.jar
new file mode 100644
index 0000000..3b77344
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/i386/rcp/startup.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/linux/i386/rcp/studio.xpm b/dependencies/eclipse/3.2/linux/i386/rcp/studio.xpm
new file mode 100644
index 0000000..400a037
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/i386/rcp/studio.xpm
@@ -0,0 +1,1590 @@
+/* XPM */
+static char * test2_xpm[] = {
+"48 48 1539 2",
+" c None",
+". c #E5F4FB",
+"+ c #EFF8FC",
+"@ c #EEF8FC",
+"# c #EDF7FC",
+"$ c #ECF7FC",
+"% c #EAF6FC",
+"& c #E8F5FB",
+"* c #E7F4FB",
+"= c #E5F3FA",
+"- c #E2F1F9",
+"; c #E0F0F8",
+"> c #DDEEF7",
+", c #DAECF5",
+"' c #D6E9F4",
+") c #D3E8F4",
+"! c #CEE4F0",
+"~ c #CBE2F0",
+"{ c #C8E1F0",
+"] c #C3DEEE",
+"^ c #BFDBEC",
+"/ c #BAD8EB",
+"( c #B6D4E8",
+"_ c #B1D1E5",
+": c #ACCDE3",
+"< c #A7C9E0",
+"[ c #A2C5DE",
+"} c #9DC1DB",
+"| c #97BDD8",
+"1 c #92B8D6",
+"2 c #8DB4D2",
+"3 c #88B0CF",
+"4 c #82ABCC",
+"5 c #7DA7C9",
+"6 c #77A2C6",
+"7 c #729DC3",
+"8 c #6D99BF",
+"9 c #6894BC",
+"0 c #628EB8",
+"a c #5F8BB6",
+"b c #F2FAFD",
+"c c #EFF8FD",
+"d c #E6F5FB",
+"e c #E4F3FA",
+"f c #E3F3FA",
+"g c #E2F2FA",
+"h c #E0F1F9",
+"i c #DEF0F9",
+"j c #DBEEF8",
+"k c #D9EDF7",
+"l c #D8EDF8",
+"m c #D4EAF5",
+"n c #C9DBE5",
+"o c #C9D9E2",
+"p c #C7DBE6",
+"q c #BBCDD8",
+"r c #BDD3DF",
+"s c #BEDBEC",
+"t c #B9D8EC",
+"u c #B7D5E8",
+"v c #ADD1E6",
+"w c #A8CDE5",
+"x c #A3C8E1",
+"y c #9EC4DD",
+"z c #9AC0DB",
+"A c #95BCD9",
+"B c #90B8D6",
+"C c #8BB4D3",
+"D c #85AFCF",
+"E c #81ABCD",
+"F c #7BA7CA",
+"G c #76A2C6",
+"H c #729EC3",
+"I c #6C99C0",
+"J c #6794BC",
+"K c #6290B9",
+"L c #5D8BB6",
+"M c #5F8BB5",
+"N c #F3FAFE",
+"O c #E8F5FC",
+"P c #E7F5FB",
+"Q c #E6F4FB",
+"R c #E5F4FA",
+"S c #E1F2FA",
+"T c #E0F0F9",
+"U c #DEF0F8",
+"V c #DCEFF9",
+"W c #DAEFFA",
+"X c #CDE1ED",
+"Y c #D1DBE1",
+"Z c #C8D4DB",
+"` c #C3D2DA",
+" . c #B9C7CF",
+".. c #BCCAD3",
+"+. c #B6CAD6",
+"@. c #B0C8D7",
+"#. c #B6CCDB",
+"$. c #ACC4D2",
+"%. c #A7C8DD",
+"&. c #A3C6DE",
+"*. c #9FC3DB",
+"=. c #9DC4DF",
+"-. c #96BEDA",
+";. c #92BAD7",
+">. c #8DB7D5",
+",. c #88B2D1",
+"'. c #83AECF",
+"). c #7EA9CC",
+"!. c #79A4C8",
+"~. c #74A0C6",
+"{. c #6F9CC3",
+"]. c #6A98BF",
+"^. c #6693BB",
+"/. c #608FB8",
+"(. c #5C8AB5",
+"_. c #5D89B5",
+":. c #F2F9FD",
+"<. c #E4F4FB",
+"[. c #E1F1FA",
+"}. c #DFF1FA",
+"|. c #DDF0FA",
+"1. c #D9ECF4",
+"2. c #D3E7F2",
+"3. c #D0E1EB",
+"4. c #CBDAE3",
+"5. c #C9D7DE",
+"6. c #C8D7E0",
+"7. c #BED1DB",
+"8. c #C7CED2",
+"9. c #BAC7CE",
+"0. c #BBCCD5",
+"a. c #BBC9D0",
+"b. c #ACC3D1",
+"c. c #AFC0CB",
+"d. c #A1BBCB",
+"e. c #A5C0D1",
+"f. c #9BBCD3",
+"g. c #98C2E0",
+"h. c #94BDDB",
+"i. c #8FBAD9",
+"j. c #89B5D4",
+"k. c #84B1D1",
+"l. c #81ACCE",
+"m. c #7BA8CA",
+"n. c #76A3C7",
+"o. c #719FC4",
+"p. c #6C9AC1",
+"q. c #6796BE",
+"r. c #6391BB",
+"s. c #5F8DB7",
+"t. c #5A88B4",
+"u. c #5A87B3",
+"v. c #E3F4FC",
+"w. c #E1F3FC",
+"x. c #DFF0F9",
+"y. c #DAE9F1",
+"z. c #CEDFE7",
+"A. c #D2DEE5",
+"B. c #CFD9DF",
+"C. c #CAD5DB",
+"D. c #C0D2DC",
+"E. c #BDD0DB",
+"F. c #D1DFE6",
+"G. c #C5D3DB",
+"H. c #BBC9D2",
+"I. c #C1D2DC",
+"J. c #B2C7D4",
+"K. c #C1CDD5",
+"L. c #B2C5D1",
+"M. c #9BB5C6",
+"N. c #9FBACC",
+"O. c #94B7CF",
+"P. c #8FB8D6",
+"Q. c #8CB3D0",
+"R. c #86B1D1",
+"S. c #81ADCF",
+"T. c #7BA9CD",
+"U. c #79A6CA",
+"V. c #72A0C5",
+"W. c #6F9DC3",
+"X. c #6A98C0",
+"Y. c #6594BC",
+"Z. c #608FBA",
+"`. c #5C8BB6",
+" + c #5886B3",
+".+ c #5685B1",
+"++ c #E3F2F9",
+"@+ c #DEEEF5",
+"#+ c #DDEFF8",
+"$+ c #D9EAF2",
+"%+ c #D4DEE3",
+"&+ c #C7D5DD",
+"*+ c #DCE6EB",
+"=+ c #DBDEE0",
+"-+ c #BDD0D9",
+";+ c #D5DFE5",
+">+ c #BCCCD5",
+",+ c #BFD4E1",
+"'+ c #BED2DE",
+")+ c #C6D8E2",
+"!+ c #C2CFD8",
+"~+ c #BACCD7",
+"{+ c #A6BBC9",
+"]+ c #BCCFDA",
+"^+ c #B8C9D4",
+"/+ c #8FB0C6",
+"(+ c #92B1C5",
+"_+ c #9BB1C0",
+":+ c #91AFC4",
+"<+ c #83A4BC",
+"[+ c #7DA5C3",
+"}+ c #7CA4C3",
+"|+ c #83A8C4",
+"1+ c #739FC1",
+"2+ c #70A0C6",
+"3+ c #6C9BC2",
+"4+ c #6192BB",
+"5+ c #5D8DB8",
+"6+ c #5989B5",
+"7+ c #5586B1",
+"8+ c #5181AE",
+"9+ c #E4F3FB",
+"0+ c #E3F3FB",
+"a+ c #E1F3FB",
+"b+ c #DCE7EC",
+"c+ c #D3DFE6",
+"d+ c #D3E0E7",
+"e+ c #D0DFE6",
+"f+ c #D1DDE4",
+"g+ c #D0DFE7",
+"h+ c #CFD5D9",
+"i+ c #CEE1EA",
+"j+ c #C4CED3",
+"k+ c #AFC7D5",
+"l+ c #C2D4DD",
+"m+ c #C6D6E0",
+"n+ c #C3CFD5",
+"o+ c #B5BFC4",
+"p+ c #9CB5C6",
+"q+ c #B2C9D8",
+"r+ c #A9BCC9",
+"s+ c #94B7CD",
+"t+ c #94BDDA",
+"u+ c #A3B7C5",
+"v+ c #90A5B5",
+"w+ c #82A4BC",
+"x+ c #8FAFC6",
+"y+ c #96ADBE",
+"z+ c #829BAE",
+"A+ c #6D96B6",
+"B+ c #6C9EC6",
+"C+ c #6898C0",
+"D+ c #6393BC",
+"E+ c #5F8EBA",
+"F+ c #5A8AB7",
+"G+ c #5587B3",
+"H+ c #5485B1",
+"I+ c #4C7CAC",
+"J+ c #E3F2FA",
+"K+ c #DEF1FA",
+"L+ c #D6E2E9",
+"M+ c #EBEBEC",
+"N+ c #D6E4EB",
+"O+ c #CADCE5",
+"P+ c #DFEAEF",
+"Q+ c #D7E3E8",
+"R+ c #B9CFDB",
+"S+ c #D5DBDD",
+"T+ c #C2D9E5",
+"U+ c #C6D7E1",
+"V+ c #CAD3D8",
+"W+ c #C7D3DA",
+"X+ c #C4D3DB",
+"Y+ c #B2C3CD",
+"Z+ c #B6C0C7",
+"`+ c #B1C7D4",
+" @ c #A0BED1",
+".@ c #A6BAC7",
+"+@ c #93B3C7",
+"@@ c #9CBED5",
+"#@ c #92AEC1",
+"$@ c #ABBBC6",
+"%@ c #82A3BC",
+"&@ c #92B7D1",
+"*@ c #B0B8BE",
+"=@ c #728EA4",
+"-@ c #6595BC",
+";@ c #699BC5",
+">@ c #6595BE",
+",@ c #6092BB",
+"'@ c #5B8DB8",
+")@ c #5789B5",
+"!@ c #5384B2",
+"~@ c #5282B0",
+"{@ c #4477A8",
+"]@ c #EAF6FB",
+"^@ c #E1F2F9",
+"/@ c #DAE9F0",
+"(@ c #D0E2EB",
+"_@ c #ECF0F0",
+":@ c #ECF0F2",
+"<@ c #C9DCE5",
+"[@ c #D1E1E9",
+"}@ c #D4E0E6",
+"|@ c #CCDCE3",
+"1@ c #D3DADE",
+"2@ c #C5D5DF",
+"3@ c #C3DCEA",
+"4@ c #D6DBDD",
+"5@ c #BDC8CF",
+"6@ c #D0D8DD",
+"7@ c #CBD4D9",
+"8@ c #ABC1CF",
+"9@ c #9DBED4",
+"0@ c #B7C2C9",
+"a@ c #97B1C2",
+"b@ c #8AAAC1",
+"c@ c #91B3CB",
+"d@ c #9DB4C4",
+"e@ c #5F8DAF",
+"f@ c #ABC6D9",
+"g@ c #BABDC0",
+"h@ c #5A84A4",
+"i@ c #6E9CC2",
+"j@ c #6C95B7",
+"k@ c #5E8FB8",
+"l@ c #598EBB",
+"m@ c #598BB7",
+"n@ c #5486B3",
+"o@ c #5182B0",
+"p@ c #4D7FAD",
+"q@ c #3B70A3",
+"r@ c #DDF1FB",
+"s@ c #D7E6EE",
+"t@ c #D6E0E6",
+"u@ c #CADFEA",
+"v@ c #DCE3E7",
+"w@ c #DBE0E4",
+"x@ c #C0D6E3",
+"y@ c #CCDFE9",
+"z@ c #CFDADF",
+"A@ c #E5EBEE",
+"B@ c #DBE0E3",
+"C@ c #C1D5E0",
+"D@ c #A9C0CD",
+"E@ c #E0EDF3",
+"F@ c #E4E6E7",
+"G@ c #A5B4BE",
+"H@ c #98B6C9",
+"I@ c #B0CFE2",
+"J@ c #BFC5C9",
+"K@ c #95ADBE",
+"L@ c #8DADC4",
+"M@ c #86ADC9",
+"N@ c #92ACC0",
+"O@ c #759FBE",
+"P@ c #A6B7C4",
+"Q@ c #718CA1",
+"R@ c #759EBE",
+"S@ c #9EAFBC",
+"T@ c #537DA0",
+"U@ c #4E86B5",
+"V@ c #6A93B6",
+"W@ c #5685AF",
+"X@ c #5184B3",
+"Y@ c #4678AA",
+"Z@ c #31689F",
+"`@ c #DEEFF9",
+" # c #DCEFF8",
+".# c #DAEEF9",
+"+# c #D6EBF7",
+"@# c #CEDAE0",
+"## c #D7DFE4",
+"$# c #CBE2EF",
+"%# c #DDE4E8",
+"&# c #BCD8E7",
+"*# c #C0D1DB",
+"=# c #C7D4DC",
+"-# c #BDC9D0",
+";# c #D7DDE0",
+"># c #D2D7DB",
+",# c #9DBDD1",
+"'# c #BDDBED",
+")# c #BFCAD1",
+"!# c #B2C1CB",
+"~# c #A0BDCF",
+"{# c #C7CCCF",
+"]# c #9FB1BC",
+"^# c #77A1BF",
+"/# c #93BBD7",
+"(# c #9CAFBC",
+"_# c #85A6BF",
+":# c #89A3B6",
+"<# c #5A89AD",
+"[# c #7E9DB6",
+"}# c #547C9D",
+"|# c #749DBE",
+"1# c #AABCCB",
+"2# c #5C7E9B",
+"3# c #4D80AD",
+"4# c #4E83B2",
+"5# c #4E80AF",
+"6# c #3A70A4",
+"7# c #2C659C",
+"8# c #DAEEF7",
+"9# c #D9EEF8",
+"0# c #D7ECF8",
+"a# c #CAE1ED",
+"b# c #CEDCE3",
+"c# c #CAD9E1",
+"d# c #DEE4E8",
+"e# c #C3D6E1",
+"f# c #B5CDDA",
+"g# c #C6D0D6",
+"h# c #AEC6D6",
+"i# c #B5CCDA",
+"j# c #EEE9E6",
+"k# c #B6CDDA",
+"l# c #93C2E0",
+"m# c #B8CAD6",
+"n# c #CBD0D2",
+"o# c #8CAFC6",
+"p# c #A4C8DF",
+"q# c #CBCDCE",
+"r# c #96ABB9",
+"s# c #609AC2",
+"t# c #B2CBDD",
+"u# c #94A9B8",
+"v# c #81A0B8",
+"w# c #7397B4",
+"x# c #779CBA",
+"y# c #6C91AE",
+"z# c #6E96B7",
+"A# c #AAB8C4",
+"B# c #939EA7",
+"C# c #3D709C",
+"D# c #4E84B5",
+"E# c #4F81B1",
+"F# c #477BAC",
+"G# c #2E679E",
+"H# c #2E659C",
+"I# c #D8EDF7",
+"J# c #D7EBF6",
+"K# c #D3E7F1",
+"L# c #D3ECF8",
+"M# c #CFE4ED",
+"N# c #CFDAE0",
+"O# c #C6E1EF",
+"P# c #BFD5E0",
+"Q# c #C4D9E4",
+"R# c #C4D8E3",
+"S# c #B7CDD9",
+"T# c #BDD5E3",
+"U# c #D3E1E7",
+"V# c #D6E1E8",
+"W# c #8ABBD8",
+"X# c #CADDE8",
+"Y# c #E0E3E5",
+"Z# c #79AECE",
+"`# c #C2DBEA",
+" $ c #C7CBCD",
+".$ c #6DA0C2",
+"+$ c #AACCE3",
+"@$ c #F4EEEA",
+"#$ c #82A4BD",
+"$$ c #76ACD2",
+"%$ c #8DA8BC",
+"&$ c #799AB3",
+"*$ c #7499B5",
+"=$ c #6594B8",
+"-$ c #88A5BC",
+";$ c #9AB1C2",
+">$ c #C6C8CA",
+",$ c #7E909F",
+"'$ c #30638F",
+")$ c #5088BA",
+"!$ c #5685B0",
+"~$ c #5F83A5",
+"{$ c #326BA0",
+"]$ c #29639C",
+"^$ c #2D649B",
+"/$ c #DFEFF8",
+"($ c #D6EBF6",
+"_$ c #D5EBF6",
+":$ c #D3E8F5",
+"<$ c #CDDEE7",
+"[$ c #CBDFEA",
+"}$ c #CAE7F5",
+"|$ c #C9DBE4",
+"1$ c #C8D9E2",
+"2$ c #BCD3E0",
+"3$ c #B8D0DD",
+"4$ c #D4E0E7",
+"5$ c #CCDCE4",
+"6$ c #C5D7E2",
+"7$ c #C6D3DB",
+"8$ c #CDD8DE",
+"9$ c #B6D3E4",
+"0$ c #8EC1DF",
+"a$ c #D2DCE1",
+"b$ c #ACC1CE",
+"c$ c #B4CDDC",
+"d$ c #B0C0CB",
+"e$ c #669EC3",
+"f$ c #BCD9EC",
+"g$ c #FFFDF8",
+"h$ c #88A5B9",
+"i$ c #87ABC5",
+"j$ c #7B9AB1",
+"k$ c #6E95B2",
+"l$ c #6A9ABF",
+"m$ c #9BB4C7",
+"n$ c #92A4B4",
+"o$ c #B4BDC3",
+"p$ c #919EA8",
+"q$ c #4B779C",
+"r$ c #7498B7",
+"s$ c #3971A2",
+"t$ c #6890B4",
+"u$ c #587A9A",
+"v$ c #1E5C98",
+"w$ c #2A649D",
+"x$ c #2A629A",
+"y$ c #DCEDF7",
+"z$ c #D3E9F5",
+"A$ c #D1E9F5",
+"B$ c #CFE8F5",
+"C$ c #C9DEE9",
+"D$ c #C9D5DA",
+"E$ c #BEDBEB",
+"F$ c #BFD1DB",
+"G$ c #D5DADD",
+"H$ c #B4D1E1",
+"I$ c #B1D0E1",
+"J$ c #DFE4E7",
+"K$ c #ADC1CC",
+"L$ c #A8C0CF",
+"M$ c #CBD5DC",
+"N$ c #C4D0D8",
+"O$ c #86B9D9",
+"P$ c #ABCBDF",
+"Q$ c #EDE7E4",
+"R$ c #B9C9D4",
+"S$ c #649CC1",
+"T$ c #BDD6E7",
+"U$ c #FFFFFF",
+"V$ c #A0B0BC",
+"W$ c #799AB1",
+"X$ c #869EB0",
+"Y$ c #98B7CF",
+"Z$ c #829AAC",
+"`$ c #5F809B",
+" % c #CBD0D3",
+".% c #91A4B4",
+"+% c #40749E",
+"@% c #7C96AC",
+"#% c #7494B0",
+"$% c #8EA3B5",
+"%% c #3F6385",
+"&% c #2A639A",
+"*% c #29639D",
+"=% c #2A6199",
+"-% c #D9EBF6",
+";% c #D0E7F4",
+">% c #CDE7F4",
+",% c #CDE8F8",
+"'% c #C7E1EE",
+")% c #C1D1DA",
+"!% c #D5DBDF",
+"~% c #C3D5DE",
+"{% c #AFCAD7",
+"]% c #CED8DE",
+"^% c #E0E8EC",
+"/% c #ABCDDF",
+"(% c #ABC5D3",
+"_% c #D4D9DA",
+":% c #97C0D8",
+"<% c #A0C1D5",
+"[% c #BBD3E2",
+"}% c #72AACE",
+"|% c #ECEFF2",
+"1% c #C7D0D6",
+"2% c #8BA8BC",
+"3% c #6AA0C5",
+"4% c #DBE9F4",
+"5% c #C5C8CB",
+"6% c #7794A8",
+"7% c #91ADC1",
+"8% c #7C9BB1",
+"9% c #8EABC2",
+"0% c #8CA3B6",
+"a% c #4478A1",
+"b% c #A6BAC9",
+"c% c #F3F1EE",
+"d% c #7D93A7",
+"e% c #6F8EA8",
+"f% c #61809B",
+"g% c #7B94AB",
+"h% c #7F8F9C",
+"i% c #4A6580",
+"j% c #41688F",
+"k% c #225C96",
+"l% c #296099",
+"m% c #D5EAF5",
+"n% c #CBE4F2",
+"o% c #CCE4F1",
+"p% c #C8E1EE",
+"q% c #C5E0F0",
+"r% c #BFDCEC",
+"s% c #BACDD8",
+"t% c #D7D9DB",
+"u% c #BED4E0",
+"v% c #AECADA",
+"w% c #CED3D6",
+"x% c #CCD7DE",
+"y% c #A9C9DB",
+"z% c #D5DDE3",
+"A% c #BED1DE",
+"B% c #76B3D8",
+"C% c #BAD3E3",
+"D% c #E6E6E6",
+"E% c #76A9CA",
+"F% c #B0CEE1",
+"G% c #C3CBD0",
+"H% c #84A4B9",
+"I% c #83B1D2",
+"J% c #BCC7CF",
+"K% c #69879B",
+"L% c #80A4BE",
+"M% c #8FAABE",
+"N% c #98B0C2",
+"O% c #93A8B8",
+"P% c #44769D",
+"Q% c #99B6CD",
+"R% c #E2E2E1",
+"S% c #4D6B84",
+"T% c #6B8CA7",
+"U% c #2C6496",
+"V% c #809FBC",
+"W% c #7F8A95",
+"X% c #204F7B",
+"Y% c #255A8E",
+"Z% c #265F97",
+"`% c #275E98",
+" & c #D1E7F3",
+".& c #C3DDEC",
+"+& c #C7D6DF",
+"@& c #C8D5DC",
+"#& c #BAD1DF",
+"$& c #BDD6E4",
+"%& c #B5D4E7",
+"&& c #BDD4E1",
+"*& c #D9E0E5",
+"=& c #ABCDE2",
+"-& c #BDCFDA",
+";& c #B6C7D1",
+">& c #C3D4DE",
+",& c #A4C2D5",
+"'& c #CBD8E0",
+")& c #B9D2E1",
+"!& c #99BCD3",
+"~& c #E8E9E8",
+"{& c #AFC9DA",
+"]& c #88B7D6",
+"^& c #DCDEE0",
+"/& c #85A2B5",
+"(& c #92BAD6",
+"_& c #A5B5C0",
+":& c #9EB1BF",
+"<& c #769BB5",
+"[& c #92AFC5",
+"}& c #B8C0C5",
+"|& c #5881A1",
+"1& c #74A1C4",
+"2& c #FFFCF8",
+"3& c #9AA4AD",
+"4& c #3B6B93",
+"5& c #3072AB",
+"6& c #6595BF",
+"7& c #818F9C",
+"8& c #10416E",
+"9& c #165A9A",
+"0& c #1F5F9F",
+"a& c #296299",
+"b& c #275D95",
+"c& c #CDE5F3",
+"d& c #C2DDEC",
+"e& c #CBD5DB",
+"f& c #AFCCDC",
+"g& c #B9CEDA",
+"h& c #ABC8D8",
+"i& c #C8D1D6",
+"j& c #CEDBE3",
+"k& c #A8CBE0",
+"l& c #ABC6D6",
+"m& c #98BFD6",
+"n& c #B4CAD7",
+"o& c #C3D5E0",
+"p& c #C6CCD1",
+"q& c #8FAABC",
+"r& c #C2CED5",
+"s& c #D9DFE3",
+"t& c #98B8CF",
+"u& c #FFFDF9",
+"v& c #94ACBD",
+"w& c #81A8C5",
+"x& c #EEEEED",
+"y& c #A3B1BC",
+"z& c #9AB6CA",
+"A& c #D4D7D9",
+"B& c #5B7D98",
+"C& c #6693B8",
+"D& c #C9D4DD",
+"E& c #C3C5C8",
+"F& c #6C7D8B",
+"G& c #567996",
+"H& c #2567A1",
+"I& c #4079AC",
+"J& c #65819B",
+"K& c #134573",
+"L& c #135798",
+"M& c #4377A9",
+"N& c #4B739B",
+"O& c #225990",
+"P& c #255C96",
+"Q& c #C9E2F1",
+"R& c #C0DDEE",
+"S& c #B6D5E5",
+"T& c #AEC6D5",
+"U& c #CAD6DD",
+"V& c #B6D3E5",
+"W& c #B8CDD9",
+"X& c #98BFD5",
+"Y& c #B5C9D5",
+"Z& c #BDD3E0",
+"`& c #ACC6D5",
+" * c #99BBD1",
+".* c #99C0D9",
+"+* c #A7BDCA",
+"@* c #F2F0EE",
+"#* c #A9C7DC",
+"$* c #5492BA",
+"%* c #AFC3D0",
+"&* c #EDECED",
+"** c #FFFFFE",
+"=* c #94ADBF",
+"-* c #88ACC5",
+";* c #B9C1C8",
+">* c #B6BDC3",
+",* c #708CA2",
+"'* c #779DBB",
+")* c #86A0B6",
+"!* c #849CB0",
+"~* c #718BA1",
+"{* c #457095",
+"]* c #7597B7",
+"^* c #A2B9CE",
+"/* c #8293A3",
+"(* c #446686",
+"_* c #6587A6",
+":* c #5C7A97",
+"<* c #5E7994",
+"[* c #486684",
+"}* c #1C5289",
+"|* c #C5E0EF",
+"1* c #B7D3E4",
+"2* c #C1D4DF",
+"3* c #BCCED9",
+"4* c #D3DDE2",
+"5* c #A7C5D8",
+"6* c #B3C7D4",
+"7* c #ADCADC",
+"8* c #9BBED3",
+"9* c #ABC0CC",
+"0* c #C5D2DA",
+"a* c #C7D1D8",
+"b* c #9CBBD0",
+"c* c #7EB0D0",
+"d* c #B1C6D3",
+"e* c #EFEBE8",
+"f* c #83B3D4",
+"g* c #6AA1C7",
+"h* c #F8F8F7",
+"i* c #8EA8BB",
+"j* c #A7C2D6",
+"k* c #6A859A",
+"l* c #849FB5",
+"m* c #CFD8DF",
+"n* c #8098AA",
+"o* c #3D709B",
+"p* c #90A9BD",
+"q* c #417098",
+"r* c #9BB6CE",
+"s* c #9EA7AF",
+"t* c #778593",
+"u* c #416382",
+"v* c #436A8F",
+"w* c #456B8F",
+"x* c #3C6288",
+"y* c #33577C",
+"z* c #1D4D7F",
+"A* c #245A94",
+"B* c #C0DCED",
+"C* c #B3D2E4",
+"D* c #B3C8D4",
+"E* c #B0C6D3",
+"F* c #A1C1D4",
+"G* c #BDCDD6",
+"H* c #CFDCE3",
+"I* c #C3D8E4",
+"J* c #B4C8D5",
+"K* c #9ABED4",
+"L* c #95B6CC",
+"M* c #B0C2CE",
+"N* c #C7D2D9",
+"O* c #A8BAC6",
+"P* c #8EB5CF",
+"Q* c #5E9EC9",
+"R* c #A4BCCD",
+"S* c #D3D8DC",
+"T* c #5F98C1",
+"U* c #CBDCE8",
+"V* c #94AABB",
+"W* c #CAD8E3",
+"X* c #BBC1C5",
+"Y* c #396E98",
+"Z* c #F5FCFF",
+"`* c #BEBEC0",
+" = c #7696B0",
+".= c #B8D1E5",
+"+= c #567B9B",
+"@= c #3974A7",
+"#= c #9BA8B4",
+"$= c #15426B",
+"%= c #003D7F",
+"&= c #12599C",
+"*= c #145898",
+"== c #105190",
+"-= c #165695",
+";= c #265D96",
+">= c #245992",
+",= c #245993",
+"'= c #BBD9EA",
+")= c #B1D4E9",
+"!= c #A9C5D6",
+"~= c #A8C5D6",
+"{= c #AECBDC",
+"]= c #9BB8CA",
+"^= c #ACBDC7",
+"/= c #C6CFD4",
+"(= c #B1BFC8",
+"_= c #C6D2DA",
+":= c #B6D1E2",
+"<= c #8BB0C8",
+"[= c #98B2C3",
+"}= c #DCE1E5",
+"|= c #BCCCD7",
+"1= c #8DBAD8",
+"2= c #5E9ECB",
+"3= c #C6D1DA",
+"4= c #A2B9CA",
+"5= c #A6C1D5",
+"6= c #A8B6C1",
+"7= c #DBDDDE",
+"8= c #6C8DA7",
+"9= c #AFCBE0",
+"0= c #C5C4C4",
+"a= c #919EA9",
+"b= c #D4D6D7",
+"c= c #AEAFB1",
+"d= c #244F74",
+"e= c #95ACC0",
+"f= c #7D8D9B",
+"g= c #245785",
+"h= c #6B90B3",
+"i= c #406B95",
+"j= c #3F6B96",
+"k= c #6986A3",
+"l= c #466F97",
+"m= c #416489",
+"n= c #396088",
+"o= c #24578E",
+"p= c #225793",
+"q= c #B6D5E9",
+"r= c #ADD2E9",
+"s= c #A6C7DC",
+"t= c #A4BCCB",
+"u= c #9FBCCE",
+"v= c #93B8D0",
+"w= c #85AFCA",
+"x= c #94B3C8",
+"y= c #B6C4CD",
+"z= c #9DBFD5",
+"A= c #BCD0DD",
+"B= c #CBCDD0",
+"C= c #DEDEDE",
+"D= c #70A7CE",
+"E= c #337DB3",
+"F= c #ACBBC7",
+"G= c #C8D2D9",
+"H= c #E8EAEC",
+"I= c #8A9FB1",
+"J= c #ADB3B9",
+"K= c #B9C0C5",
+"L= c #EAE6E2",
+"M= c #2F4D66",
+"N= c #002E66",
+"O= c #27659A",
+"P= c #A4B3BF",
+"Q= c #51728F",
+"R= c #225D93",
+"S= c #2B5A87",
+"T= c #2B5781",
+"U= c #426282",
+"V= c #576F86",
+"W= c #4A6A89",
+"X= c #28507B",
+"Y= c #456180",
+"Z= c #255384",
+"`= c #205693",
+" - c #B1D1E6",
+".- c #A7CCE5",
+"+- c #A6CAE0",
+"@- c #9DC3DC",
+"#- c #92B9D3",
+"$- c #9EC4DB",
+"%- c #97C4E1",
+"&- c #90BBD7",
+"*- c #8ABBDC",
+"=- c #85BADE",
+"-- c #7CADCC",
+";- c #98B4C8",
+">- c #C9D4DA",
+",- c #89A3B5",
+"'- c #3D6C8F",
+")- c #B1BEC7",
+"!- c #1568A6",
+"~- c #4984AF",
+"{- c #FFFFFB",
+"]- c #EBEEF1",
+"^- c #B2B6B9",
+"/- c #47657D",
+"(- c #D9DCDD",
+"_- c #3F5C76",
+":- c #1E5A8F",
+"<- c #729BBE",
+"[- c #C2D0DC",
+"}- c #B3B8BC",
+"|- c #4B6683",
+"1- c #5B80A4",
+"2- c #6086AA",
+"3- c #53799F",
+"4- c #476D93",
+"5- c #6A839D",
+"6- c #395D82",
+"7- c #336293",
+"8- c #355D8B",
+"9- c #22548B",
+"0- c #215691",
+"a- c #ACCEE4",
+"b- c #A3C9E2",
+"c- c #9CC2DC",
+"d- c #A2C2D6",
+"e- c #ACC1D0",
+"f- c #A5B7C2",
+"g- c #A2B9C7",
+"h- c #B4C8D6",
+"i- c #8CBBDB",
+"j- c #62A3CE",
+"k- c #3788BF",
+"l- c #186CA7",
+"m- c #719AB8",
+"n- c #2C72A4",
+"o- c #3E76A0",
+"p- c #A1B4C0",
+"q- c #1B659C",
+"r- c #CDDBE5",
+"s- c #FFFFFC",
+"t- c #335772",
+"u- c #3D73A0",
+"v- c #6F8598",
+"w- c #3E6A8F",
+"x- c #7D99B1",
+"y- c #738696",
+"z- c #A5A8AB",
+"A- c #1E466A",
+"B- c #1D5287",
+"C- c #3A648B",
+"D- c #547493",
+"E- c #496887",
+"F- c #45678A",
+"G- c #667C93",
+"H- c #37597E",
+"I- c #4F6D8E",
+"J- c #315984",
+"K- c #205289",
+"L- c #215490",
+"M- c #A7CAE1",
+"N- c #9EC4DE",
+"O- c #99C3DF",
+"P- c #98BAD2",
+"Q- c #97B3C6",
+"R- c #88ADC6",
+"S- c #8EAEC3",
+"T- c #98B4C7",
+"U- c #97AFC1",
+"V- c #AFC2D0",
+"W- c #98BDD6",
+"X- c #91B6CF",
+"Y- c #7EA3BE",
+"Z- c #386C91",
+"`- c #9FAFB9",
+" ; c #D0D9DF",
+".; c #004E92",
+"+; c #6795B7",
+"@; c #7594AB",
+"#; c #9CB6CA",
+"$; c #A7ACB0",
+"%; c #001454",
+"&; c #76A6CE",
+"*; c #D2D1D1",
+"=; c #49637F",
+"-; c #2B567F",
+";; c #C8D0D8",
+">; c #597186",
+",; c #084C8B",
+"'; c #296FB0",
+"); c #11579A",
+"!; c #094D8F",
+"~; c #175492",
+"{; c #1A5591",
+"]; c #0E4783",
+"^; c #1A518A",
+"/; c #2B5685",
+"(; c #275382",
+"_; c #1E518B",
+":; c #21548F",
+"<; c #A1C5DE",
+"[; c #98C0DC",
+"}; c #91BDDB",
+"|; c #8CBBDA",
+"1; c #8DBCDC",
+"2; c #8BBBDD",
+"3; c #6BA0C6",
+"4; c #7BA2BE",
+"5; c #8B98A1",
+"6; c #718696",
+"7; c #8E9EAB",
+"8; c #7B8C98",
+"9; c #7390A4",
+"0; c #547994",
+"a; c #CDCBCA",
+"b; c #BFD0DC",
+"c; c #5884A5",
+"d; c #DDDEDE",
+"e; c #F1F2F3",
+"f; c #365C7A",
+"g; c #3B6EA1",
+"h; c #FEFFFF",
+"i; c #4C667C",
+"j; c #265587",
+"k; c #D8E4EE",
+"l; c #A8A8AA",
+"m; c #506B82",
+"n; c #5D80A1",
+"o; c #5E7E9D",
+"p; c #6887A4",
+"q; c #5D81A5",
+"r; c #406993",
+"s; c #1B528B",
+"t; c #245E9B",
+"u; c #255C9A",
+"v; c #1C5696",
+"w; c #1F5693",
+"x; c #235690",
+"y; c #21528D",
+"z; c #93BCD9",
+"A; c #90BAD7",
+"B; c #8DB8D6",
+"C; c #89B6D6",
+"D; c #7BA4C2",
+"E; c #7695AB",
+"F; c #728999",
+"G; c #1B5885",
+"H; c #025B9A",
+"I; c #1D6CA6",
+"J; c #3C79A6",
+"K; c #B9C3C9",
+"L; c #627E93",
+"M; c #265F8A",
+"N; c #E9E4DF",
+"O; c #57748C",
+"P; c #86A3BA",
+"Q; c #F7F7F7",
+"R; c #859BAD",
+"S; c #BFCCD3",
+"T; c #CDCECF",
+"U; c #4F7291",
+"V; c #F3FAFC",
+"W; c #C0B8B1",
+"X; c #0C3B68",
+"Y; c #1D578D",
+"Z; c #2F5E89",
+"`; c #325C86",
+" > c #516F8E",
+".> c #6A7D91",
+"+> c #82909F",
+"@> c #617A93",
+"#> c #194E86",
+"$> c #21528A",
+"%> c #2F5B8B",
+"&> c #27588F",
+"*> c #20538E",
+"=> c #21528C",
+"-> c #97BDD9",
+";> c #8EB8D6",
+">> c #8BB6D5",
+",> c #88B4D3",
+"'> c #8EB8D7",
+")> c #72A6CA",
+"!> c #497DA1",
+"~> c #477291",
+"{> c #1E6497",
+"]> c #68A7D5",
+"^> c #8CAFC8",
+"/> c #487799",
+"(> c #C1D2DE",
+"_> c #657D8F",
+":> c #034E87",
+"<> c #1067AA",
+"[> c #608DAF",
+"}> c #C2CFD9",
+"|> c #8AA5BB",
+"1> c #F8F9FA",
+"2> c #E9E5E2",
+"3> c #929EA8",
+"4> c #DFE4E9",
+"5> c #ECE5DF",
+"6> c #334C63",
+"7> c #315A7F",
+"8> c #88A3BD",
+"9> c #1B5C9D",
+"0> c #2162A0",
+"a> c #1E5D9A",
+"b> c #0A4C90",
+"c> c #134A83",
+"d> c #476586",
+"e> c #496582",
+"f> c #395C82",
+"g> c #365C86",
+"h> c #29527F",
+"i> c #2A5281",
+"j> c #205089",
+"k> c #20518C",
+"l> c #91B9D6",
+"m> c #89B4D3",
+"n> c #86B2D2",
+"o> c #8BB5D4",
+"p> c #76A7CC",
+"q> c #4689BB",
+"r> c #367FB4",
+"s> c #3A7FB4",
+"t> c #6F99B7",
+"u> c #AEB4B7",
+"v> c #52728A",
+"w> c #5380A4",
+"x> c #9FA3A6",
+"y> c #1E547F",
+"z> c #347FBC",
+"A> c #2772AE",
+"B> c #004B90",
+"C> c #C3D3DF",
+"D> c #FEFEFE",
+"E> c #E6E7E8",
+"F> c #3E5B75",
+"G> c #EFF6FC",
+"H> c #2B4760",
+"I> c #003E7B",
+"J> c #08549B",
+"K> c #889EB2",
+"L> c #7C94AC",
+"M> c #0E4F91",
+"N> c #3A70A7",
+"O> c #4172A5",
+"P> c #295F99",
+"Q> c #1B528D",
+"R> c #154C8A",
+"S> c #2F5B8A",
+"T> c #2F5681",
+"U> c #194D89",
+"V> c #1E508A",
+"W> c #1F508B",
+"X> c #8CB5D4",
+"Y> c #83AFD0",
+"Z> c #87B1D1",
+"`> c #7BAACC",
+" , c #4C8BBB",
+"., c #4084B8",
+"+, c #4681AF",
+"@, c #7291A8",
+"#, c #5A7C96",
+"$, c #366080",
+"%, c #3F7097",
+"&, c #92A8BB",
+"*, c #426580",
+"=, c #216BA4",
+"-, c #1D6AA8",
+";, c #4684B4",
+">, c #648CAD",
+",, c #778597",
+"', c #DDE0E2",
+"), c #E9EFF4",
+"!, c #CCC5BF",
+"~, c #285885",
+"{, c #185FA3",
+"], c #1F609F",
+"^, c #35618C",
+"/, c #969FA7",
+"(, c #8296AB",
+"_, c #3C6086",
+":, c #7A8B9D",
+"<, c #315983",
+"[, c #1B5593",
+"}, c #255A94",
+"|, c #1F5591",
+"1, c #1C508D",
+"2, c #22538D",
+"3, c #21538E",
+"4, c #20508B",
+"5, c #1F4F8A",
+"6, c #87B1D0",
+"7, c #80ACCE",
+"8, c #5691BD",
+"9, c #4383B5",
+"0, c #4587B9",
+"a, c #477EA9",
+"b, c #3A6B8F",
+"c, c #2D6997",
+"d, c #4578A1",
+"e, c #6587A3",
+"f, c #537088",
+"g, c #155C96",
+"h, c #2571AD",
+"i, c #93B2CB",
+"j, c #B2B7BA",
+"k, c #3A5F7D",
+"l, c #00336E",
+"m, c #688AA7",
+"n, c #E5E9EC",
+"o, c #E4E8ED",
+"p, c #A9B0B7",
+"q, c #35536F",
+"r, c #CFD6DC",
+"s, c #306294",
+"t, c #044E96",
+"u, c #5C7FA4",
+"v, c #597694",
+"w, c #8A9AA9",
+"x, c #57708B",
+"y, c #0D3E72",
+"z, c #215389",
+"A, c #235893",
+"B, c #22548F",
+"C, c #21548E",
+"D, c #20518B",
+"E, c #1F4F89",
+"F, c #1F4D88",
+"G, c #81ACCD",
+"H, c #6599C2",
+"I, c #4483B5",
+"J, c #4885B6",
+"K, c #4383B4",
+"L, c #3E7EAF",
+"M, c #397DB2",
+"N, c #3B7BAE",
+"O, c #1E66A1",
+"P, c #5E88A9",
+"Q, c #517897",
+"R, c #216BA7",
+"S, c #3D78A9",
+"T, c #98A4AE",
+"U, c #3D5D77",
+"V, c #0F5794",
+"W, c #1A69AC",
+"X, c #3A71A2",
+"Y, c #F8F6F5",
+"Z, c #5B7288",
+"`, c #003779",
+" ' c #57748E",
+".' c #657A8F",
+"+' c #316497",
+"@' c #446F9B",
+"#' c #687D94",
+"$' c #3E6894",
+"%' c #778A9E",
+"&' c #2E5682",
+"*' c #295A90",
+"=' c #205590",
+"-' c #22558F",
+";' c #21538D",
+">' c #21518C",
+",' c #20508A",
+"'' c #1F4E89",
+")' c #1E4C87",
+"!' c #7DA8CB",
+"~' c #72A1C6",
+"{' c #4D88B7",
+"]' c #4683B4",
+"^' c #4280B1",
+"/' c #3E7DB0",
+"(' c #3B7BB0",
+"_' c #3679AF",
+":' c #3E78A7",
+"<' c #456D8F",
+"[' c #2C628F",
+"}' c #386F9C",
+"|' c #567A99",
+"1' c #436581",
+"2' c #185B92",
+"3' c #3274AE",
+"4' c #1B609E",
+"5' c #3A6F9E",
+"6' c #F0F0F0",
+"7' c #F2EEE9",
+"8' c #2B4F73",
+"9' c #0F569B",
+"0' c #2E5D8C",
+"a' c #3C6287",
+"b' c #3A638C",
+"c' c #164D86",
+"d' c #345D88",
+"e' c #325A86",
+"f' c #245182",
+"g' c #245388",
+"h' c #20528C",
+"i' c #204F8A",
+"j' c #1F4D87",
+"k' c #1E4C86",
+"l' c #5D91BC",
+"m' c #4480B2",
+"n' c #4882B2",
+"o' c #447FB1",
+"p' c #407DAF",
+"q' c #3C7AAD",
+"r' c #3978AD",
+"s' c #3776AB",
+"t' c #376D9B",
+"u' c #2C6596",
+"v' c #306FA4",
+"w' c #2B699E",
+"x' c #2C6291",
+"y' c #255D8D",
+"z' c #2C6DA6",
+"A' c #2C6AA2",
+"B' c #1A5E9C",
+"C' c #3B6E9D",
+"D' c #F1F1F1",
+"E' c #CACBCD",
+"F' c #11406F",
+"G' c #1F61A1",
+"H' c #316498",
+"I' c #3E648B",
+"J' c #19528D",
+"K' c #255C95",
+"L' c #1D5895",
+"M' c #245487",
+"N' c #1E5189",
+"O' c #1E538E",
+"P' c #215491",
+"Q' c #1E4D88",
+"R' c #1D4C87",
+"S' c #1E4A86",
+"T' c #6F9CC2",
+"U' c #4E85B4",
+"V' c #4680B1",
+"W' c #457FB0",
+"X' c #427CAF",
+"Y' c #3E7AAD",
+"Z' c #3B78AC",
+"`' c #3875AA",
+" ) c #3573A8",
+".) c #3270A7",
+"+) c #306EA5",
+"@) c #2E6EA6",
+"#) c #2F6FA6",
+"$) c #2B69A2",
+"%) c #2A69A2",
+"&) c #2D6AA2",
+"*) c #2B679F",
+"=) c #185A99",
+"-) c #3E709E",
+";) c #F6F4F3",
+">) c #ABB3BA",
+",) c #073C72",
+"') c #26619E",
+")) c #235D98",
+"!) c #24568A",
+"~) c #26598F",
+"{) c #245B96",
+"]) c #215792",
+"^) c #225690",
+"/) c #235590",
+"() c #22548E",
+"_) c #20538C",
+":) c #1D4A85",
+"<) c #467FB0",
+"[) c #477FB0",
+"}) c #447DAE",
+"|) c #407BAD",
+"1) c #3D78AB",
+"2) c #3A75A9",
+"3) c #3773A8",
+"4) c #3370A6",
+"5) c #326FA6",
+"6) c #306EA4",
+"7) c #2D6BA2",
+"8) c #2D6AA1",
+"9) c #2D69A2",
+"0) c #2B68A0",
+"a) c #2B669E",
+"b) c #2A669D",
+"c) c #125493",
+"d) c #4676A4",
+"e) c #FEFDFB",
+"f) c #98A3AF",
+"g) c #003871",
+"h) c #26609C",
+"i) c #255C94",
+"j) c #235B96",
+"k) c #235892",
+"l) c #235691",
+"m) c #1F508A",
+"n) c #1E4B86",
+"o) c #1E4A85",
+"p) c #1D4984",
+"q) c #5688B5",
+"r) c #447CAE",
+"s) c #457DAE",
+"t) c #427AAC",
+"u) c #3E77AB",
+"v) c #3C75A9",
+"w) c #3873A7",
+"x) c #3571A5",
+"y) c #326FA4",
+"z) c #316DA3",
+"A) c #2F6BA1",
+"B) c #2D69A1",
+"C) c #2D689F",
+"D) c #2C669E",
+"E) c #2A659D",
+"F) c #2A659C",
+"G) c #074B8D",
+"H) c #5B83AB",
+"I) c #A5B0BB",
+"J) c #003671",
+"K) c #255E9A",
+"L) c #245A93",
+"M) c #235792",
+"N) c #22568F",
+"O) c #1D4985",
+"P) c #1C4984",
+"Q) c #1C4883",
+"R) c #4D81AF",
+"S) c #457AAC",
+"T) c #4379AB",
+"U) c #4077AA",
+"V) c #3D75A8",
+"W) c #3A73A7",
+"X) c #3770A5",
+"Y) c #346EA4",
+"Z) c #326DA2",
+"`) c #306AA1",
+" ! c #2E69A0",
+".! c #2D679F",
+"+! c #2A649B",
+"@! c #29639B",
+"#! c #25609A",
+"$! c #084786",
+"%! c #C2D0DF",
+"&! c #355E8B",
+"*! c #134D8E",
+"=! c #235790",
+"-! c #21508B",
+";! c #1E4B87",
+">! c #1D4B86",
+",! c #1C4884",
+"'! c #1C4782",
+")! c #497CAC",
+"!! c #4478AA",
+"~! c #4176A9",
+"{! c #3E75A7",
+"]! c #3B73A6",
+"^! c #3970A5",
+"/! c #366FA3",
+"(! c #346DA2",
+"_! c #316AA1",
+":! c #2F689F",
+"<! c #2D689E",
+"[! c #2B659D",
+"}! c #2B639B",
+"|! c #286299",
+"1! c #286199",
+"2! c #245B93",
+"3! c #8A9BAC",
+"4! c #949DA7",
+"5! c #949EAA",
+"6! c #949EA9",
+"7! c #9DA3AA",
+"8! c #4F6A88",
+"9! c #114988",
+"0! c #22558E",
+"a! c #1F4E88",
+"b! c #1D4883",
+"c! c #1B4782",
+"d! c #477AAB",
+"e! c #4579A9",
+"f! c #4276A8",
+"g! c #3F74A6",
+"h! c #3D72A5",
+"i! c #396FA3",
+"j! c #376DA2",
+"k! c #346BA1",
+"l! c #31699F",
+"m! c #30679D",
+"n! c #2D659D",
+"o! c #2B649B",
+"p! c #296199",
+"q! c #275F97",
+"r! c #275E96",
+"s! c #285F97",
+"t! c #073E77",
+"u! c #002F66",
+"v! c #003068",
+"w! c #002F67",
+"x! c #18487E",
+"y! c #275992",
+"z! c #225590",
+"A! c #1E4D87",
+"B! c #1C4683",
+" ",
+" ",
+" ",
+" . . + @ # $ % & * = - ; > , ' ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+" b b c d . e f g h i j k l m n o p q r s t u _ v w x y z A B C D E F G H I J K L M ",
+" + N O P P Q R f S T U V W m X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._. ",
+" + :.P & P Q <.g [.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u. ",
+" + Q P P * . e v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.b.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+ ",
+" + . Q Q . e ++@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+q.4+5+6+7+8+ ",
+" # R = 9+e 0+a+b+c+d+e+f+g+h+` i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+ ",
+" $ f f J+g S K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@ ",
+" ]@^@S [.h }./@(@_@:@<@[@}@|@1@2@3@4@5@6@Z 7@8@9@0@a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@ ",
+" & h x.x.i r@s@t@u@v@w@x@y@z@A@B@C@B.D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@X@o@Y@Z@ ",
+" * `@#+ #j .#+#@###$#%#v@&#*#=#-#;#>#,#'#)#!#~#: {#]#^#/#(#_#:#<#[#}#|#1#2#3#4#5#6#7# ",
+" e j 8#k 9#0#2.a#b#c#] d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#A#B#C#D#E#F#G#H# ",
+" - I#I#J#K#L#M#N#O#P#Q#R#S#T#U#V#W#X#Y#Z#`# $.$+$@$#$$$%$&$*$=$-$;$>$,$'$)$!$~${$]$^$ ",
+" /$($_$:$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$f$g$h$i$j$k$l$m$n$o$p$q$r$s$t$u$v$w$x$ ",
+" y$z$A$B$C$D$y@E$F$G$H$I$J$K$L$M$N$O$P$Q$R$p+S$T$U$V$W$X$A+Y$Z$`$ %.%+%@%#%$%%%&%*%=% ",
+" -%;%>%,%'%)%!%~%{%]%^%/%(%_%:%<%@$[%}%|%1%2%3%4%5%6%7%8%9%0%a%b%c%d%e%f%g%h%i%j%k%l% ",
+" m%n%o%p%q%r%s%t%u%v%w%x%y%z%A%B%C%D%E%F%G%H%I%J%K%L%M%N%O%P%Q%U$R%S%T%U%V%W%X%Y%Z%`% ",
+" &.&+&@&#&$&%&&&*&=&-&;&>&,&'&)&!&~&{&]&^&/&(&_&:&<&[&}&|&1&U$2&3&4&5&6&7&8&9&0&a&b& ",
+" c&d&R+e&T#f&g&h&i&j&k&l&m&n&o&p&q&r&s&t&u&v&w&x&y&z&A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P& ",
+" Q&R&S&T&U&V&+.W&X&Y&Z&`& *.*+*@*#*$*%*&***=*-*U$;*>*,*'*)*!*~*{*]*^*/*(*_*:*<*[*}*P& ",
+" |*1*2*k#3*4*5*6*7*8*9*0*a*b*c*d*e*f*g*h*U$i*j*u&k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z*P&A* ",
+" B*C*D*E*F*G*H*I*J*K*L*M*N*O*P*Q*R*S*T*U*U$V*W*X*Y*Z*`* =.=+=@=#=$=%=&=*===-=;=>=A*,= ",
+" '=)=!=~={=]=^=/=(=_=:=<=[=}=|=1=2=3=4=5=U$6=7=8=9=0=a=b=c=d=e=f=g=h=i=j=k=l=m=n=o=p= ",
+" q=r=s=t=L$u=v=w=w=x=y=N*z=A=B=C=D=E=F=G=U$H=J@I=J=K=L=M=N=O=P=Q=R=S=T=U=V=W=X=Y=Z=`= ",
+" -.-+-@-#-$-%-&-*-=---;-_+>-,-'-)-!-~-{-U$U$]-^-/-(-_-:-<-[-}-|-1-2-3-4-5-6-7-8-9-0- ",
+" a-b-c-d-e-f-^+g-h-i-j-k-l-m-u&n-o-p-q-r-U$U$s-t-u-v-w-x-y-z-A-B-C-D-E-F-G-H-I-J-K-L- ",
+" M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-`- ;.;+;@;#;U$U$$;%;&;*;=;-;;;>;,;';);!;~;{;];^;/;(;_;:; ",
+" <;[;-.};|;1;2;3;4;5;6;7;8;9;0;a;b;c;d;e;U$**f;g;h;i;j;k;l;m;n;o;p;q;r;s;t;u;v;w;x;y; ",
+" c-z;A;B;C;B;D;E;F;G;H;I;J;K;L;M;N;O;P;U$U$Q;R;S;T;U;V;W;X;Y;Z;`; >.>+>@>#>$>%>&>*>=> ",
+" ->;>>>,>'>)>!>~>{>]>^>/>(>_>:><>[>}>|>U$U$1>2>3>4>5>6>7>8>9>0>a>b>c>d>e>f>g>h>i>j>k> ",
+" l>m>n>o>p>q>r>s>t>u>v>w>x>y>z>A>B>C>U$D>U$E>F>G>U$H>I>J>K>L>M>N>O>P>Q>R>S>T>U>V>j>W> ",
+" X>Y>Z>`> ,.,+,@,#,$,%,&,*,=,-,;,>,,,D%U$U$',7>),!,~,{,],^,/,(,_,:,<,[,},|,1,2,3,4,5, ",
+" 6,l.7,8,9,0,a,b,c,d,e,f,g,h,i,j,k,l,m,U$U$n,o,p,q,r,s,t,u,v,w,x,y,z,A,x;B,C,=>D,E,F, ",
+" G,E H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,U$U$U$Z,`, '.'+'@'#'$'%'&'*'='-';'>'4,,''')' ",
+" !'~'{']']'^'/'('_':'<'['}'|'1'2'3'4'5'6'U$U$7'8'9'0'a'b'c'd'e'f'&'g'3,C,h'4,i'''j'k' ",
+" !.l'm'n'o'p'q'r's't'u'v'w'x'y'z'A'B'C'D'U$U$E'F'G'H'I'J'K'L'M'N'O'P'2,=>D,5,''Q'R'S' ",
+" T'U'V'W'X'Y'Z'`' ).)+)@)#)$)%)&)*)=)-);)U$U$>),)')))!)~){)A,])^)/)()_)4,i'''Q'k'S':) ",
+" 4+<)[)})|)1)2)3)4)5)6)7)8)9)0)a)b)c)d)e)U$U$f)g)h)i)j),=k)l)^)-';'=>D,m)''F,)'n)o)p) ",
+" q)r)s)t)u)v)w)x)y)z)A)B)C)D)E)F)F)G)H)U$U$U$I)J)K)L)>=M)^)N)C,;'h'4,,'''F,)'n)O)P)Q) ",
+" R)S)T)U)V)W)X)Y)Z)`) !.!D)w$+!@!#!$!%!U$U$U$U$&!*!k)=!x;B,;'y;=>-!E,''F,;!>!:)p),!'! ",
+" )!!!~!{!]!^!/!(!_!:!<![!}!@!|!1!))2!3!4!5!6!7!8!9!M)-'0!2,y;k>4,5,a!Q')'n):)P)b!c! ",
+" d!e!f!g!h!i!j!k!l!m!n!o!x$p!q!r!s!l%t!u!v!w!N=x!y!z!();'k>4,,'''F,A!k':):)p)Q)B! ",
+" ",
+" ",
+" "};
diff --git a/dependencies/eclipse/3.2/linux/ppc/org.eclipse.swt.gtk.linux.ppc_3.2.1.v3235.jar b/dependencies/eclipse/3.2/linux/ppc/org.eclipse.swt.gtk.linux.ppc_3.2.1.v3235.jar
new file mode 100644
index 0000000..308163c
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/ppc/org.eclipse.swt.gtk.linux.ppc_3.2.1.v3235.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/linux/ppc/rcp/configuration/config.ini b/dependencies/eclipse/3.2/linux/ppc/rcp/configuration/config.ini
new file mode 100644
index 0000000..5ae9d2f
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/ppc/rcp/configuration/config.ini
@@ -0,0 +1,9 @@
+#Product Runtime Configuration File
+
+osgi.splashPath=platform:/base/plugins/org.apache.directory.studio
+eclipse.product=org.apache.directory.studio.product
+osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
+osgi.bundles.defaultStartLevel=4
+
+# The workspace location
+osgi.instance.area.default=@user.home/.ApacheDirectoryStudio
diff --git a/dependencies/eclipse/3.2/linux/ppc/rcp/eclipse b/dependencies/eclipse/3.2/linux/ppc/rcp/eclipse
new file mode 100755
index 0000000..e12087f
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/ppc/rcp/eclipse
Binary files differ
diff --git a/dependencies/eclipse/3.2/linux/ppc/rcp/startup.jar b/dependencies/eclipse/3.2/linux/ppc/rcp/startup.jar
new file mode 100644
index 0000000..3b77344
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/ppc/rcp/startup.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/linux/ppc/rcp/studio.xpm b/dependencies/eclipse/3.2/linux/ppc/rcp/studio.xpm
new file mode 100644
index 0000000..400a037
--- /dev/null
+++ b/dependencies/eclipse/3.2/linux/ppc/rcp/studio.xpm
@@ -0,0 +1,1590 @@
+/* XPM */
+static char * test2_xpm[] = {
+"48 48 1539 2",
+" c None",
+". c #E5F4FB",
+"+ c #EFF8FC",
+"@ c #EEF8FC",
+"# c #EDF7FC",
+"$ c #ECF7FC",
+"% c #EAF6FC",
+"& c #E8F5FB",
+"* c #E7F4FB",
+"= c #E5F3FA",
+"- c #E2F1F9",
+"; c #E0F0F8",
+"> c #DDEEF7",
+", c #DAECF5",
+"' c #D6E9F4",
+") c #D3E8F4",
+"! c #CEE4F0",
+"~ c #CBE2F0",
+"{ c #C8E1F0",
+"] c #C3DEEE",
+"^ c #BFDBEC",
+"/ c #BAD8EB",
+"( c #B6D4E8",
+"_ c #B1D1E5",
+": c #ACCDE3",
+"< c #A7C9E0",
+"[ c #A2C5DE",
+"} c #9DC1DB",
+"| c #97BDD8",
+"1 c #92B8D6",
+"2 c #8DB4D2",
+"3 c #88B0CF",
+"4 c #82ABCC",
+"5 c #7DA7C9",
+"6 c #77A2C6",
+"7 c #729DC3",
+"8 c #6D99BF",
+"9 c #6894BC",
+"0 c #628EB8",
+"a c #5F8BB6",
+"b c #F2FAFD",
+"c c #EFF8FD",
+"d c #E6F5FB",
+"e c #E4F3FA",
+"f c #E3F3FA",
+"g c #E2F2FA",
+"h c #E0F1F9",
+"i c #DEF0F9",
+"j c #DBEEF8",
+"k c #D9EDF7",
+"l c #D8EDF8",
+"m c #D4EAF5",
+"n c #C9DBE5",
+"o c #C9D9E2",
+"p c #C7DBE6",
+"q c #BBCDD8",
+"r c #BDD3DF",
+"s c #BEDBEC",
+"t c #B9D8EC",
+"u c #B7D5E8",
+"v c #ADD1E6",
+"w c #A8CDE5",
+"x c #A3C8E1",
+"y c #9EC4DD",
+"z c #9AC0DB",
+"A c #95BCD9",
+"B c #90B8D6",
+"C c #8BB4D3",
+"D c #85AFCF",
+"E c #81ABCD",
+"F c #7BA7CA",
+"G c #76A2C6",
+"H c #729EC3",
+"I c #6C99C0",
+"J c #6794BC",
+"K c #6290B9",
+"L c #5D8BB6",
+"M c #5F8BB5",
+"N c #F3FAFE",
+"O c #E8F5FC",
+"P c #E7F5FB",
+"Q c #E6F4FB",
+"R c #E5F4FA",
+"S c #E1F2FA",
+"T c #E0F0F9",
+"U c #DEF0F8",
+"V c #DCEFF9",
+"W c #DAEFFA",
+"X c #CDE1ED",
+"Y c #D1DBE1",
+"Z c #C8D4DB",
+"` c #C3D2DA",
+" . c #B9C7CF",
+".. c #BCCAD3",
+"+. c #B6CAD6",
+"@. c #B0C8D7",
+"#. c #B6CCDB",
+"$. c #ACC4D2",
+"%. c #A7C8DD",
+"&. c #A3C6DE",
+"*. c #9FC3DB",
+"=. c #9DC4DF",
+"-. c #96BEDA",
+";. c #92BAD7",
+">. c #8DB7D5",
+",. c #88B2D1",
+"'. c #83AECF",
+"). c #7EA9CC",
+"!. c #79A4C8",
+"~. c #74A0C6",
+"{. c #6F9CC3",
+"]. c #6A98BF",
+"^. c #6693BB",
+"/. c #608FB8",
+"(. c #5C8AB5",
+"_. c #5D89B5",
+":. c #F2F9FD",
+"<. c #E4F4FB",
+"[. c #E1F1FA",
+"}. c #DFF1FA",
+"|. c #DDF0FA",
+"1. c #D9ECF4",
+"2. c #D3E7F2",
+"3. c #D0E1EB",
+"4. c #CBDAE3",
+"5. c #C9D7DE",
+"6. c #C8D7E0",
+"7. c #BED1DB",
+"8. c #C7CED2",
+"9. c #BAC7CE",
+"0. c #BBCCD5",
+"a. c #BBC9D0",
+"b. c #ACC3D1",
+"c. c #AFC0CB",
+"d. c #A1BBCB",
+"e. c #A5C0D1",
+"f. c #9BBCD3",
+"g. c #98C2E0",
+"h. c #94BDDB",
+"i. c #8FBAD9",
+"j. c #89B5D4",
+"k. c #84B1D1",
+"l. c #81ACCE",
+"m. c #7BA8CA",
+"n. c #76A3C7",
+"o. c #719FC4",
+"p. c #6C9AC1",
+"q. c #6796BE",
+"r. c #6391BB",
+"s. c #5F8DB7",
+"t. c #5A88B4",
+"u. c #5A87B3",
+"v. c #E3F4FC",
+"w. c #E1F3FC",
+"x. c #DFF0F9",
+"y. c #DAE9F1",
+"z. c #CEDFE7",
+"A. c #D2DEE5",
+"B. c #CFD9DF",
+"C. c #CAD5DB",
+"D. c #C0D2DC",
+"E. c #BDD0DB",
+"F. c #D1DFE6",
+"G. c #C5D3DB",
+"H. c #BBC9D2",
+"I. c #C1D2DC",
+"J. c #B2C7D4",
+"K. c #C1CDD5",
+"L. c #B2C5D1",
+"M. c #9BB5C6",
+"N. c #9FBACC",
+"O. c #94B7CF",
+"P. c #8FB8D6",
+"Q. c #8CB3D0",
+"R. c #86B1D1",
+"S. c #81ADCF",
+"T. c #7BA9CD",
+"U. c #79A6CA",
+"V. c #72A0C5",
+"W. c #6F9DC3",
+"X. c #6A98C0",
+"Y. c #6594BC",
+"Z. c #608FBA",
+"`. c #5C8BB6",
+" + c #5886B3",
+".+ c #5685B1",
+"++ c #E3F2F9",
+"@+ c #DEEEF5",
+"#+ c #DDEFF8",
+"$+ c #D9EAF2",
+"%+ c #D4DEE3",
+"&+ c #C7D5DD",
+"*+ c #DCE6EB",
+"=+ c #DBDEE0",
+"-+ c #BDD0D9",
+";+ c #D5DFE5",
+">+ c #BCCCD5",
+",+ c #BFD4E1",
+"'+ c #BED2DE",
+")+ c #C6D8E2",
+"!+ c #C2CFD8",
+"~+ c #BACCD7",
+"{+ c #A6BBC9",
+"]+ c #BCCFDA",
+"^+ c #B8C9D4",
+"/+ c #8FB0C6",
+"(+ c #92B1C5",
+"_+ c #9BB1C0",
+":+ c #91AFC4",
+"<+ c #83A4BC",
+"[+ c #7DA5C3",
+"}+ c #7CA4C3",
+"|+ c #83A8C4",
+"1+ c #739FC1",
+"2+ c #70A0C6",
+"3+ c #6C9BC2",
+"4+ c #6192BB",
+"5+ c #5D8DB8",
+"6+ c #5989B5",
+"7+ c #5586B1",
+"8+ c #5181AE",
+"9+ c #E4F3FB",
+"0+ c #E3F3FB",
+"a+ c #E1F3FB",
+"b+ c #DCE7EC",
+"c+ c #D3DFE6",
+"d+ c #D3E0E7",
+"e+ c #D0DFE6",
+"f+ c #D1DDE4",
+"g+ c #D0DFE7",
+"h+ c #CFD5D9",
+"i+ c #CEE1EA",
+"j+ c #C4CED3",
+"k+ c #AFC7D5",
+"l+ c #C2D4DD",
+"m+ c #C6D6E0",
+"n+ c #C3CFD5",
+"o+ c #B5BFC4",
+"p+ c #9CB5C6",
+"q+ c #B2C9D8",
+"r+ c #A9BCC9",
+"s+ c #94B7CD",
+"t+ c #94BDDA",
+"u+ c #A3B7C5",
+"v+ c #90A5B5",
+"w+ c #82A4BC",
+"x+ c #8FAFC6",
+"y+ c #96ADBE",
+"z+ c #829BAE",
+"A+ c #6D96B6",
+"B+ c #6C9EC6",
+"C+ c #6898C0",
+"D+ c #6393BC",
+"E+ c #5F8EBA",
+"F+ c #5A8AB7",
+"G+ c #5587B3",
+"H+ c #5485B1",
+"I+ c #4C7CAC",
+"J+ c #E3F2FA",
+"K+ c #DEF1FA",
+"L+ c #D6E2E9",
+"M+ c #EBEBEC",
+"N+ c #D6E4EB",
+"O+ c #CADCE5",
+"P+ c #DFEAEF",
+"Q+ c #D7E3E8",
+"R+ c #B9CFDB",
+"S+ c #D5DBDD",
+"T+ c #C2D9E5",
+"U+ c #C6D7E1",
+"V+ c #CAD3D8",
+"W+ c #C7D3DA",
+"X+ c #C4D3DB",
+"Y+ c #B2C3CD",
+"Z+ c #B6C0C7",
+"`+ c #B1C7D4",
+" @ c #A0BED1",
+".@ c #A6BAC7",
+"+@ c #93B3C7",
+"@@ c #9CBED5",
+"#@ c #92AEC1",
+"$@ c #ABBBC6",
+"%@ c #82A3BC",
+"&@ c #92B7D1",
+"*@ c #B0B8BE",
+"=@ c #728EA4",
+"-@ c #6595BC",
+";@ c #699BC5",
+">@ c #6595BE",
+",@ c #6092BB",
+"'@ c #5B8DB8",
+")@ c #5789B5",
+"!@ c #5384B2",
+"~@ c #5282B0",
+"{@ c #4477A8",
+"]@ c #EAF6FB",
+"^@ c #E1F2F9",
+"/@ c #DAE9F0",
+"(@ c #D0E2EB",
+"_@ c #ECF0F0",
+":@ c #ECF0F2",
+"<@ c #C9DCE5",
+"[@ c #D1E1E9",
+"}@ c #D4E0E6",
+"|@ c #CCDCE3",
+"1@ c #D3DADE",
+"2@ c #C5D5DF",
+"3@ c #C3DCEA",
+"4@ c #D6DBDD",
+"5@ c #BDC8CF",
+"6@ c #D0D8DD",
+"7@ c #CBD4D9",
+"8@ c #ABC1CF",
+"9@ c #9DBED4",
+"0@ c #B7C2C9",
+"a@ c #97B1C2",
+"b@ c #8AAAC1",
+"c@ c #91B3CB",
+"d@ c #9DB4C4",
+"e@ c #5F8DAF",
+"f@ c #ABC6D9",
+"g@ c #BABDC0",
+"h@ c #5A84A4",
+"i@ c #6E9CC2",
+"j@ c #6C95B7",
+"k@ c #5E8FB8",
+"l@ c #598EBB",
+"m@ c #598BB7",
+"n@ c #5486B3",
+"o@ c #5182B0",
+"p@ c #4D7FAD",
+"q@ c #3B70A3",
+"r@ c #DDF1FB",
+"s@ c #D7E6EE",
+"t@ c #D6E0E6",
+"u@ c #CADFEA",
+"v@ c #DCE3E7",
+"w@ c #DBE0E4",
+"x@ c #C0D6E3",
+"y@ c #CCDFE9",
+"z@ c #CFDADF",
+"A@ c #E5EBEE",
+"B@ c #DBE0E3",
+"C@ c #C1D5E0",
+"D@ c #A9C0CD",
+"E@ c #E0EDF3",
+"F@ c #E4E6E7",
+"G@ c #A5B4BE",
+"H@ c #98B6C9",
+"I@ c #B0CFE2",
+"J@ c #BFC5C9",
+"K@ c #95ADBE",
+"L@ c #8DADC4",
+"M@ c #86ADC9",
+"N@ c #92ACC0",
+"O@ c #759FBE",
+"P@ c #A6B7C4",
+"Q@ c #718CA1",
+"R@ c #759EBE",
+"S@ c #9EAFBC",
+"T@ c #537DA0",
+"U@ c #4E86B5",
+"V@ c #6A93B6",
+"W@ c #5685AF",
+"X@ c #5184B3",
+"Y@ c #4678AA",
+"Z@ c #31689F",
+"`@ c #DEEFF9",
+" # c #DCEFF8",
+".# c #DAEEF9",
+"+# c #D6EBF7",
+"@# c #CEDAE0",
+"## c #D7DFE4",
+"$# c #CBE2EF",
+"%# c #DDE4E8",
+"&# c #BCD8E7",
+"*# c #C0D1DB",
+"=# c #C7D4DC",
+"-# c #BDC9D0",
+";# c #D7DDE0",
+"># c #D2D7DB",
+",# c #9DBDD1",
+"'# c #BDDBED",
+")# c #BFCAD1",
+"!# c #B2C1CB",
+"~# c #A0BDCF",
+"{# c #C7CCCF",
+"]# c #9FB1BC",
+"^# c #77A1BF",
+"/# c #93BBD7",
+"(# c #9CAFBC",
+"_# c #85A6BF",
+":# c #89A3B6",
+"<# c #5A89AD",
+"[# c #7E9DB6",
+"}# c #547C9D",
+"|# c #749DBE",
+"1# c #AABCCB",
+"2# c #5C7E9B",
+"3# c #4D80AD",
+"4# c #4E83B2",
+"5# c #4E80AF",
+"6# c #3A70A4",
+"7# c #2C659C",
+"8# c #DAEEF7",
+"9# c #D9EEF8",
+"0# c #D7ECF8",
+"a# c #CAE1ED",
+"b# c #CEDCE3",
+"c# c #CAD9E1",
+"d# c #DEE4E8",
+"e# c #C3D6E1",
+"f# c #B5CDDA",
+"g# c #C6D0D6",
+"h# c #AEC6D6",
+"i# c #B5CCDA",
+"j# c #EEE9E6",
+"k# c #B6CDDA",
+"l# c #93C2E0",
+"m# c #B8CAD6",
+"n# c #CBD0D2",
+"o# c #8CAFC6",
+"p# c #A4C8DF",
+"q# c #CBCDCE",
+"r# c #96ABB9",
+"s# c #609AC2",
+"t# c #B2CBDD",
+"u# c #94A9B8",
+"v# c #81A0B8",
+"w# c #7397B4",
+"x# c #779CBA",
+"y# c #6C91AE",
+"z# c #6E96B7",
+"A# c #AAB8C4",
+"B# c #939EA7",
+"C# c #3D709C",
+"D# c #4E84B5",
+"E# c #4F81B1",
+"F# c #477BAC",
+"G# c #2E679E",
+"H# c #2E659C",
+"I# c #D8EDF7",
+"J# c #D7EBF6",
+"K# c #D3E7F1",
+"L# c #D3ECF8",
+"M# c #CFE4ED",
+"N# c #CFDAE0",
+"O# c #C6E1EF",
+"P# c #BFD5E0",
+"Q# c #C4D9E4",
+"R# c #C4D8E3",
+"S# c #B7CDD9",
+"T# c #BDD5E3",
+"U# c #D3E1E7",
+"V# c #D6E1E8",
+"W# c #8ABBD8",
+"X# c #CADDE8",
+"Y# c #E0E3E5",
+"Z# c #79AECE",
+"`# c #C2DBEA",
+" $ c #C7CBCD",
+".$ c #6DA0C2",
+"+$ c #AACCE3",
+"@$ c #F4EEEA",
+"#$ c #82A4BD",
+"$$ c #76ACD2",
+"%$ c #8DA8BC",
+"&$ c #799AB3",
+"*$ c #7499B5",
+"=$ c #6594B8",
+"-$ c #88A5BC",
+";$ c #9AB1C2",
+">$ c #C6C8CA",
+",$ c #7E909F",
+"'$ c #30638F",
+")$ c #5088BA",
+"!$ c #5685B0",
+"~$ c #5F83A5",
+"{$ c #326BA0",
+"]$ c #29639C",
+"^$ c #2D649B",
+"/$ c #DFEFF8",
+"($ c #D6EBF6",
+"_$ c #D5EBF6",
+":$ c #D3E8F5",
+"<$ c #CDDEE7",
+"[$ c #CBDFEA",
+"}$ c #CAE7F5",
+"|$ c #C9DBE4",
+"1$ c #C8D9E2",
+"2$ c #BCD3E0",
+"3$ c #B8D0DD",
+"4$ c #D4E0E7",
+"5$ c #CCDCE4",
+"6$ c #C5D7E2",
+"7$ c #C6D3DB",
+"8$ c #CDD8DE",
+"9$ c #B6D3E4",
+"0$ c #8EC1DF",
+"a$ c #D2DCE1",
+"b$ c #ACC1CE",
+"c$ c #B4CDDC",
+"d$ c #B0C0CB",
+"e$ c #669EC3",
+"f$ c #BCD9EC",
+"g$ c #FFFDF8",
+"h$ c #88A5B9",
+"i$ c #87ABC5",
+"j$ c #7B9AB1",
+"k$ c #6E95B2",
+"l$ c #6A9ABF",
+"m$ c #9BB4C7",
+"n$ c #92A4B4",
+"o$ c #B4BDC3",
+"p$ c #919EA8",
+"q$ c #4B779C",
+"r$ c #7498B7",
+"s$ c #3971A2",
+"t$ c #6890B4",
+"u$ c #587A9A",
+"v$ c #1E5C98",
+"w$ c #2A649D",
+"x$ c #2A629A",
+"y$ c #DCEDF7",
+"z$ c #D3E9F5",
+"A$ c #D1E9F5",
+"B$ c #CFE8F5",
+"C$ c #C9DEE9",
+"D$ c #C9D5DA",
+"E$ c #BEDBEB",
+"F$ c #BFD1DB",
+"G$ c #D5DADD",
+"H$ c #B4D1E1",
+"I$ c #B1D0E1",
+"J$ c #DFE4E7",
+"K$ c #ADC1CC",
+"L$ c #A8C0CF",
+"M$ c #CBD5DC",
+"N$ c #C4D0D8",
+"O$ c #86B9D9",
+"P$ c #ABCBDF",
+"Q$ c #EDE7E4",
+"R$ c #B9C9D4",
+"S$ c #649CC1",
+"T$ c #BDD6E7",
+"U$ c #FFFFFF",
+"V$ c #A0B0BC",
+"W$ c #799AB1",
+"X$ c #869EB0",
+"Y$ c #98B7CF",
+"Z$ c #829AAC",
+"`$ c #5F809B",
+" % c #CBD0D3",
+".% c #91A4B4",
+"+% c #40749E",
+"@% c #7C96AC",
+"#% c #7494B0",
+"$% c #8EA3B5",
+"%% c #3F6385",
+"&% c #2A639A",
+"*% c #29639D",
+"=% c #2A6199",
+"-% c #D9EBF6",
+";% c #D0E7F4",
+">% c #CDE7F4",
+",% c #CDE8F8",
+"'% c #C7E1EE",
+")% c #C1D1DA",
+"!% c #D5DBDF",
+"~% c #C3D5DE",
+"{% c #AFCAD7",
+"]% c #CED8DE",
+"^% c #E0E8EC",
+"/% c #ABCDDF",
+"(% c #ABC5D3",
+"_% c #D4D9DA",
+":% c #97C0D8",
+"<% c #A0C1D5",
+"[% c #BBD3E2",
+"}% c #72AACE",
+"|% c #ECEFF2",
+"1% c #C7D0D6",
+"2% c #8BA8BC",
+"3% c #6AA0C5",
+"4% c #DBE9F4",
+"5% c #C5C8CB",
+"6% c #7794A8",
+"7% c #91ADC1",
+"8% c #7C9BB1",
+"9% c #8EABC2",
+"0% c #8CA3B6",
+"a% c #4478A1",
+"b% c #A6BAC9",
+"c% c #F3F1EE",
+"d% c #7D93A7",
+"e% c #6F8EA8",
+"f% c #61809B",
+"g% c #7B94AB",
+"h% c #7F8F9C",
+"i% c #4A6580",
+"j% c #41688F",
+"k% c #225C96",
+"l% c #296099",
+"m% c #D5EAF5",
+"n% c #CBE4F2",
+"o% c #CCE4F1",
+"p% c #C8E1EE",
+"q% c #C5E0F0",
+"r% c #BFDCEC",
+"s% c #BACDD8",
+"t% c #D7D9DB",
+"u% c #BED4E0",
+"v% c #AECADA",
+"w% c #CED3D6",
+"x% c #CCD7DE",
+"y% c #A9C9DB",
+"z% c #D5DDE3",
+"A% c #BED1DE",
+"B% c #76B3D8",
+"C% c #BAD3E3",
+"D% c #E6E6E6",
+"E% c #76A9CA",
+"F% c #B0CEE1",
+"G% c #C3CBD0",
+"H% c #84A4B9",
+"I% c #83B1D2",
+"J% c #BCC7CF",
+"K% c #69879B",
+"L% c #80A4BE",
+"M% c #8FAABE",
+"N% c #98B0C2",
+"O% c #93A8B8",
+"P% c #44769D",
+"Q% c #99B6CD",
+"R% c #E2E2E1",
+"S% c #4D6B84",
+"T% c #6B8CA7",
+"U% c #2C6496",
+"V% c #809FBC",
+"W% c #7F8A95",
+"X% c #204F7B",
+"Y% c #255A8E",
+"Z% c #265F97",
+"`% c #275E98",
+" & c #D1E7F3",
+".& c #C3DDEC",
+"+& c #C7D6DF",
+"@& c #C8D5DC",
+"#& c #BAD1DF",
+"$& c #BDD6E4",
+"%& c #B5D4E7",
+"&& c #BDD4E1",
+"*& c #D9E0E5",
+"=& c #ABCDE2",
+"-& c #BDCFDA",
+";& c #B6C7D1",
+">& c #C3D4DE",
+",& c #A4C2D5",
+"'& c #CBD8E0",
+")& c #B9D2E1",
+"!& c #99BCD3",
+"~& c #E8E9E8",
+"{& c #AFC9DA",
+"]& c #88B7D6",
+"^& c #DCDEE0",
+"/& c #85A2B5",
+"(& c #92BAD6",
+"_& c #A5B5C0",
+":& c #9EB1BF",
+"<& c #769BB5",
+"[& c #92AFC5",
+"}& c #B8C0C5",
+"|& c #5881A1",
+"1& c #74A1C4",
+"2& c #FFFCF8",
+"3& c #9AA4AD",
+"4& c #3B6B93",
+"5& c #3072AB",
+"6& c #6595BF",
+"7& c #818F9C",
+"8& c #10416E",
+"9& c #165A9A",
+"0& c #1F5F9F",
+"a& c #296299",
+"b& c #275D95",
+"c& c #CDE5F3",
+"d& c #C2DDEC",
+"e& c #CBD5DB",
+"f& c #AFCCDC",
+"g& c #B9CEDA",
+"h& c #ABC8D8",
+"i& c #C8D1D6",
+"j& c #CEDBE3",
+"k& c #A8CBE0",
+"l& c #ABC6D6",
+"m& c #98BFD6",
+"n& c #B4CAD7",
+"o& c #C3D5E0",
+"p& c #C6CCD1",
+"q& c #8FAABC",
+"r& c #C2CED5",
+"s& c #D9DFE3",
+"t& c #98B8CF",
+"u& c #FFFDF9",
+"v& c #94ACBD",
+"w& c #81A8C5",
+"x& c #EEEEED",
+"y& c #A3B1BC",
+"z& c #9AB6CA",
+"A& c #D4D7D9",
+"B& c #5B7D98",
+"C& c #6693B8",
+"D& c #C9D4DD",
+"E& c #C3C5C8",
+"F& c #6C7D8B",
+"G& c #567996",
+"H& c #2567A1",
+"I& c #4079AC",
+"J& c #65819B",
+"K& c #134573",
+"L& c #135798",
+"M& c #4377A9",
+"N& c #4B739B",
+"O& c #225990",
+"P& c #255C96",
+"Q& c #C9E2F1",
+"R& c #C0DDEE",
+"S& c #B6D5E5",
+"T& c #AEC6D5",
+"U& c #CAD6DD",
+"V& c #B6D3E5",
+"W& c #B8CDD9",
+"X& c #98BFD5",
+"Y& c #B5C9D5",
+"Z& c #BDD3E0",
+"`& c #ACC6D5",
+" * c #99BBD1",
+".* c #99C0D9",
+"+* c #A7BDCA",
+"@* c #F2F0EE",
+"#* c #A9C7DC",
+"$* c #5492BA",
+"%* c #AFC3D0",
+"&* c #EDECED",
+"** c #FFFFFE",
+"=* c #94ADBF",
+"-* c #88ACC5",
+";* c #B9C1C8",
+">* c #B6BDC3",
+",* c #708CA2",
+"'* c #779DBB",
+")* c #86A0B6",
+"!* c #849CB0",
+"~* c #718BA1",
+"{* c #457095",
+"]* c #7597B7",
+"^* c #A2B9CE",
+"/* c #8293A3",
+"(* c #446686",
+"_* c #6587A6",
+":* c #5C7A97",
+"<* c #5E7994",
+"[* c #486684",
+"}* c #1C5289",
+"|* c #C5E0EF",
+"1* c #B7D3E4",
+"2* c #C1D4DF",
+"3* c #BCCED9",
+"4* c #D3DDE2",
+"5* c #A7C5D8",
+"6* c #B3C7D4",
+"7* c #ADCADC",
+"8* c #9BBED3",
+"9* c #ABC0CC",
+"0* c #C5D2DA",
+"a* c #C7D1D8",
+"b* c #9CBBD0",
+"c* c #7EB0D0",
+"d* c #B1C6D3",
+"e* c #EFEBE8",
+"f* c #83B3D4",
+"g* c #6AA1C7",
+"h* c #F8F8F7",
+"i* c #8EA8BB",
+"j* c #A7C2D6",
+"k* c #6A859A",
+"l* c #849FB5",
+"m* c #CFD8DF",
+"n* c #8098AA",
+"o* c #3D709B",
+"p* c #90A9BD",
+"q* c #417098",
+"r* c #9BB6CE",
+"s* c #9EA7AF",
+"t* c #778593",
+"u* c #416382",
+"v* c #436A8F",
+"w* c #456B8F",
+"x* c #3C6288",
+"y* c #33577C",
+"z* c #1D4D7F",
+"A* c #245A94",
+"B* c #C0DCED",
+"C* c #B3D2E4",
+"D* c #B3C8D4",
+"E* c #B0C6D3",
+"F* c #A1C1D4",
+"G* c #BDCDD6",
+"H* c #CFDCE3",
+"I* c #C3D8E4",
+"J* c #B4C8D5",
+"K* c #9ABED4",
+"L* c #95B6CC",
+"M* c #B0C2CE",
+"N* c #C7D2D9",
+"O* c #A8BAC6",
+"P* c #8EB5CF",
+"Q* c #5E9EC9",
+"R* c #A4BCCD",
+"S* c #D3D8DC",
+"T* c #5F98C1",
+"U* c #CBDCE8",
+"V* c #94AABB",
+"W* c #CAD8E3",
+"X* c #BBC1C5",
+"Y* c #396E98",
+"Z* c #F5FCFF",
+"`* c #BEBEC0",
+" = c #7696B0",
+".= c #B8D1E5",
+"+= c #567B9B",
+"@= c #3974A7",
+"#= c #9BA8B4",
+"$= c #15426B",
+"%= c #003D7F",
+"&= c #12599C",
+"*= c #145898",
+"== c #105190",
+"-= c #165695",
+";= c #265D96",
+">= c #245992",
+",= c #245993",
+"'= c #BBD9EA",
+")= c #B1D4E9",
+"!= c #A9C5D6",
+"~= c #A8C5D6",
+"{= c #AECBDC",
+"]= c #9BB8CA",
+"^= c #ACBDC7",
+"/= c #C6CFD4",
+"(= c #B1BFC8",
+"_= c #C6D2DA",
+":= c #B6D1E2",
+"<= c #8BB0C8",
+"[= c #98B2C3",
+"}= c #DCE1E5",
+"|= c #BCCCD7",
+"1= c #8DBAD8",
+"2= c #5E9ECB",
+"3= c #C6D1DA",
+"4= c #A2B9CA",
+"5= c #A6C1D5",
+"6= c #A8B6C1",
+"7= c #DBDDDE",
+"8= c #6C8DA7",
+"9= c #AFCBE0",
+"0= c #C5C4C4",
+"a= c #919EA9",
+"b= c #D4D6D7",
+"c= c #AEAFB1",
+"d= c #244F74",
+"e= c #95ACC0",
+"f= c #7D8D9B",
+"g= c #245785",
+"h= c #6B90B3",
+"i= c #406B95",
+"j= c #3F6B96",
+"k= c #6986A3",
+"l= c #466F97",
+"m= c #416489",
+"n= c #396088",
+"o= c #24578E",
+"p= c #225793",
+"q= c #B6D5E9",
+"r= c #ADD2E9",
+"s= c #A6C7DC",
+"t= c #A4BCCB",
+"u= c #9FBCCE",
+"v= c #93B8D0",
+"w= c #85AFCA",
+"x= c #94B3C8",
+"y= c #B6C4CD",
+"z= c #9DBFD5",
+"A= c #BCD0DD",
+"B= c #CBCDD0",
+"C= c #DEDEDE",
+"D= c #70A7CE",
+"E= c #337DB3",
+"F= c #ACBBC7",
+"G= c #C8D2D9",
+"H= c #E8EAEC",
+"I= c #8A9FB1",
+"J= c #ADB3B9",
+"K= c #B9C0C5",
+"L= c #EAE6E2",
+"M= c #2F4D66",
+"N= c #002E66",
+"O= c #27659A",
+"P= c #A4B3BF",
+"Q= c #51728F",
+"R= c #225D93",
+"S= c #2B5A87",
+"T= c #2B5781",
+"U= c #426282",
+"V= c #576F86",
+"W= c #4A6A89",
+"X= c #28507B",
+"Y= c #456180",
+"Z= c #255384",
+"`= c #205693",
+" - c #B1D1E6",
+".- c #A7CCE5",
+"+- c #A6CAE0",
+"@- c #9DC3DC",
+"#- c #92B9D3",
+"$- c #9EC4DB",
+"%- c #97C4E1",
+"&- c #90BBD7",
+"*- c #8ABBDC",
+"=- c #85BADE",
+"-- c #7CADCC",
+";- c #98B4C8",
+">- c #C9D4DA",
+",- c #89A3B5",
+"'- c #3D6C8F",
+")- c #B1BEC7",
+"!- c #1568A6",
+"~- c #4984AF",
+"{- c #FFFFFB",
+"]- c #EBEEF1",
+"^- c #B2B6B9",
+"/- c #47657D",
+"(- c #D9DCDD",
+"_- c #3F5C76",
+":- c #1E5A8F",
+"<- c #729BBE",
+"[- c #C2D0DC",
+"}- c #B3B8BC",
+"|- c #4B6683",
+"1- c #5B80A4",
+"2- c #6086AA",
+"3- c #53799F",
+"4- c #476D93",
+"5- c #6A839D",
+"6- c #395D82",
+"7- c #336293",
+"8- c #355D8B",
+"9- c #22548B",
+"0- c #215691",
+"a- c #ACCEE4",
+"b- c #A3C9E2",
+"c- c #9CC2DC",
+"d- c #A2C2D6",
+"e- c #ACC1D0",
+"f- c #A5B7C2",
+"g- c #A2B9C7",
+"h- c #B4C8D6",
+"i- c #8CBBDB",
+"j- c #62A3CE",
+"k- c #3788BF",
+"l- c #186CA7",
+"m- c #719AB8",
+"n- c #2C72A4",
+"o- c #3E76A0",
+"p- c #A1B4C0",
+"q- c #1B659C",
+"r- c #CDDBE5",
+"s- c #FFFFFC",
+"t- c #335772",
+"u- c #3D73A0",
+"v- c #6F8598",
+"w- c #3E6A8F",
+"x- c #7D99B1",
+"y- c #738696",
+"z- c #A5A8AB",
+"A- c #1E466A",
+"B- c #1D5287",
+"C- c #3A648B",
+"D- c #547493",
+"E- c #496887",
+"F- c #45678A",
+"G- c #667C93",
+"H- c #37597E",
+"I- c #4F6D8E",
+"J- c #315984",
+"K- c #205289",
+"L- c #215490",
+"M- c #A7CAE1",
+"N- c #9EC4DE",
+"O- c #99C3DF",
+"P- c #98BAD2",
+"Q- c #97B3C6",
+"R- c #88ADC6",
+"S- c #8EAEC3",
+"T- c #98B4C7",
+"U- c #97AFC1",
+"V- c #AFC2D0",
+"W- c #98BDD6",
+"X- c #91B6CF",
+"Y- c #7EA3BE",
+"Z- c #386C91",
+"`- c #9FAFB9",
+" ; c #D0D9DF",
+".; c #004E92",
+"+; c #6795B7",
+"@; c #7594AB",
+"#; c #9CB6CA",
+"$; c #A7ACB0",
+"%; c #001454",
+"&; c #76A6CE",
+"*; c #D2D1D1",
+"=; c #49637F",
+"-; c #2B567F",
+";; c #C8D0D8",
+">; c #597186",
+",; c #084C8B",
+"'; c #296FB0",
+"); c #11579A",
+"!; c #094D8F",
+"~; c #175492",
+"{; c #1A5591",
+"]; c #0E4783",
+"^; c #1A518A",
+"/; c #2B5685",
+"(; c #275382",
+"_; c #1E518B",
+":; c #21548F",
+"<; c #A1C5DE",
+"[; c #98C0DC",
+"}; c #91BDDB",
+"|; c #8CBBDA",
+"1; c #8DBCDC",
+"2; c #8BBBDD",
+"3; c #6BA0C6",
+"4; c #7BA2BE",
+"5; c #8B98A1",
+"6; c #718696",
+"7; c #8E9EAB",
+"8; c #7B8C98",
+"9; c #7390A4",
+"0; c #547994",
+"a; c #CDCBCA",
+"b; c #BFD0DC",
+"c; c #5884A5",
+"d; c #DDDEDE",
+"e; c #F1F2F3",
+"f; c #365C7A",
+"g; c #3B6EA1",
+"h; c #FEFFFF",
+"i; c #4C667C",
+"j; c #265587",
+"k; c #D8E4EE",
+"l; c #A8A8AA",
+"m; c #506B82",
+"n; c #5D80A1",
+"o; c #5E7E9D",
+"p; c #6887A4",
+"q; c #5D81A5",
+"r; c #406993",
+"s; c #1B528B",
+"t; c #245E9B",
+"u; c #255C9A",
+"v; c #1C5696",
+"w; c #1F5693",
+"x; c #235690",
+"y; c #21528D",
+"z; c #93BCD9",
+"A; c #90BAD7",
+"B; c #8DB8D6",
+"C; c #89B6D6",
+"D; c #7BA4C2",
+"E; c #7695AB",
+"F; c #728999",
+"G; c #1B5885",
+"H; c #025B9A",
+"I; c #1D6CA6",
+"J; c #3C79A6",
+"K; c #B9C3C9",
+"L; c #627E93",
+"M; c #265F8A",
+"N; c #E9E4DF",
+"O; c #57748C",
+"P; c #86A3BA",
+"Q; c #F7F7F7",
+"R; c #859BAD",
+"S; c #BFCCD3",
+"T; c #CDCECF",
+"U; c #4F7291",
+"V; c #F3FAFC",
+"W; c #C0B8B1",
+"X; c #0C3B68",
+"Y; c #1D578D",
+"Z; c #2F5E89",
+"`; c #325C86",
+" > c #516F8E",
+".> c #6A7D91",
+"+> c #82909F",
+"@> c #617A93",
+"#> c #194E86",
+"$> c #21528A",
+"%> c #2F5B8B",
+"&> c #27588F",
+"*> c #20538E",
+"=> c #21528C",
+"-> c #97BDD9",
+";> c #8EB8D6",
+">> c #8BB6D5",
+",> c #88B4D3",
+"'> c #8EB8D7",
+")> c #72A6CA",
+"!> c #497DA1",
+"~> c #477291",
+"{> c #1E6497",
+"]> c #68A7D5",
+"^> c #8CAFC8",
+"/> c #487799",
+"(> c #C1D2DE",
+"_> c #657D8F",
+":> c #034E87",
+"<> c #1067AA",
+"[> c #608DAF",
+"}> c #C2CFD9",
+"|> c #8AA5BB",
+"1> c #F8F9FA",
+"2> c #E9E5E2",
+"3> c #929EA8",
+"4> c #DFE4E9",
+"5> c #ECE5DF",
+"6> c #334C63",
+"7> c #315A7F",
+"8> c #88A3BD",
+"9> c #1B5C9D",
+"0> c #2162A0",
+"a> c #1E5D9A",
+"b> c #0A4C90",
+"c> c #134A83",
+"d> c #476586",
+"e> c #496582",
+"f> c #395C82",
+"g> c #365C86",
+"h> c #29527F",
+"i> c #2A5281",
+"j> c #205089",
+"k> c #20518C",
+"l> c #91B9D6",
+"m> c #89B4D3",
+"n> c #86B2D2",
+"o> c #8BB5D4",
+"p> c #76A7CC",
+"q> c #4689BB",
+"r> c #367FB4",
+"s> c #3A7FB4",
+"t> c #6F99B7",
+"u> c #AEB4B7",
+"v> c #52728A",
+"w> c #5380A4",
+"x> c #9FA3A6",
+"y> c #1E547F",
+"z> c #347FBC",
+"A> c #2772AE",
+"B> c #004B90",
+"C> c #C3D3DF",
+"D> c #FEFEFE",
+"E> c #E6E7E8",
+"F> c #3E5B75",
+"G> c #EFF6FC",
+"H> c #2B4760",
+"I> c #003E7B",
+"J> c #08549B",
+"K> c #889EB2",
+"L> c #7C94AC",
+"M> c #0E4F91",
+"N> c #3A70A7",
+"O> c #4172A5",
+"P> c #295F99",
+"Q> c #1B528D",
+"R> c #154C8A",
+"S> c #2F5B8A",
+"T> c #2F5681",
+"U> c #194D89",
+"V> c #1E508A",
+"W> c #1F508B",
+"X> c #8CB5D4",
+"Y> c #83AFD0",
+"Z> c #87B1D1",
+"`> c #7BAACC",
+" , c #4C8BBB",
+"., c #4084B8",
+"+, c #4681AF",
+"@, c #7291A8",
+"#, c #5A7C96",
+"$, c #366080",
+"%, c #3F7097",
+"&, c #92A8BB",
+"*, c #426580",
+"=, c #216BA4",
+"-, c #1D6AA8",
+";, c #4684B4",
+">, c #648CAD",
+",, c #778597",
+"', c #DDE0E2",
+"), c #E9EFF4",
+"!, c #CCC5BF",
+"~, c #285885",
+"{, c #185FA3",
+"], c #1F609F",
+"^, c #35618C",
+"/, c #969FA7",
+"(, c #8296AB",
+"_, c #3C6086",
+":, c #7A8B9D",
+"<, c #315983",
+"[, c #1B5593",
+"}, c #255A94",
+"|, c #1F5591",
+"1, c #1C508D",
+"2, c #22538D",
+"3, c #21538E",
+"4, c #20508B",
+"5, c #1F4F8A",
+"6, c #87B1D0",
+"7, c #80ACCE",
+"8, c #5691BD",
+"9, c #4383B5",
+"0, c #4587B9",
+"a, c #477EA9",
+"b, c #3A6B8F",
+"c, c #2D6997",
+"d, c #4578A1",
+"e, c #6587A3",
+"f, c #537088",
+"g, c #155C96",
+"h, c #2571AD",
+"i, c #93B2CB",
+"j, c #B2B7BA",
+"k, c #3A5F7D",
+"l, c #00336E",
+"m, c #688AA7",
+"n, c #E5E9EC",
+"o, c #E4E8ED",
+"p, c #A9B0B7",
+"q, c #35536F",
+"r, c #CFD6DC",
+"s, c #306294",
+"t, c #044E96",
+"u, c #5C7FA4",
+"v, c #597694",
+"w, c #8A9AA9",
+"x, c #57708B",
+"y, c #0D3E72",
+"z, c #215389",
+"A, c #235893",
+"B, c #22548F",
+"C, c #21548E",
+"D, c #20518B",
+"E, c #1F4F89",
+"F, c #1F4D88",
+"G, c #81ACCD",
+"H, c #6599C2",
+"I, c #4483B5",
+"J, c #4885B6",
+"K, c #4383B4",
+"L, c #3E7EAF",
+"M, c #397DB2",
+"N, c #3B7BAE",
+"O, c #1E66A1",
+"P, c #5E88A9",
+"Q, c #517897",
+"R, c #216BA7",
+"S, c #3D78A9",
+"T, c #98A4AE",
+"U, c #3D5D77",
+"V, c #0F5794",
+"W, c #1A69AC",
+"X, c #3A71A2",
+"Y, c #F8F6F5",
+"Z, c #5B7288",
+"`, c #003779",
+" ' c #57748E",
+".' c #657A8F",
+"+' c #316497",
+"@' c #446F9B",
+"#' c #687D94",
+"$' c #3E6894",
+"%' c #778A9E",
+"&' c #2E5682",
+"*' c #295A90",
+"=' c #205590",
+"-' c #22558F",
+";' c #21538D",
+">' c #21518C",
+",' c #20508A",
+"'' c #1F4E89",
+")' c #1E4C87",
+"!' c #7DA8CB",
+"~' c #72A1C6",
+"{' c #4D88B7",
+"]' c #4683B4",
+"^' c #4280B1",
+"/' c #3E7DB0",
+"(' c #3B7BB0",
+"_' c #3679AF",
+":' c #3E78A7",
+"<' c #456D8F",
+"[' c #2C628F",
+"}' c #386F9C",
+"|' c #567A99",
+"1' c #436581",
+"2' c #185B92",
+"3' c #3274AE",
+"4' c #1B609E",
+"5' c #3A6F9E",
+"6' c #F0F0F0",
+"7' c #F2EEE9",
+"8' c #2B4F73",
+"9' c #0F569B",
+"0' c #2E5D8C",
+"a' c #3C6287",
+"b' c #3A638C",
+"c' c #164D86",
+"d' c #345D88",
+"e' c #325A86",
+"f' c #245182",
+"g' c #245388",
+"h' c #20528C",
+"i' c #204F8A",
+"j' c #1F4D87",
+"k' c #1E4C86",
+"l' c #5D91BC",
+"m' c #4480B2",
+"n' c #4882B2",
+"o' c #447FB1",
+"p' c #407DAF",
+"q' c #3C7AAD",
+"r' c #3978AD",
+"s' c #3776AB",
+"t' c #376D9B",
+"u' c #2C6596",
+"v' c #306FA4",
+"w' c #2B699E",
+"x' c #2C6291",
+"y' c #255D8D",
+"z' c #2C6DA6",
+"A' c #2C6AA2",
+"B' c #1A5E9C",
+"C' c #3B6E9D",
+"D' c #F1F1F1",
+"E' c #CACBCD",
+"F' c #11406F",
+"G' c #1F61A1",
+"H' c #316498",
+"I' c #3E648B",
+"J' c #19528D",
+"K' c #255C95",
+"L' c #1D5895",
+"M' c #245487",
+"N' c #1E5189",
+"O' c #1E538E",
+"P' c #215491",
+"Q' c #1E4D88",
+"R' c #1D4C87",
+"S' c #1E4A86",
+"T' c #6F9CC2",
+"U' c #4E85B4",
+"V' c #4680B1",
+"W' c #457FB0",
+"X' c #427CAF",
+"Y' c #3E7AAD",
+"Z' c #3B78AC",
+"`' c #3875AA",
+" ) c #3573A8",
+".) c #3270A7",
+"+) c #306EA5",
+"@) c #2E6EA6",
+"#) c #2F6FA6",
+"$) c #2B69A2",
+"%) c #2A69A2",
+"&) c #2D6AA2",
+"*) c #2B679F",
+"=) c #185A99",
+"-) c #3E709E",
+";) c #F6F4F3",
+">) c #ABB3BA",
+",) c #073C72",
+"') c #26619E",
+")) c #235D98",
+"!) c #24568A",
+"~) c #26598F",
+"{) c #245B96",
+"]) c #215792",
+"^) c #225690",
+"/) c #235590",
+"() c #22548E",
+"_) c #20538C",
+":) c #1D4A85",
+"<) c #467FB0",
+"[) c #477FB0",
+"}) c #447DAE",
+"|) c #407BAD",
+"1) c #3D78AB",
+"2) c #3A75A9",
+"3) c #3773A8",
+"4) c #3370A6",
+"5) c #326FA6",
+"6) c #306EA4",
+"7) c #2D6BA2",
+"8) c #2D6AA1",
+"9) c #2D69A2",
+"0) c #2B68A0",
+"a) c #2B669E",
+"b) c #2A669D",
+"c) c #125493",
+"d) c #4676A4",
+"e) c #FEFDFB",
+"f) c #98A3AF",
+"g) c #003871",
+"h) c #26609C",
+"i) c #255C94",
+"j) c #235B96",
+"k) c #235892",
+"l) c #235691",
+"m) c #1F508A",
+"n) c #1E4B86",
+"o) c #1E4A85",
+"p) c #1D4984",
+"q) c #5688B5",
+"r) c #447CAE",
+"s) c #457DAE",
+"t) c #427AAC",
+"u) c #3E77AB",
+"v) c #3C75A9",
+"w) c #3873A7",
+"x) c #3571A5",
+"y) c #326FA4",
+"z) c #316DA3",
+"A) c #2F6BA1",
+"B) c #2D69A1",
+"C) c #2D689F",
+"D) c #2C669E",
+"E) c #2A659D",
+"F) c #2A659C",
+"G) c #074B8D",
+"H) c #5B83AB",
+"I) c #A5B0BB",
+"J) c #003671",
+"K) c #255E9A",
+"L) c #245A93",
+"M) c #235792",
+"N) c #22568F",
+"O) c #1D4985",
+"P) c #1C4984",
+"Q) c #1C4883",
+"R) c #4D81AF",
+"S) c #457AAC",
+"T) c #4379AB",
+"U) c #4077AA",
+"V) c #3D75A8",
+"W) c #3A73A7",
+"X) c #3770A5",
+"Y) c #346EA4",
+"Z) c #326DA2",
+"`) c #306AA1",
+" ! c #2E69A0",
+".! c #2D679F",
+"+! c #2A649B",
+"@! c #29639B",
+"#! c #25609A",
+"$! c #084786",
+"%! c #C2D0DF",
+"&! c #355E8B",
+"*! c #134D8E",
+"=! c #235790",
+"-! c #21508B",
+";! c #1E4B87",
+">! c #1D4B86",
+",! c #1C4884",
+"'! c #1C4782",
+")! c #497CAC",
+"!! c #4478AA",
+"~! c #4176A9",
+"{! c #3E75A7",
+"]! c #3B73A6",
+"^! c #3970A5",
+"/! c #366FA3",
+"(! c #346DA2",
+"_! c #316AA1",
+":! c #2F689F",
+"<! c #2D689E",
+"[! c #2B659D",
+"}! c #2B639B",
+"|! c #286299",
+"1! c #286199",
+"2! c #245B93",
+"3! c #8A9BAC",
+"4! c #949DA7",
+"5! c #949EAA",
+"6! c #949EA9",
+"7! c #9DA3AA",
+"8! c #4F6A88",
+"9! c #114988",
+"0! c #22558E",
+"a! c #1F4E88",
+"b! c #1D4883",
+"c! c #1B4782",
+"d! c #477AAB",
+"e! c #4579A9",
+"f! c #4276A8",
+"g! c #3F74A6",
+"h! c #3D72A5",
+"i! c #396FA3",
+"j! c #376DA2",
+"k! c #346BA1",
+"l! c #31699F",
+"m! c #30679D",
+"n! c #2D659D",
+"o! c #2B649B",
+"p! c #296199",
+"q! c #275F97",
+"r! c #275E96",
+"s! c #285F97",
+"t! c #073E77",
+"u! c #002F66",
+"v! c #003068",
+"w! c #002F67",
+"x! c #18487E",
+"y! c #275992",
+"z! c #225590",
+"A! c #1E4D87",
+"B! c #1C4683",
+" ",
+" ",
+" ",
+" . . + @ # $ % & * = - ; > , ' ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+" b b c d . e f g h i j k l m n o p q r s t u _ v w x y z A B C D E F G H I J K L M ",
+" + N O P P Q R f S T U V W m X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._. ",
+" + :.P & P Q <.g [.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u. ",
+" + Q P P * . e v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.b.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+ ",
+" + . Q Q . e ++@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+q.4+5+6+7+8+ ",
+" # R = 9+e 0+a+b+c+d+e+f+g+h+` i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+ ",
+" $ f f J+g S K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@ ",
+" ]@^@S [.h }./@(@_@:@<@[@}@|@1@2@3@4@5@6@Z 7@8@9@0@a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@ ",
+" & h x.x.i r@s@t@u@v@w@x@y@z@A@B@C@B.D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@X@o@Y@Z@ ",
+" * `@#+ #j .#+#@###$#%#v@&#*#=#-#;#>#,#'#)#!#~#: {#]#^#/#(#_#:#<#[#}#|#1#2#3#4#5#6#7# ",
+" e j 8#k 9#0#2.a#b#c#] d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#A#B#C#D#E#F#G#H# ",
+" - I#I#J#K#L#M#N#O#P#Q#R#S#T#U#V#W#X#Y#Z#`# $.$+$@$#$$$%$&$*$=$-$;$>$,$'$)$!$~${$]$^$ ",
+" /$($_$:$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$f$g$h$i$j$k$l$m$n$o$p$q$r$s$t$u$v$w$x$ ",
+" y$z$A$B$C$D$y@E$F$G$H$I$J$K$L$M$N$O$P$Q$R$p+S$T$U$V$W$X$A+Y$Z$`$ %.%+%@%#%$%%%&%*%=% ",
+" -%;%>%,%'%)%!%~%{%]%^%/%(%_%:%<%@$[%}%|%1%2%3%4%5%6%7%8%9%0%a%b%c%d%e%f%g%h%i%j%k%l% ",
+" m%n%o%p%q%r%s%t%u%v%w%x%y%z%A%B%C%D%E%F%G%H%I%J%K%L%M%N%O%P%Q%U$R%S%T%U%V%W%X%Y%Z%`% ",
+" &.&+&@&#&$&%&&&*&=&-&;&>&,&'&)&!&~&{&]&^&/&(&_&:&<&[&}&|&1&U$2&3&4&5&6&7&8&9&0&a&b& ",
+" c&d&R+e&T#f&g&h&i&j&k&l&m&n&o&p&q&r&s&t&u&v&w&x&y&z&A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P& ",
+" Q&R&S&T&U&V&+.W&X&Y&Z&`& *.*+*@*#*$*%*&***=*-*U$;*>*,*'*)*!*~*{*]*^*/*(*_*:*<*[*}*P& ",
+" |*1*2*k#3*4*5*6*7*8*9*0*a*b*c*d*e*f*g*h*U$i*j*u&k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z*P&A* ",
+" B*C*D*E*F*G*H*I*J*K*L*M*N*O*P*Q*R*S*T*U*U$V*W*X*Y*Z*`* =.=+=@=#=$=%=&=*===-=;=>=A*,= ",
+" '=)=!=~={=]=^=/=(=_=:=<=[=}=|=1=2=3=4=5=U$6=7=8=9=0=a=b=c=d=e=f=g=h=i=j=k=l=m=n=o=p= ",
+" q=r=s=t=L$u=v=w=w=x=y=N*z=A=B=C=D=E=F=G=U$H=J@I=J=K=L=M=N=O=P=Q=R=S=T=U=V=W=X=Y=Z=`= ",
+" -.-+-@-#-$-%-&-*-=---;-_+>-,-'-)-!-~-{-U$U$]-^-/-(-_-:-<-[-}-|-1-2-3-4-5-6-7-8-9-0- ",
+" a-b-c-d-e-f-^+g-h-i-j-k-l-m-u&n-o-p-q-r-U$U$s-t-u-v-w-x-y-z-A-B-C-D-E-F-G-H-I-J-K-L- ",
+" M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-`- ;.;+;@;#;U$U$$;%;&;*;=;-;;;>;,;';);!;~;{;];^;/;(;_;:; ",
+" <;[;-.};|;1;2;3;4;5;6;7;8;9;0;a;b;c;d;e;U$**f;g;h;i;j;k;l;m;n;o;p;q;r;s;t;u;v;w;x;y; ",
+" c-z;A;B;C;B;D;E;F;G;H;I;J;K;L;M;N;O;P;U$U$Q;R;S;T;U;V;W;X;Y;Z;`; >.>+>@>#>$>%>&>*>=> ",
+" ->;>>>,>'>)>!>~>{>]>^>/>(>_>:><>[>}>|>U$U$1>2>3>4>5>6>7>8>9>0>a>b>c>d>e>f>g>h>i>j>k> ",
+" l>m>n>o>p>q>r>s>t>u>v>w>x>y>z>A>B>C>U$D>U$E>F>G>U$H>I>J>K>L>M>N>O>P>Q>R>S>T>U>V>j>W> ",
+" X>Y>Z>`> ,.,+,@,#,$,%,&,*,=,-,;,>,,,D%U$U$',7>),!,~,{,],^,/,(,_,:,<,[,},|,1,2,3,4,5, ",
+" 6,l.7,8,9,0,a,b,c,d,e,f,g,h,i,j,k,l,m,U$U$n,o,p,q,r,s,t,u,v,w,x,y,z,A,x;B,C,=>D,E,F, ",
+" G,E H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,U$U$U$Z,`, '.'+'@'#'$'%'&'*'='-';'>'4,,''')' ",
+" !'~'{']']'^'/'('_':'<'['}'|'1'2'3'4'5'6'U$U$7'8'9'0'a'b'c'd'e'f'&'g'3,C,h'4,i'''j'k' ",
+" !.l'm'n'o'p'q'r's't'u'v'w'x'y'z'A'B'C'D'U$U$E'F'G'H'I'J'K'L'M'N'O'P'2,=>D,5,''Q'R'S' ",
+" T'U'V'W'X'Y'Z'`' ).)+)@)#)$)%)&)*)=)-);)U$U$>),)')))!)~){)A,])^)/)()_)4,i'''Q'k'S':) ",
+" 4+<)[)})|)1)2)3)4)5)6)7)8)9)0)a)b)c)d)e)U$U$f)g)h)i)j),=k)l)^)-';'=>D,m)''F,)'n)o)p) ",
+" q)r)s)t)u)v)w)x)y)z)A)B)C)D)E)F)F)G)H)U$U$U$I)J)K)L)>=M)^)N)C,;'h'4,,'''F,)'n)O)P)Q) ",
+" R)S)T)U)V)W)X)Y)Z)`) !.!D)w$+!@!#!$!%!U$U$U$U$&!*!k)=!x;B,;'y;=>-!E,''F,;!>!:)p),!'! ",
+" )!!!~!{!]!^!/!(!_!:!<![!}!@!|!1!))2!3!4!5!6!7!8!9!M)-'0!2,y;k>4,5,a!Q')'n):)P)b!c! ",
+" d!e!f!g!h!i!j!k!l!m!n!o!x$p!q!r!s!l%t!u!v!w!N=x!y!z!();'k>4,,'''F,A!k':):)p)Q)B! ",
+" ",
+" ",
+" "};
diff --git a/dependencies/eclipse/3.2/macosx/i386/org.eclipse.swt.carbon.macosx_3.2.1.v3235.jar b/dependencies/eclipse/3.2/macosx/i386/org.eclipse.swt.carbon.macosx_3.2.1.v3235.jar
new file mode 100644
index 0000000..e093021
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/i386/org.eclipse.swt.carbon.macosx_3.2.1.v3235.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/macosx/i386/rcp/configuration/config.ini b/dependencies/eclipse/3.2/macosx/i386/rcp/configuration/config.ini
new file mode 100644
index 0000000..0b6d485
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/i386/rcp/configuration/config.ini
@@ -0,0 +1,9 @@
+#Product Runtime Configuration File
+
+osgi.splashPath=platform:/base/plugins/org.apache.directory.studio
+eclipse.product=org.apache.directory.studio.product
+osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
+osgi.bundles.defaultStartLevel=4
+
+# The workspace location
+osgi.instance.area.default=@user.home/.ApacheDirectoryStudio
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/macosx/i386/rcp/eclipse.app/Contents/Info.plist b/dependencies/eclipse/3.2/macosx/i386/rcp/eclipse.app/Contents/Info.plist
new file mode 100644
index 0000000..19f2113
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/i386/rcp/eclipse.app/Contents/Info.plist
Binary files differ
diff --git a/dependencies/eclipse/3.2/macosx/i386/rcp/eclipse.app/Contents/MacOS/ApacheDirectoryStudio b/dependencies/eclipse/3.2/macosx/i386/rcp/eclipse.app/Contents/MacOS/ApacheDirectoryStudio
new file mode 100755
index 0000000..33855c8
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/i386/rcp/eclipse.app/Contents/MacOS/ApacheDirectoryStudio
Binary files differ
diff --git a/dependencies/eclipse/3.2/macosx/i386/rcp/eclipse.app/Contents/MacOS/workspace/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml b/dependencies/eclipse/3.2/macosx/i386/rcp/eclipse.app/Contents/MacOS/workspace/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml
new file mode 100644
index 0000000..2f64dc9
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/i386/rcp/eclipse.app/Contents/MacOS/workspace/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbench version="2.0">
+<workbenchAdvisor/>
+<mruList/>
+</workbench>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/macosx/i386/rcp/eclipse.app/Contents/Resources/studio.icns b/dependencies/eclipse/3.2/macosx/i386/rcp/eclipse.app/Contents/Resources/studio.icns
new file mode 100644
index 0000000..54913c2
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/i386/rcp/eclipse.app/Contents/Resources/studio.icns
Binary files differ
diff --git a/dependencies/eclipse/3.2/macosx/i386/rcp/startup.jar b/dependencies/eclipse/3.2/macosx/i386/rcp/startup.jar
new file mode 100644
index 0000000..ab2acc6
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/i386/rcp/startup.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/macosx/ppc/org.eclipse.swt.carbon.macosx_3.2.1.v3235.jar b/dependencies/eclipse/3.2/macosx/ppc/org.eclipse.swt.carbon.macosx_3.2.1.v3235.jar
new file mode 100644
index 0000000..e093021
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/ppc/org.eclipse.swt.carbon.macosx_3.2.1.v3235.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/macosx/ppc/rcp/configuration/config.ini b/dependencies/eclipse/3.2/macosx/ppc/rcp/configuration/config.ini
new file mode 100644
index 0000000..0b6d485
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/ppc/rcp/configuration/config.ini
@@ -0,0 +1,9 @@
+#Product Runtime Configuration File
+
+osgi.splashPath=platform:/base/plugins/org.apache.directory.studio
+eclipse.product=org.apache.directory.studio.product
+osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
+osgi.bundles.defaultStartLevel=4
+
+# The workspace location
+osgi.instance.area.default=@user.home/.ApacheDirectoryStudio
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/macosx/ppc/rcp/eclipse.app/Contents/Info.plist b/dependencies/eclipse/3.2/macosx/ppc/rcp/eclipse.app/Contents/Info.plist
new file mode 100644
index 0000000..19f2113
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/ppc/rcp/eclipse.app/Contents/Info.plist
Binary files differ
diff --git a/dependencies/eclipse/3.2/macosx/ppc/rcp/eclipse.app/Contents/MacOS/ApacheDirectoryStudio b/dependencies/eclipse/3.2/macosx/ppc/rcp/eclipse.app/Contents/MacOS/ApacheDirectoryStudio
new file mode 100755
index 0000000..33855c8
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/ppc/rcp/eclipse.app/Contents/MacOS/ApacheDirectoryStudio
Binary files differ
diff --git a/dependencies/eclipse/3.2/macosx/ppc/rcp/eclipse.app/Contents/MacOS/workspace/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml b/dependencies/eclipse/3.2/macosx/ppc/rcp/eclipse.app/Contents/MacOS/workspace/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml
new file mode 100644
index 0000000..2f64dc9
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/ppc/rcp/eclipse.app/Contents/MacOS/workspace/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbench version="2.0">
+<workbenchAdvisor/>
+<mruList/>
+</workbench>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/macosx/ppc/rcp/eclipse.app/Contents/Resources/studio.icns b/dependencies/eclipse/3.2/macosx/ppc/rcp/eclipse.app/Contents/Resources/studio.icns
new file mode 100644
index 0000000..54913c2
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/ppc/rcp/eclipse.app/Contents/Resources/studio.icns
Binary files differ
diff --git a/dependencies/eclipse/3.2/macosx/ppc/rcp/startup.jar b/dependencies/eclipse/3.2/macosx/ppc/rcp/startup.jar
new file mode 100644
index 0000000..ab2acc6
--- /dev/null
+++ b/dependencies/eclipse/3.2/macosx/ppc/rcp/startup.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/com.ibm.icu_3.4.5.jar b/dependencies/eclipse/3.2/plugins/com.ibm.icu_3.4.5.jar
new file mode 100644
index 0000000..bccb464
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/com.ibm.icu_3.4.5.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/META-INF/MANIFEST.MF b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8bf8921
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-Name: %lucene_plugin_name
+Bundle-ClassPath: lucene-1.4.3.jar,parser.jar
+Bundle-RequiredExecutionEnvironment: J2SE-1.3
+Bundle-Vendor: %providerName
+Bundle-ManifestVersion: 2
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.apache.lucene
+Export-Package: org.apache.lucene.analysis,org.apache.lucene.analysis.
+ de,org.apache.lucene.analysis.ru,org.apache.lucene.analysis.standard,
+ org.apache.lucene.demo.html;x-friends:="org.eclipse.help.base,org.ecl
+ ipse.pde.ui",org.apache.lucene.document,org.apache.lucene.index,org.a
+ pache.lucene.queryParser,org.apache.lucene.search,org.apache.lucene.s
+ earch.spans,org.apache.lucene.store,org.apache.lucene.util
+Bundle-Version: 1.4.103.v20060601
+Eclipse-LazyStart: false
+
diff --git a/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/META-INF/eclipse.inf b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/META-INF/eclipse.inf
new file mode 100644
index 0000000..dd5ea10
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/META-INF/eclipse.inf
@@ -0,0 +1,2 @@
+#Thu Sep 21 11:23:39 EDT 2006
+pack200.conditioned=true
diff --git a/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/about.html b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/about.html
new file mode 100644
index 0000000..8cb3a47
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/about.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 10, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you
+did not receive this Content directly from the Eclipse Foundation, the following is provided
+for informational purposes only, and you should look to the Redistributor’s license for
+terms and conditions of use.</p>
+
+<h4>Lucene 1.4.3 and HTML Parser</h4>
+
+<p>The plug-in includes software developed by The Apache Software Foundation as part of the Ant project.</p>
+
+<p>The Lucene binary code is contained in the file lucene-1.4.3.jar. The corresponding
+source code is contained in the file lucene-1.4.3-src.zip. Both files are provided without modification.</p>
+
+<p>The "HTML Parser" is based on the Lucene demo code found in lucene-1.4.3-src.zip. The binary code for the HTML Parser is contained
+in parser.jar and the corresponding source code is contained in the file parsersrc.zip.</p>
+
+<p>Your use of the Lucene code and the HTML Parser is subject to the terms and conditions of the Apache Software License 2.0. A copy of the license is contained
+in the file <a href="about_files/asl-v20.txt">asl-v20.txt</a> and is also available at <a href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a>.
+
+<p>The names "Lucene" and "Apache Software Foundation" must not be used to endorse or promote products derived from this
+software without prior written permission. For written permission, please contact <a href="mailto:apache@apache.org">apache@apache.org</a>.</p>
+
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/about_files/asl-v20.txt b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/about_files/asl-v20.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/about_files/asl-v20.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/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/lucene-1.4.3.jar b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/lucene-1.4.3.jar
new file mode 100644
index 0000000..2319dc5
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/lucene-1.4.3.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/parser.jar b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/parser.jar
new file mode 100644
index 0000000..754e1ee
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/parser.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/plugin.properties b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/plugin.properties
new file mode 100644
index 0000000..5865400
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.apache.lucene_1.4.103.v20060601/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2000, 2005 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+lucene_plugin_name=Apache Lucene
+providerName=Eclipse.org
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.commands_3.2.0.I20060605-1400.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.core.commands_3.2.0.I20060605-1400.jar
new file mode 100644
index 0000000..c864864
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.commands_3.2.0.I20060605-1400.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.contenttype_3.2.0.v20060603.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.core.contenttype_3.2.0.v20060603.jar
new file mode 100644
index 0000000..816e3fc
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.contenttype_3.2.0.v20060603.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.expressions_3.2.1.r321_v20060721.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.core.expressions_3.2.1.r321_v20060721.jar
new file mode 100644
index 0000000..e91228b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.expressions_3.2.1.r321_v20060721.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.filebuffers_3.2.1.r321_v20060721.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.core.filebuffers_3.2.1.r321_v20060721.jar
new file mode 100644
index 0000000..c83b70a
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.filebuffers_3.2.1.r321_v20060721.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.filesystem_1.0.0.v20060603.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.core.filesystem_1.0.0.v20060603.jar
new file mode 100644
index 0000000..59d401b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.filesystem_1.0.0.v20060603.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.jobs_3.2.0.v20060603.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.core.jobs_3.2.0.v20060603.jar
new file mode 100644
index 0000000..995bcd2
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.jobs_3.2.0.v20060603.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.resources_3.2.1.R32x_v20060914.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.core.resources_3.2.1.R32x_v20060914.jar
new file mode 100644
index 0000000..1fc04a7
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.resources_3.2.1.R32x_v20060914.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.0.v20060511.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.0.v20060511.jar
new file mode 100644
index 0000000..b360c55
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.0.v20060511.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/META-INF/MANIFEST.MF b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b856a25
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-Name: %fragmentName
+Bundle-ClassPath: runtime_registry_compatibility.jar
+Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3
+Eclipse-PatchFragment: true
+Bundle-Vendor: %providerName
+Bundle-ManifestVersion: 2
+Fragment-Host: org.eclipse.equinox.registry;bundle-version="[3.2.0,3.3
+ .0)"
+Bundle-Localization: fragment
+Bundle-SymbolicName: org.eclipse.core.runtime.compatibility.registry
+Bundle-Version: 3.2.1.R32x_v20060907
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/META-INF/eclipse.inf b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/META-INF/eclipse.inf
new file mode 100644
index 0000000..40f368b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/META-INF/eclipse.inf
@@ -0,0 +1,2 @@
+#Thu Sep 21 11:26:17 EDT 2006
+pack200.conditioned=true
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/about.html b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/about.html
new file mode 100644
index 0000000..4602330
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 2, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/fragment.properties b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/fragment.properties
new file mode 100644
index 0000000..e60dbf5
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/fragment.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2006 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+providerName=Eclipse.org
+fragmentName=Eclipse Registry Compatibility Fragment
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/runtime_registry_compatibility.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/runtime_registry_compatibility.jar
new file mode 100644
index 0000000..b6e344b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.1.R32x_v20060907/runtime_registry_compatibility.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility_3.1.100.v20060603.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility_3.1.100.v20060603.jar
new file mode 100644
index 0000000..a1aab28
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime.compatibility_3.1.100.v20060603.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime_3.2.0.v20060603.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime_3.2.0.v20060603.jar
new file mode 100644
index 0000000..85e61cc
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.core.runtime_3.2.0.v20060603.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.equinox.common_3.2.0.v20060603.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.equinox.common_3.2.0.v20060603.jar
new file mode 100644
index 0000000..e28a631
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.equinox.common_3.2.0.v20060603.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.equinox.preferences_3.2.1.R32x_v20060717.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.equinox.preferences_3.2.1.R32x_v20060717.jar
new file mode 100644
index 0000000..9063175
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.equinox.preferences_3.2.1.R32x_v20060717.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.equinox.registry_3.2.1.R32x_v20060814.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.equinox.registry_3.2.1.R32x_v20060814.jar
new file mode 100644
index 0000000..d8e2719
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.equinox.registry_3.2.1.R32x_v20060814.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.appserver_3.1.100.v20060602.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.help.appserver_3.1.100.v20060602.jar
new file mode 100644
index 0000000..f23aff2
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.appserver_3.1.100.v20060602.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.base_3.2.1.R321_v20060822.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.help.base_3.2.1.R321_v20060822.jar
new file mode 100644
index 0000000..deaba5f
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.base_3.2.1.R321_v20060822.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.ui_3.2.0.v20060602.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.help.ui_3.2.0.v20060602.jar
new file mode 100644
index 0000000..e90534e
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.ui_3.2.0.v20060602.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/.options b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/.options
new file mode 100644
index 0000000..8490686
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/.options
@@ -0,0 +1,2 @@
+org.eclipse.help.webapp/debug = true
+org.eclipse.help.webapp/debug/workingsets = false
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/META-INF/MANIFEST.MF b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..a0f5d4d
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-Activator: org.eclipse.help.internal.webapp.HelpWebappPlugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Export-Package: org.eclipse.help.internal.webapp;x-friends:="org.eclip
+ se.ua.tests"
+Bundle-Version: 3.2.1.R321_v20060803
+Eclipse-LazyStart: true
+Bundle-Name: %help_webapp_plugin_name
+Bundle-ClassPath: webapp.jar
+Bundle-ManifestVersion: 2
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.help.webapp; singleton:=true
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.help.base;bundle-version="[3.1.0,4.0.0)",o
+ rg.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)"
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/META-INF/eclipse.inf b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/META-INF/eclipse.inf
new file mode 100644
index 0000000..4451858
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/META-INF/eclipse.inf
@@ -0,0 +1,2 @@
+#Thu Sep 21 11:29:24 EDT 2006
+pack200.conditioned=true
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/WEB-INF/lib/jsp.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/WEB-INF/lib/jsp.jar
new file mode 100644
index 0000000..e63ad29
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/WEB-INF/lib/jsp.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/WEB-INF/lib/servlets.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/WEB-INF/lib/servlets.jar
new file mode 100644
index 0000000..b2d16cd
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/WEB-INF/lib/servlets.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/WEB-INF/lib/servletssrc.zip b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/WEB-INF/lib/servletssrc.zip
new file mode 100644
index 0000000..87c6fd4
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/WEB-INF/lib/servletssrc.zip
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/WEB-INF/web.xml b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/WEB-INF/web.xml
new file mode 100644
index 0000000..afe5804
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/WEB-INF/web.xml
@@ -0,0 +1,663 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
+ "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
+
+<web-app>
+
+ <servlet>
+ <servlet-name>control</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.servlet.ControlServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>content</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.servlet.ContentServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>livehelp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.servlet.LiveHelpServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>toc</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.servlet.TocServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>index</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.servlet.IndexServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>search</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.servlet.SearchServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>context</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.servlet.ContextServlet</servlet-class>
+ </servlet>
+
+
+<!--
+Automatically created by Tomcat JspC.
+Place this fragement in the web.xml before all icon, display-name,
+description, distributable, and context-param elements.
+-->
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.index_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.index_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.err_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.err_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.header_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.header_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.help_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.help_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.index_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.index_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.indexToolbar_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.indexToolbar_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.indexView_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.indexView_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.linksToolbar_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.linksToolbar_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.linksView_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.linksView_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.livehelp_js_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.livehelp_js_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.searchToolbar_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.searchToolbar_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.searchView_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.searchView_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.tabs_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.tabs_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.tocToolbar_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.tocToolbar_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.tocView_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.tocView_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.toolbar_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.toolbar_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.view_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.basic.view_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.advanced_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.advanced_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.askShowAll_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.askShowAll_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.bookmarksToolbar_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.bookmarksToolbar_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.bookmarksView_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.bookmarksView_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.confirm_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.confirm_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.confirmShowAll_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.confirmShowAll_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.content_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.content_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.contentToolbar_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.contentToolbar_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.err_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.err_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.fheader_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.fheader_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.header_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.header_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.help_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.help_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.index_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.index_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.indexList_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.indexList_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.indexToolbar_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.indexToolbar_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.indexTypein_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.indexTypein_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.indexView_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.indexView_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.linksToolbar_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.linksToolbar_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.linksView_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.linksView_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.livehelp_js_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.livehelp_js_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.nav_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.nav_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.search_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.search_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.searchScoped_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.searchScoped_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.searchSimple_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.searchSimple_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.searchToolbar_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.searchToolbar_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.searchView_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.searchView_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.tabs_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.tabs_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.tocFragment_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.tocFragment_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.tocToolbar_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.tocToolbar_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.tocView_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.tocView_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.toolbar_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.toolbar_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.view_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.view_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.views_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.views_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.workingSet_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.workingSet_jsp</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.workingSetManager_jsp</servlet-name>
+ <servlet-class>org.eclipse.help.internal.webapp.jsp.advanced.workingSetManager_jsp</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.index_jsp</servlet-name>
+ <url-pattern>/index.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.err_jsp</servlet-name>
+ <url-pattern>/basic/err.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.header_jsp</servlet-name>
+ <url-pattern>/basic/header.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.help_jsp</servlet-name>
+ <url-pattern>/basic/help.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.index_jsp</servlet-name>
+ <url-pattern>/basic/index.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.indexToolbar_jsp</servlet-name>
+ <url-pattern>/basic/indexToolbar.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.indexView_jsp</servlet-name>
+ <url-pattern>/basic/indexView.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.linksToolbar_jsp</servlet-name>
+ <url-pattern>/basic/linksToolbar.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.linksView_jsp</servlet-name>
+ <url-pattern>/basic/linksView.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.livehelp_js_jsp</servlet-name>
+ <url-pattern>/basic/livehelp_js.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.searchToolbar_jsp</servlet-name>
+ <url-pattern>/basic/searchToolbar.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.searchView_jsp</servlet-name>
+ <url-pattern>/basic/searchView.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.tabs_jsp</servlet-name>
+ <url-pattern>/basic/tabs.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.tocToolbar_jsp</servlet-name>
+ <url-pattern>/basic/tocToolbar.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.tocView_jsp</servlet-name>
+ <url-pattern>/basic/tocView.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.toolbar_jsp</servlet-name>
+ <url-pattern>/basic/toolbar.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.basic.view_jsp</servlet-name>
+ <url-pattern>/basic/view.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.advanced_jsp</servlet-name>
+ <url-pattern>/advanced/advanced.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.askShowAll_jsp</servlet-name>
+ <url-pattern>/advanced/askShowAll.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.bookmarksToolbar_jsp</servlet-name>
+ <url-pattern>/advanced/bookmarksToolbar.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.bookmarksView_jsp</servlet-name>
+ <url-pattern>/advanced/bookmarksView.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.confirm_jsp</servlet-name>
+ <url-pattern>/advanced/confirm.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.confirmShowAll_jsp</servlet-name>
+ <url-pattern>/advanced/confirmShowAll.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.content_jsp</servlet-name>
+ <url-pattern>/advanced/content.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.contentToolbar_jsp</servlet-name>
+ <url-pattern>/advanced/contentToolbar.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.err_jsp</servlet-name>
+ <url-pattern>/advanced/err.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.fheader_jsp</servlet-name>
+ <url-pattern>/advanced/fheader.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.header_jsp</servlet-name>
+ <url-pattern>/advanced/header.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.help_jsp</servlet-name>
+ <url-pattern>/advanced/help.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.index_jsp</servlet-name>
+ <url-pattern>/advanced/index.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.indexList_jsp</servlet-name>
+ <url-pattern>/advanced/indexList.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.indexToolbar_jsp</servlet-name>
+ <url-pattern>/advanced/indexToolbar.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.indexTypein_jsp</servlet-name>
+ <url-pattern>/advanced/indexTypein.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.indexView_jsp</servlet-name>
+ <url-pattern>/advanced/indexView.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.linksToolbar_jsp</servlet-name>
+ <url-pattern>/advanced/linksToolbar.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.linksView_jsp</servlet-name>
+ <url-pattern>/advanced/linksView.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.livehelp_js_jsp</servlet-name>
+ <url-pattern>/advanced/livehelp_js.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.nav_jsp</servlet-name>
+ <url-pattern>/advanced/nav.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.search_jsp</servlet-name>
+ <url-pattern>/advanced/search.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.searchScoped_jsp</servlet-name>
+ <url-pattern>/advanced/searchScoped.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.searchSimple_jsp</servlet-name>
+ <url-pattern>/advanced/searchSimple.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.searchToolbar_jsp</servlet-name>
+ <url-pattern>/advanced/searchToolbar.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.searchView_jsp</servlet-name>
+ <url-pattern>/advanced/searchView.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.tabs_jsp</servlet-name>
+ <url-pattern>/advanced/tabs.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.tocFragment_jsp</servlet-name>
+ <url-pattern>/advanced/tocFragment.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.tocToolbar_jsp</servlet-name>
+ <url-pattern>/advanced/tocToolbar.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.tocView_jsp</servlet-name>
+ <url-pattern>/advanced/tocView.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.toolbar_jsp</servlet-name>
+ <url-pattern>/advanced/toolbar.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.view_jsp</servlet-name>
+ <url-pattern>/advanced/view.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.views_jsp</servlet-name>
+ <url-pattern>/advanced/views.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.workingSet_jsp</servlet-name>
+ <url-pattern>/advanced/workingSet.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>org.eclipse.help.internal.webapp.jsp.advanced.workingSetManager_jsp</servlet-name>
+ <url-pattern>/advanced/workingSetManager.jsp</url-pattern>
+ </servlet-mapping>
+
+<!--
+All session-config, mime-mapping, welcome-file-list, error-page, taglib,
+resource-ref, security-constraint, login-config, security-role,
+env-entry, and ejb-ref elements should follow this fragment.
+-->
+
+
+ <servlet-mapping>
+ <servlet-name>control</servlet-name>
+ <url-pattern>/control.html</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>content</servlet-name>
+ <url-pattern>/content/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>content</servlet-name>
+ <url-pattern>/topic/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>content</servlet-name>
+ <url-pattern>/nftopic/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>content</servlet-name>
+ <url-pattern>/ntopic/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>livehelp</servlet-name>
+ <url-pattern>/livehelp/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>toc</servlet-name>
+ <url-pattern>/toc/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>index</servlet-name>
+ <url-pattern>/index/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>search</servlet-name>
+ <url-pattern>/search/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>context</servlet-name>
+ <url-pattern>/context/*</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+<!-- Uncomment to enable secure access to the InfoCenter. Update the role-name as appropriate.
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>helproot</web-resource-name>
+ <description></description>
+ <url-pattern>/*</url-pattern>
+ <http-method>
+ GET</http-method>
+ <http-method>
+ PUT</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <description></description>
+ <role-name>tomcat</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+ <security-role>
+ <description></description>
+ <role-name>tomcat</role-name>
+ </security-role>
+-->
+</web-app>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/about.html b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/about.html
new file mode 100644
index 0000000..4602330
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 2, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/advanced.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/advanced.jsp
new file mode 100644
index 0000000..ea3f0e6
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/advanced.jsp
@@ -0,0 +1,235 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ SearchData data = new SearchData(application, request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+
+<html>
+<head>
+<title><%=ServletResources.getString("Advanced", request)%></title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Pragma" content="no-cache">
+<meta http-equiv="Expires" content="-1">
+
+<style type="text/css">
+
+/* need this one for Mozilla */
+HTML {
+ width:100%;
+ height:100%;
+ margin:0px;
+ padding:0px;
+ border:0px;
+ }
+
+BODY {
+ font: <%=prefs.getViewFont()%>;
+ background:<%=prefs.getToolbarBackground()%>;
+ border:1px solid ThreeDShadow;
+ padding:0px;
+ margin:0px;
+}
+
+TABLE {
+ font:<%=prefs.getViewFont()%>;
+ background:<%=prefs.getToolbarBackground()%>;
+}
+
+TD, TR {
+ margin:0px;
+ padding:0px;
+ border:0px;
+}
+
+FORM {
+ margin:0px;
+ padding:0px;
+ border:0px;
+ height:100%;
+}
+
+
+#searchTable {
+ background:transparent;
+ margin:10px 0px 20px 0px;
+}
+
+#searchWord {
+ border:1px solid ThreeDShadow;
+ width:100%;
+ font:icon;
+}
+
+#booksContainer {
+ background:<%=prefs.getViewBackground()%>;
+ border:1px solid ThreeDShadow;
+ margin:0px 10px;
+ overflow:auto;
+}
+
+.book {
+ margin:0xp;
+ border:0px;
+ padding:0px;
+}
+
+.button {
+ font:<%=prefs.getViewFont()%>;
+}
+
+<%
+if (data.isMozilla()) {
+%>
+input[type="checkbox"] {
+ border:2px solid ThreeDShadow;
+ margin:0xp;
+ padding:0px;
+ height:12px;
+ width:12px;
+}
+<%
+}
+%>
+</style>
+
+<script language="JavaScript">
+
+function doAdvancedSearch()
+{
+ try
+ {
+ var form = document.forms["searchForm"];
+ var searchWord = form.searchWord.value;
+ var maxHits = form.maxHits.value;
+ if (!searchWord || searchWord == "")
+ return;
+
+ var scope = "";
+ var buttons = document.getElementsByTagName("INPUT");
+ for (var i=0; i<buttons.length; i++)
+ {
+ if (buttons[i].type != "checkbox") continue;
+ if (buttons[i].checked == false) continue;
+ scope += "&scope="+encodeURIComponent(buttons[i].name);
+ }
+
+ // persist selection
+ window.opener.saveSelectedBooks(getSelectedBooks());
+
+ window.opener.document.forms["searchForm"].searchWord.value = searchWord;
+ var query = "searchWord="+encodeURIComponent(searchWord)+"&scopedSearch=true&maxHits="+maxHits + scope;
+ window.opener.doSearch(query);
+ window.opener.focus();
+ window.close();
+ } catch(ex) {}
+}
+
+function restoreSelectedBooks()
+{
+ var selectedBooks = window.opener.selectedBooks;
+ var inputs = document.body.getElementsByTagName("INPUT");
+ for (var i=0; i<inputs.length; i++) {
+ if (inputs[i].type == "checkbox" && isSelected(inputs[i].name, selectedBooks))
+ inputs[i].checked = true;
+ }
+}
+
+
+function getSelectedBooks()
+{
+ var selectedBooks = new Array();
+ var inputs = document.body.getElementsByTagName("INPUT");
+ for (var i=0; i<inputs.length; i++) {
+ if (inputs[i].type == "checkbox" && inputs[i].checked)
+ selectedBooks[selectedBooks.length] = inputs[i].name;
+ }
+ return selectedBooks;
+}
+
+function isSelected(book, selectedBooks)
+{
+ // the first time select all
+ if (!selectedBooks)
+ return true;
+
+ for (var i=0; i<selectedBooks.length; i++)
+ if (book == selectedBooks[i])
+ return true;
+ return false;
+}
+
+function onloadHandler()
+{
+ // select the books from previous run, or all otherwise
+ restoreSelectedBooks();
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>" onload="onloadHandler()">
+
+<form name="searchForm" onsubmit="doAdvancedSearch()">
+<div style="overflow:auto;height:250px;">
+ <table id="searchTable" width="100%" cellspacing=0 cellpading=0 border=0 align=center >
+ <tr><td style="padding:0px 10px;"><label for="searchWord"><%=ServletResources.getString("SearchExpression", request)%></label>
+ </td></tr>
+ <tr><td style="padding:0px 10px;"><input type="text" id="searchWord" name="searchWord" value="<%=UrlUtil.htmlEncode(data.getSearchWord())%>" maxlength=256 alt='<%=ServletResources.getString("SearchExpression", request)%>' title='<%=ServletResources.getString("SearchExpression", request)%>'>
+ <input type="hidden" name="maxHits" value="500" >
+ </td></tr>
+ <tr><td style="padding:0px 10px;"><%=ServletResources.getString("expression_label", request)%>
+ </td></tr>
+ </table>
+
+ <table id="filterTable" width="100%" cellspacing=0 cellpading=0 border=0 align=center style="background:transparent;">
+ <tr><td><div id="selectBook" style="margin-<%=isRTL?"right":"left"%>:10px;"><%=ServletResources.getString("Select", request)%></div>
+ </td></tr>
+ <tr><td>
+ <div id="booksContainer">
+<%
+TocData tocData = new TocData(application, request, response);
+for (int i=0; i<tocData.getTocCount(); i++)
+{
+ String label = tocData.getTocLabel(i);
+%>
+ <div class="book"><input class="checkbox" type="checkbox" name='<%=tocData.getTocHref(i)%>' id="checkbox<%=i%>" alt="<%=label%>"><label for="checkbox<%=i%>"><%=label%></label></div>
+<%
+}
+%>
+ </div>
+ </td></tr>
+ </table>
+</div>
+<div style="height:50px;">
+ <table valign="bottom" align="<%=isRTL?"left":"right"%>">
+ <tr id="buttonsTable" valign="bottom"><td valign="bottom" align="<%=isRTL?"left":"right"%>">
+ <table cellspacing=10 cellpading=0 border=0 align=<%=isRTL?"left":"right"%> style="background:transparent;">
+ <tr>
+ <td>
+ <input id="searchButton" class='button' type="button" onclick="doAdvancedSearch()" value='<%=ServletResources.getString("Search", request)%>' id="go" alt='<%=ServletResources.getString("Search", request)%>' title='<%=ServletResources.getString("Search", request)%>'>
+ </td>
+ <td>
+ <input class='button' type="button" onclick="window.close()" type="button" value='<%=ServletResources.getString("Cancel", request)%>' id="cancel" alt='<%=ServletResources.getString("Cancel", request)%>' title='<%=ServletResources.getString("Cancel", request)%>'>
+ </td>
+ </tr>
+ </table>
+ </td></tr>
+ </table>
+</div>
+ </form>
+
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/askShowAll.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/askShowAll.jsp
new file mode 100644
index 0000000..1d9272a
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/askShowAll.jsp
@@ -0,0 +1,20 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<jsp:include page="confirm.jsp">
+ <jsp:param name="title" value="confirmShowAllTitle"/>
+ <jsp:param name="header" value="askShowAllQuestion"/>
+ <jsp:param name="message" value="askShowAllExplanation"/>
+ <jsp:param name="confirmCallback" value="<%=\"yesShowAll()\"%>"/>
+ <jsp:param name="initialFocus" value="cancel"/>
+ <jsp:param name="buttons" value="yesno"/>
+</jsp:include>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/banner.html b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/banner.html
new file mode 100644
index 0000000..7d2a87d
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/banner.html
@@ -0,0 +1,58 @@
+<!------------------------------------------------------------------------------
+ ! Copyright (c) 2000, 2004 IBM Corporation and others.
+ ! All rights reserved. This program and the accompanying materials
+ ! are made available under the terms of the Eclipse Public License v1.0
+ ! which accompanies this distribution, and is available at
+ ! http://www.eclipse.org/legal/epl-v10.html
+ !
+ ! Contributors:
+ ! IBM Corporation - initial API and implementation
+ ------------------------------------------------------------------------------->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+
+<title>Banner</title>
+
+<style type="text/css">
+/* need this one for Mozilla */
+HTML {
+ width:100%;
+ height:100%;
+ margin:0px;
+ padding:0px;
+ border:0px;
+ }
+
+BODY {
+ background-color:#7168D1;
+ text:white;
+ height:60px;
+}
+
+TABLE {
+ margin:0;
+ border:0;
+ padding:0;
+ height:100%;
+}
+
+</style>
+
+
+</head>
+
+<body marginwidth="0" marginheight="0">
+
+ <table align="left" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td align=left valign="center"><img src="images/help_banner.jpg" alt="Eclipse icon" title="Eclipse icon">
+ </td>
+ </tr>
+ </table>
+
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/bookmarksToolbar.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/bookmarksToolbar.jsp
new file mode 100644
index 0000000..f4a6a5b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/bookmarksToolbar.jsp
@@ -0,0 +1,38 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+
+<jsp:include page="toolbar.jsp">
+ <jsp:param name="script" value="navActions.js"/>
+ <jsp:param name="view" value="bookmarks"/>
+
+ <jsp:param name="name" value="deleteBookmark"/>
+ <jsp:param name="tooltip" value='deleteBookmark'/>
+ <jsp:param name="image" value="bookmark_rem.gif"/>
+ <jsp:param name="action" value="removeBookmark"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='off'/>
+
+ <jsp:param name="name" value="deleteAllBookmarks"/>
+ <jsp:param name="tooltip" value='deleteAllBookmarks'/>
+ <jsp:param name="image" value="bookmark_remall.gif"/>
+ <jsp:param name="action" value="removeAllBookmarks"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='off'/>
+
+ <jsp:param name="name" value="synchnav"/>
+ <jsp:param name="tooltip" value='SynchNav'/>
+ <jsp:param name="image" value="synch_nav.gif"/>
+ <jsp:param name="action" value="resynchNav"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='off'/>
+</jsp:include>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/bookmarksView.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/bookmarksView.jsp
new file mode 100644
index 0000000..9e90733
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/bookmarksView.jsp
@@ -0,0 +1,149 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ BookmarksData data = new BookmarksData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Pragma" content="no-cache">
+<meta http-equiv="Expires" content="-1">
+
+<title><%=ServletResources.getString("Bookmarks", request)%></title>
+
+<style type="text/css">
+<%@ include file="list.css"%>
+</style>
+
+<base target="ContentViewFrame">
+
+<script language="JavaScript" src="list.js"></script>
+
+<script language="JavaScript">
+
+/**
+ * Removes bookmark
+ */
+function removeBookmark()
+{
+ if (!active)
+ return false;
+
+ var bookmark = active;
+ active = null;
+
+ // Note: bookmark is an anchor "a"
+ var url = bookmark.href;
+ var i = url.indexOf("/topic/");
+ if (i >=0 )
+ url = url.substring(i+6);
+ // remove any query string
+ i = url.indexOf("?");
+ if (i >= 0)
+ url = url.substring(0, i);
+
+ var title = bookmark.title;
+ if (title == null || title == "")
+ title = url;
+
+ window.location.replace("bookmarksView.jsp?operation=remove&bookmark="+encodeURIComponent(url)+"&title="+encodeURIComponent(title));
+ return true;
+}
+
+/**
+ * Removes all bookmarks
+ */
+function removeAllBookmarks()
+{
+ hidePopupMenu();
+ if(!confirm("<%=ServletResources.getString("confirmDeleteAllBookmarks",request)%>"))
+ return true;
+ window.location.replace("bookmarksView.jsp?operation=removeAll");
+ return true;
+}
+
+/**
+ * If the Del key was pressed, remove the bookmark
+ */
+function bookmarkKeyDownHandler(e) {
+ var key;
+
+ if (isIE) {
+ key = window.event.keyCode;
+ } else if (isMozilla) {
+ key = e.keyCode;
+ }
+
+ // Check if this is the Delete key (code 46)
+ if (key != 46)
+ return true;
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+
+ return removeBookmark();
+}
+</script>
+
+</head>
+
+
+<body dir="<%=direction%>">
+
+<%
+if(data.getBookmarks().length == 0) {
+ out.write(ServletResources.getString("addBookmark", request));
+} else {
+%>
+<table id='list' cellspacing='0' >
+
+<%
+ Topic[] bookmarks = data.getBookmarks();
+ for (int i=0; i<bookmarks.length; i++)
+ {
+%>
+
+<tr class='list' id='r<%=i%>'>
+ <td align='<%=isRTL?"right":"left"%>' class='label' nowrap>
+ <a id='a<%=i%>'
+ href='<%=bookmarks[i].getHref()%>'
+ onmouseover="showStatus(event);return true;"
+ onmouseout="clearStatus();return true;"
+ onclick='parent.parent.parent.setContentToolbarTitle(" ")'
+ oncontextmenu="contextMenuHandler(event);return false;"
+ onkeydown="bookmarkKeyDownHandler(event);"
+ title="<%=UrlUtil.htmlEncode(bookmarks[i].getLabel())%>">
+ <img src="<%=prefs.getImagesDirectory()%>/topic.gif" alt=""><%=UrlUtil.htmlEncode(bookmarks[i].getLabel())%></a>
+ </td>
+</tr>
+
+<%
+ }
+%>
+
+</table>
+<div id="menu">
+ <div class="unselectedMenuItem" onmouseover="this.className='selectedMenuItem'" onmouseout="this.className='unselectedMenuItem'" onclick="removeBookmark()" ><nobr><%=ServletResources.getString("RemoveBookmark",request)%></nobr></div>
+ <div class="unselectedMenuItem" onmouseover="this.className='selectedMenuItem'" onmouseout="this.className='unselectedMenuItem'" onclick="removeAllBookmarks()" ><nobr><%=ServletResources.getString("RemoveAllBookmarks",request)%></nobr></div>
+</div>
+
+<%
+}
+%>
+
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/confirm.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/confirm.jsp
new file mode 100644
index 0000000..5bdb3f1
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/confirm.jsp
@@ -0,0 +1,150 @@
+<%--
+ Copyright (c) 2000, 2006 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ RequestData data = new RequestData(application, request, response);
+ WebappPreferences prefs = data.getPrefs();
+ String okText="";
+ String cancelText="";
+ if("yesno".equalsIgnoreCase(request.getParameter("buttons"))){
+ okText=ServletResources.getString("yes", request);
+ cancelText=ServletResources.getString("no", request);
+ }else{
+ okText=ServletResources.getString("OK", request);
+ cancelText=ServletResources.getString("Cancel", request);
+ }
+%>
+
+
+<html>
+<head>
+<title><%=ServletResources.getString(request.getParameter("title"), request)%></title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Pragma" content="no-cache">
+<meta http-equiv="Expires" content="-1">
+
+
+<style type="text/css">
+<%@ include file="list.css"%>
+</style>
+
+<style type="text/css">
+HTML, BODY {
+ width:100%;
+ height:100%;
+ margin:0px;
+ padding:0px;
+ border:0px;
+}
+
+BODY {
+ background-color: <%=prefs.getToolbarBackground()%>;
+}
+
+TABLE {
+ width:auto;
+}
+
+TD, TR{
+ margin:0px;
+ padding:0px;
+ border:0px;
+}
+
+BUTTON {
+ font:<%=prefs.getViewFont()%>;
+}
+
+</style>
+
+<script language="JavaScript">
+
+function onloadHandler() {
+<%
+if(!data.isMozilla() || "1.3".compareTo(data.getMozillaVersion()) <=0){
+// buttons are not resized immediately on mozilla before 1.3
+%>
+ sizeButtons();
+<%}%>
+ document.getElementById("<%=request.getParameter("initialFocus")%>").focus();
+}
+
+function sizeButtons() {
+ var minWidth=60;
+
+ if(document.getElementById("ok").offsetWidth < minWidth){
+ document.getElementById("ok").style.width = minWidth+"px";
+ }
+ if(document.getElementById("cancel").offsetWidth < minWidth){
+ document.getElementById("cancel").style.width = minWidth+"px";
+ }
+}
+
+function confirmed(){
+ try{
+<% if ("true".equalsIgnoreCase(request.getParameter("dontaskagain")) ){ %>
+ if(document.getElementById("dontask").checked){
+ window.opener.<%=request.getParameter("dontaskagainCallback")%>;
+ }
+<% } %>
+ window.opener.<%=request.getParameter("confirmCallback")%>;
+ } catch(e) {}
+ window.close();
+ return false;
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>" onload="onloadHandler()">
+<form onsubmit="confirmed();return false;">
+<div style="overflow:auto;height:160px;width:100%;">
+ <div style="padding:10px;">
+ <span style="font-weight:bold;"><%=ServletResources.getString(request.getParameter("header"), request)%></span>
+ <br><br>
+ <%=ServletResources.getConfirmShowAllExplanation(request)%>
+ </div>
+</div>
+<% if ("true".equalsIgnoreCase(request.getParameter("dontaskagain")) ){ %>
+<div style="height:30px;">
+ <div style="padding-left:10px;padding-right:10px;">
+ <input class='check'
+ type="checkbox"
+ id='dontask'
+ name='dontask'>
+ <label for="dontask"
+ accesskey="<%=ServletResources.getAccessKey("dontask", request)%>">
+ <%=ServletResources.getLabel("dontask", request)%>
+ </label>
+ </div>
+</div>
+<% } %>
+<div style="height:50px;">
+ <table valign="bottom" align="<%=isRTL?"left":"right"%>" style="background:<%=prefs.getToolbarBackground()%>">
+ <tr id="buttonsTable" valign="bottom"><td valign="bottom" align="<%=isRTL?"left":"right"%>">
+ <table cellspacing=10 cellpading=0 border=0 style="background:transparent;">
+ <tr>
+ <td>
+ <button type="submit" id="ok"><%=okText%></button>
+ </td>
+ <td>
+ <button type="reset" onclick="window.close()" id="cancel"><%=cancelText%></button>
+ </td>
+ </tr>
+ </table>
+ </td></tr>
+ </table>
+</div>
+</form>
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/confirmShowAll.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/confirmShowAll.jsp
new file mode 100644
index 0000000..00fa2b8
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/confirmShowAll.jsp
@@ -0,0 +1,21 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<jsp:include page="confirm.jsp">
+ <jsp:param name="title" value="confirmShowAllTitle"/>
+ <jsp:param name="header" value="confirmShowAllQuestion"/>
+ <jsp:param name="message" value="confirmShowAllExplanation"/>
+ <jsp:param name="dontaskagain" value="true"/>
+ <jsp:param name="dontaskagainCallback" value="<%=\"dontAskAgain()\"%>"/>
+ <jsp:param name="confirmCallback" value="<%=\"showAll()\"%>"/>
+ <jsp:param name="initialFocus" value="ok"/>
+</jsp:include>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/content.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/content.jsp
new file mode 100644
index 0000000..7343ce3
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/content.jsp
@@ -0,0 +1,70 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="fheader.jsp"%>
+
+<%
+ LayoutData data = new LayoutData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title><%=ServletResources.getString("Help", request)%></title>
+
+<style type="text/css">
+<%
+if (data.isMozilla()) {
+%>
+HTML {
+ background:<%=prefs.getToolbarBackground()%>;
+ border-<%=isRTL?"left":"right"%>:1px solid ThreeDShadow;
+}
+<%
+} else {
+%>
+FRAMESET {
+ border-top:1px solid ThreeDShadow;
+ border-left:1px solid ThreeDShadow;
+ border-right:1px solid ThreeDShadow;
+ border-bottom:1px solid ThreeDShadow;
+}
+<%
+}
+%>
+</style>
+
+<script language="JavaScript">
+
+function onloadHandler(e)
+{
+<% if (data.isIE() || data.isMozilla() && "1.2.1".compareTo(data.getMozillaVersion()) <=0){
+%> var h=window.ContentToolbarFrame.document.getElementById("titleText").offsetHeight; <%-- default 13 --%>
+ if(h<=19){
+ return; <%-- no need to resize up to 19px --%>
+ }
+ document.getElementById("contentFrameset").setAttribute("rows", (11+h)+",*"); <%-- default 24 --%>
+ window.ContentToolbarFrame.document.getElementById("titleTextTableDiv").style.height=(9+h)+"px"; <%-- default 22 --%>
+<%}%>
+}
+</script>
+
+</head>
+
+
+<frameset id="contentFrameset" onload="onloadHandler()" rows="24,*" frameborder="0" framespacing="0" border=0 spacing=0>
+ <frame name="ContentToolbarFrame" title="<%=ServletResources.getString("topicViewToolbar", request)%>" src='<%="contentToolbar.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
+ <frame ACCESSKEY="K" name="ContentViewFrame" title="<%=ServletResources.getString("topicView", request)%>" src='<%=data.getContentURL()%>' marginwidth="10"<%=(data.isIE() && "6.0".compareTo(data.getIEVersion()) <=0)?"scrolling=\"yes\"":""%> marginheight="0" frameborder="0" >
+</frameset>
+
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/contentActions.js b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/contentActions.js
new file mode 100644
index 0000000..77f6be8
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/contentActions.js
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+var isMozilla = navigator.userAgent.indexOf('Mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
+var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+
+var navVisible = true;
+
+function goBack(button, param) {
+ parent.history.back();
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
+
+function goForward(button, param) {
+ parent.history.forward();
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
+
+function goHome(button, param) {
+ var isHome = false;
+
+ try {
+ // first check if we're already at home
+ var str = param;
+ var index = str.indexOf("/");
+ if (index > 0) {
+ str = str.substring(index);
+ }
+ var locationStr = parent.ContentViewFrame.location.href;
+ isHome = (locationStr.substring(locationStr.length - str.length) == str)
+ }
+ catch (e) {
+ // insufficient permission, not home
+ }
+
+ if (!isHome) {
+ parent.ContentViewFrame.location = param;
+ }
+ parent.parent.NavFrame.collapseToc();
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
+
+function bookmarkPage(button, param)
+{
+ // Currently we pick up the url from the content page.
+ // If the page is from outside the help domain, a script
+ // exception is thrown. We need to catch it and ignore it.
+ try
+ {
+ // use the url from plugin id only
+ var url = parent.ContentViewFrame.location.href;
+ var i = url.indexOf("/topic/");
+ if (i >=0 )
+ url = url.substring(i+6);
+ // remove any query string
+ i = url.indexOf("?");
+ if (i >= 0)
+ url = url.substring(0, i);
+
+ var title = parent.ContentViewFrame.document.title;
+ if (title == null || title == "")
+ title = url;
+
+ /********** HARD CODED VIEW NAME *************/
+ parent.parent.NavFrame.ViewsFrame.bookmarks.bookmarksViewFrame.location.replace("bookmarksView.jsp?operation=add&bookmark="+encodeURIComponent(url)+"&title="+encodeURIComponent(title));
+ }catch (e) {}
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
+
+function bookmarkInfocenterPage(button, param)
+{
+ // Currently we pick up the url from the content page.
+ // If the page is from outside the help domain, a script
+ // exception is thrown. We need to catch it and ignore it.
+ try
+ {
+ // use the url from plugin id only
+ var url = parent.ContentViewFrame.location.href;
+ var i = url.indexOf("/topic/");
+ if (i >=0 )
+ url = url.substring(i+6);
+ // remove any query string
+ i = url.indexOf("?");
+ if (i >= 0)
+ url = url.substring(0, i);
+
+ var title = parent.ContentViewFrame.document.title;
+ if (title == null || title == "")
+ title = url;
+
+ /********** HARD CODED VIEW NAME *************/
+ window.external.AddFavorite(parent.ContentViewFrame.location.href,title);
+ }catch (e) {}
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
+
+function resynch(button, param)
+{
+ try {
+ var topic = parent.ContentViewFrame.window.location.href;
+ // remove the query, if any
+ var i = topic.indexOf('?');
+ if (i != -1)
+ topic = topic.substring(0, i);
+ parent.parent.NavFrame.displayTocFor(topic);
+ } catch(e) {}
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
+
+function printContent(button, param)
+{
+ try {
+ parent.ContentViewFrame.focus();
+ parent.ContentViewFrame.print();
+ } catch(e) {}
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
+
+function setTitle(label)
+{
+ if( label == null) label = "";
+ var title = document.getElementById("titleText");
+ if(title !=null){
+ var text = title.lastChild;
+ text.nodeValue = " "+label;
+ }
+}
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/contentToolbar.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/contentToolbar.jsp
new file mode 100644
index 0000000..dc3a918
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/contentToolbar.jsp
@@ -0,0 +1,84 @@
+<%--
+ Copyright (c) 2000, 2005 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ RequestData data = new RequestData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+ String forwardImage, backImage, homeImage;
+ if(isRTL) {
+ forwardImage = "back.gif";
+ backImage = "forward.gif";
+ } else {
+ forwardImage = "forward.gif";
+ backImage = "back.gif";
+ }
+ homeImage = "home.gif";
+ String homeURL = UrlUtil.getHelpURL(prefs.getHelpHome());
+ boolean isBookmarkAction = prefs.isBookmarksView()
+ || prefs.isBookmarksAction() && data.isIE() && !data.isOpera(); // for infocenter, add to favorites supported on IE
+ String bookmarkButtonState = isBookmarkAction?"off":"hidden";
+ String bookmarkAction = RequestData.MODE_INFOCENTER==data.getMode()?"bookmarkInfocenterPage":"bookmarkPage";
+%>
+<jsp:include page="toolbar.jsp">
+ <jsp:param name="script" value="contentActions.js"/>
+ <jsp:param name="toolbar" value="content"/>
+
+ <jsp:param name="name" value="back"/>
+ <jsp:param name="tooltip" value='back_tip'/>
+ <jsp:param name="image" value='<%=backImage%>'/>
+ <jsp:param name="action" value="goBack"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='off'/>
+
+ <jsp:param name="name" value="forward"/>
+ <jsp:param name="tooltip" value='forward_tip'/>
+ <jsp:param name="image" value='<%=forwardImage%>'/>
+ <jsp:param name="action" value="goForward"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='off'/>
+
+ <jsp:param name="name" value="home"/>
+ <jsp:param name="tooltip" value='home_tip'/>
+ <jsp:param name="image" value='<%=homeImage%>'/>
+ <jsp:param name="action" value="goHome"/>
+ <jsp:param name="param" value="<%=homeURL%>"/>
+ <jsp:param name="state" value='off'/>
+
+ <jsp:param name="name" value=""/>
+ <jsp:param name="tooltip" value=""/>
+ <jsp:param name="image" value=""/>
+ <jsp:param name="action" value=""/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='off'/>
+
+ <jsp:param name="name" value="synch"/>
+ <jsp:param name="tooltip" value='Synch'/>
+ <jsp:param name="image" value="synch_toc_nav.gif"/>
+ <jsp:param name="action" value="resynch"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='off'/>
+
+ <jsp:param name="name" value="add_bkmrk"/>
+ <jsp:param name="tooltip" value='BookmarkPage'/>
+ <jsp:param name="image" value="add_bkmrk.gif"/>
+ <jsp:param name="action" value="<%=bookmarkAction%>"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='<%=bookmarkButtonState%>'/>
+
+ <jsp:param name="name" value="print"/>
+ <jsp:param name="tooltip" value='Print'/>
+ <jsp:param name="image" value="print_edit.gif"/>
+ <jsp:param name="action" value="printContent"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='off'/>
+
+</jsp:include>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/err.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/err.jsp
new file mode 100644
index 0000000..4da5a43
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/err.jsp
@@ -0,0 +1,40 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ page import="org.eclipse.help.internal.webapp.data.*" contentType="text/html; charset=UTF-8"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title> Error </title>
+</head>
+<%
+String direction = "ltr";
+try{
+ if(UrlUtil.isRTL(request, response)){
+ direction = "rtl";
+ }
+}catch(Exception e){
+}
+%>
+
+<body dir="<%=direction%>">
+
+ <%@ page isErrorPage="true" %>
+
+ There was an error in your action:
+ <p>
+ <%= exception.toString() %>
+ </p>
+
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/fheader.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/fheader.jsp
new file mode 100644
index 0000000..c869f62
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/fheader.jsp
@@ -0,0 +1,32 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%><%@
+page import="org.eclipse.help.internal.webapp.data.*" contentType="text/html; charset=UTF-8"
+%><%
+request.setCharacterEncoding("UTF-8");
+boolean isRTL = UrlUtil.isRTL(request, response);
+String direction = isRTL?"rtl":"ltr";
+if (new RequestData(application,request, response).isMozilla()) {
+%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<%
+} else {
+%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
+<%
+}
+%><!------------------------------------------------------------------------------
+ ! Copyright (c) 2000, 2004 IBM Corporation and others.
+ ! All rights reserved. This program and the accompanying materials
+ ! are made available under the terms of the Eclipse Public License v1.0
+ ! which accompanies this distribution, and is available at
+ ! http://www.eclipse.org/legal/epl-v10.html
+ !
+ ! Contributors:
+ ! IBM Corporation - initial API and implementation
+ ------------------------------------------------------------------------------->
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/header.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/header.jsp
new file mode 100644
index 0000000..0be0af3
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/header.jsp
@@ -0,0 +1,32 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%><%@
+page import="org.eclipse.help.internal.webapp.data.*" contentType="text/html; charset=UTF-8"
+%><%
+request.setCharacterEncoding("UTF-8");
+boolean isRTL = UrlUtil.isRTL(request, response);
+String direction = isRTL?"rtl":"ltr";
+if (new RequestData(application,request, response).isMozilla()) {
+%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<%
+} else {
+%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<%
+}
+%><!------------------------------------------------------------------------------
+ ! Copyright (c) 2000, 2004 IBM Corporation and others.
+ ! All rights reserved. This program and the accompanying materials
+ ! are made available under the terms of the Eclipse Public License v1.0
+ ! which accompanies this distribution, and is available at
+ ! http://www.eclipse.org/legal/epl-v10.html
+ !
+ ! Contributors:
+ ! IBM Corporation - initial API and implementation
+ ------------------------------------------------------------------------------->
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/help.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/help.jsp
new file mode 100644
index 0000000..3090d20
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/help.jsp
@@ -0,0 +1,150 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="fheader.jsp"%>
+
+<%
+ LayoutData data = new LayoutData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title><%=ServletResources.getString("Help", request)%></title>
+
+<style type="text/css">
+
+HTML {
+ background:<%=prefs.getToolbarBackground()%>;
+<%
+if (data.isMozilla()){
+%>
+ padding:<%=isRTL?"0px 4px 2px 4px":"0px 4px 2px 4px"%>;
+<%
+}
+%>
+}
+
+</style>
+
+<script language="JavaScript">
+<%-- map of maximize listener functions indexed by name --%>
+var maximizeListeners=new Object();
+function registerMaximizeListener(name, listener){
+ maximizeListeners[name]=listener;
+}
+function notifyMaximizeListeners(maximizedNotRestored){
+ for(i in maximizeListeners){
+ try{
+ maximizeListeners[i](maximizedNotRestored);
+ }catch(exc){}
+ }
+}
+<%-- vars to keep track of frame sizes before max/restore --%>
+var leftCols = "<%=isRTL?"70.5%":"29.5%"%>";
+var rightCols = "<%=isRTL?"29.5%":"70.5%"%>";
+<%--
+param title "" for content frame
+--%>
+function toggleFrame(title)
+{
+ var frameset = document.getElementById("helpFrameset");
+ var navFrameSize = frameset.getAttribute("cols");
+ var comma = navFrameSize.indexOf(',');
+ var left = navFrameSize.substring(0,comma);
+ var right = navFrameSize.substring(comma+1);
+
+ if (left == "*" || right == "*") {
+ // restore frames
+ frameset.frameSpacing="3";
+ frameset.setAttribute("border", "6");
+ frameset.setAttribute("cols", leftCols+","+rightCols);
+ notifyMaximizeListeners(false);
+ } else {
+ // the "cols" attribute is not always accurate, especially after resizing.
+ // offsetWidth is also not accurate, so we do a combination of both and
+ // should get a reasonable behavior
+<%
+if(isRTL) {
+%>
+ var leftSize = ContentFrame.document.body.offsetWidth;
+ var rightSize = NavFrame.document.body.offsetWidth;
+<%
+} else {
+%>
+ var leftSize = NavFrame.document.body.offsetWidth;
+ var rightSize = ContentFrame.document.body.offsetWidth;
+<%
+}
+%>
+
+ leftCols = leftSize * 100 / (leftSize + rightSize);
+ rightCols = 100 - leftCols;
+
+ // maximize the frame.
+ //leftCols = left;
+ //rightCols = right;
+ // Assumption: the content toolbar does not have a default title.
+<%
+if(isRTL) {
+%>
+ if (title != "") // this is the right side for right-to-left rendering
+ frameset.setAttribute("cols", "*,100%");
+ else // this is the content toolbar
+ frameset.setAttribute("cols", "100%,*");
+<%
+} else {
+%>
+ if (title != "") // this is the left side for left-to-right rendering
+ frameset.setAttribute("cols", "100%,*");
+ else // this is the content toolbar
+ frameset.setAttribute("cols", "*,100%");
+<%
+}
+%>
+ frameset.frameSpacing="0";
+ frameset.setAttribute("border", "1");
+ notifyMaximizeListeners(true);
+ }
+}
+</script>
+</head>
+
+<frameset
+<%
+if (data.isIE()) {
+%>
+ style="border-top: 0px solid <%=prefs.getToolbarBackground()%>;"
+ style="border-right: 4px solid <%=prefs.getToolbarBackground()%>;"
+ style="border-bottom: 4px solid <%=prefs.getToolbarBackground()%>;"
+ style="border-left: 4px solid <%=prefs.getToolbarBackground()%>;"
+<%
+}
+%>
+ id="helpFrameset" cols="<%=isRTL?"70.5%,29.5%":"29.5%,70.5%"%>" framespacing="3" border="6" frameborder="1" scrolling="no">
+<%
+if (isRTL) {
+%>
+ <frame name="ContentFrame" title="<%=ServletResources.getString("ignore", "ContentFrame", request)%>" class="content" src='<%="content.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" resize=yes>
+ <frame class="nav" name="NavFrame" title="<%=ServletResources.getString("ignore", "NavFrame", request)%>" src='<%="nav.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="1" resize=yes>
+<%
+} else {
+%>
+ <frame class="nav" name="NavFrame" title="<%=ServletResources.getString("ignore", "NavFrame", request)%>" src='<%="nav.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="1" resize=yes>
+ <frame name="ContentFrame" title="<%=ServletResources.getString("ignore", "ContentFrame", request)%>" class="content" src='<%="content.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" resize=yes>
+<%
+}
+%>
+</frameset>
+
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/highlight.js b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/highlight.js
new file mode 100644
index 0000000..25f63b9
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/highlight.js
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+var isSafari = (navigator.userAgent.indexOf('Safari/') != -1)
+ || (navigator.userAgent.indexOf('AppleWebKit/') != -1);
+var highlighted=false;
+var startTime;
+var MAX_DURATION=3000;
+onload=highlight;
+document.onreadystatechange=highlight;
+function highlight(){
+ if(highlighted){
+ return;
+ }
+ highlighted=true;
+ if (!document.body) return;
+ if(document.body.innerHTML.length < 50000){
+ for(i=0; i<keywords.length; i++){
+ word=keywords[i].toLowerCase();
+ highlightWordInNode(word, document.body);
+ }
+ }else{
+ startTime=new Date().getTime();
+ for(i=0; i<keywords.length; i++){
+ word=keywords[i].toLowerCase();
+ highlightWordInNodeTimed(word, document.body);
+ if(new Date().getTime()>startTime+MAX_DURATION) return;
+ }
+ }
+}
+function highlightWordInNode(aWord, aNode){
+ if (aNode.nodeType == 1){
+ var children = aNode.childNodes;
+ for(var i=0; i < children.length; i++) {
+ highlightWordInNode(aWord, children[i]);
+ }
+ }
+ else if(aNode.nodeType==3){
+ highlightWordInText(aWord, aNode);
+ }
+
+}
+function highlightWordInNodeTimed(aWord, aNode){
+ if (aNode.nodeType == 1){
+ var children = aNode.childNodes;
+ for(var i=0; i < children.length; i++) {
+ highlightWordInNodeTimed(aWord, children[i]);
+ if(new Date().getTime()>startTime+MAX_DURATION) return;
+ }
+ }
+ else if(aNode.nodeType==3){
+ highlightWordInText(aWord, aNode);
+ }
+
+}
+function highlightWordInText(aWord, textNode){
+ allText=new String(textNode.data);
+ allTextLowerCase=allText.toLowerCase();
+ index=allTextLowerCase.indexOf(aWord);
+ if(index>=0){
+ // create a node to replace the textNode so we end up
+ // not changing number of children of textNode.parent
+ replacementNode=document.createElement("span");
+ textNode.parentNode.insertBefore(replacementNode, textNode);
+ while(index>=0){
+ before=allText.substring(0,index);
+ newBefore=document.createTextNode(before);
+ replacementNode.appendChild(newBefore);
+ spanNode=document.createElement("span");
+ if(isSafari){
+ spanNode.style.color="#000000";
+ spanNode.style.background="#B5D5FF";
+ }else{
+ spanNode.style.background="Highlight";
+ spanNode.style.color="HighlightText";
+ }
+ replacementNode.appendChild(spanNode);
+ boldText=document.createTextNode(allText.substring(index,index+aWord.length));
+ spanNode.appendChild(boldText);
+ allText=allText.substring(index+aWord.length);
+ allTextLowerCase=allText.toLowerCase();
+ index=allTextLowerCase.indexOf(aWord);
+ }
+ newAfter=document.createTextNode(allText);
+ replacementNode.appendChild(newAfter);
+ textNode.parentNode.removeChild(textNode);
+ }
+}
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/add_bkmrk.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/add_bkmrk.gif
new file mode 100644
index 0000000..5b092dd
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/add_bkmrk.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/back.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/back.gif
new file mode 100644
index 0000000..2972ff5
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/back.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/bookmark_rem.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/bookmark_rem.gif
new file mode 100644
index 0000000..38fefb8
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/bookmark_rem.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/bookmark_remall.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/bookmark_remall.gif
new file mode 100644
index 0000000..5c6035d
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/bookmark_remall.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/container_obj.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/container_obj.gif
new file mode 100644
index 0000000..391cfdb
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/container_obj.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/d_topic.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/d_topic.gif
new file mode 100644
index 0000000..400a9c8
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/d_topic.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_add_bkmrk.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_add_bkmrk.gif
new file mode 100644
index 0000000..611844c
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_add_bkmrk.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_back.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_back.gif
new file mode 100644
index 0000000..4fb4150
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_back.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_bookmark_rem.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_bookmark_rem.gif
new file mode 100644
index 0000000..00bc855
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_bookmark_rem.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_bookmark_remall.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_bookmark_remall.gif
new file mode 100644
index 0000000..0a18db8
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_bookmark_remall.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_bookmarks_view.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_bookmarks_view.gif
new file mode 100644
index 0000000..8eefad3
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_bookmarks_view.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_contents_view.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_contents_view.gif
new file mode 100644
index 0000000..9e665d5
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_contents_view.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_forward.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_forward.gif
new file mode 100644
index 0000000..e2f8c3e
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_forward.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_home.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_home.gif
new file mode 100644
index 0000000..4472e8c
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_home.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_index_view.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_index_view.gif
new file mode 100644
index 0000000..6645b64
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_index_view.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_links_view.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_links_view.gif
new file mode 100644
index 0000000..d0b5c15
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_links_view.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_maximize.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_maximize.gif
new file mode 100644
index 0000000..55af28e
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_maximize.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_print_edit.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_print_edit.gif
new file mode 100644
index 0000000..04cb84b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_print_edit.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_restore.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_restore.gif
new file mode 100644
index 0000000..55cc251
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_restore.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_search_results_view.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_search_results_view.gif
new file mode 100644
index 0000000..fed3e49
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_search_results_view.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_show_all.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_show_all.gif
new file mode 100644
index 0000000..e8ff460
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_show_all.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_synch_nav.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_synch_nav.gif
new file mode 100644
index 0000000..9f6c9b1
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_synch_nav.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_synch_toc_nav.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_synch_toc_nav.gif
new file mode 100644
index 0000000..4353fd5
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/e_synch_toc_nav.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/forward.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/forward.gif
new file mode 100644
index 0000000..319fe8d
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/forward.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/help_banner.jpg b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/help_banner.jpg
new file mode 100644
index 0000000..9dc73f9
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/help_banner.jpg
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/home.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/home.gif
new file mode 100644
index 0000000..819e85b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/home.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/index_view.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/index_view.gif
new file mode 100644
index 0000000..c370f85
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/index_view.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/maximize.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/maximize.gif
new file mode 100644
index 0000000..55af28e
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/maximize.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/minus.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/minus.gif
new file mode 100644
index 0000000..90d1d34
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/minus.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/plus.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/plus.gif
new file mode 100644
index 0000000..014671f
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/plus.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/print_edit.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/print_edit.gif
new file mode 100644
index 0000000..4d2722f
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/print_edit.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/restore.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/restore.gif
new file mode 100644
index 0000000..55cc251
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/restore.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/show_all.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/show_all.gif
new file mode 100644
index 0000000..4d45f23
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/show_all.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/synch_nav.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/synch_nav.gif
new file mode 100644
index 0000000..aaf12e9
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/synch_nav.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/synch_toc_nav.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/synch_toc_nav.gif
new file mode 100644
index 0000000..b986e49
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/synch_toc_nav.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/toc_closed.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/toc_closed.gif
new file mode 100644
index 0000000..5edd28c
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/toc_closed.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/toc_open.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/toc_open.gif
new file mode 100644
index 0000000..520c1a8
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/toc_open.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/topic.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/topic.gif
new file mode 100644
index 0000000..fbd1394
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/images/topic.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/index.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/index.jsp
new file mode 100644
index 0000000..9bf393c
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/index.jsp
@@ -0,0 +1,77 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="fheader.jsp"%>
+
+<%
+ LayoutData data = new LayoutData(application,request, response);
+ // Initiate test for persisted cookies
+ if(data.getMode() == LayoutData.MODE_INFOCENTER){
+ Cookie cookieTest=new Cookie("cookiesEnabled", "yes");
+ cookieTest.setMaxAge(365*24*60*60);
+ response.addCookie(cookieTest);
+ }
+%>
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<noscript>
+<meta HTTP-EQUIV="REFRESH" CONTENT="0;URL=index.jsp?noscript=1">
+</noscript>
+<title><%=data.getWindowTitle()%></title>
+<jsp:include page="livehelp_js.jsp"/>
+
+<style type="text/css">
+FRAMESET {
+ border: 0px;
+}
+</style>
+
+<script language="JavaScript">
+
+function onloadHandler(e)
+{
+<% if (data.isIE() || data.isMozilla() && "1.2.1".compareTo(data.getMozillaVersion()) <=0){
+%> var h=window.SearchFrame.document.getElementById("searchLabel").offsetHeight; <%-- default 13 --%>
+ if(h<=19){
+ return; <%-- no need to resize up to 19px --%>
+ }
+ document.getElementById("indexFrameset").setAttribute("rows", <%="0".equals(data.getBannerHeight())?"":"\""+data.getBannerHeight()+",\"+"%>(11+h)+",*"); <%-- default 24 --%>
+<%}%>
+<%
+if (data.isMozilla()){
+// restore mozilla from minimized
+%>
+ window.focus();
+<%
+}
+%>
+ window.frames["SearchFrame"].document.getElementById("searchWord").focus();
+}
+
+</script>
+</head>
+
+<frameset id="indexFrameset" onload="onloadHandler()" rows="<%="0".equals(data.getBannerHeight())?"":data.getBannerHeight()+","%>24,*" frameborder="0" framespacing="0" border=0 spacing=0>
+<%
+ if(!("0".equals(data.getBannerHeight()))){
+%>
+ <frame name="BannerFrame" title="<%=ServletResources.getString("Banner", request)%>" src='<%=data.getBannerURL()%>' tabIndex="3" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
+<%
+ }
+%>
+ <frame name="SearchFrame" title="<%=ServletResources.getString("helpToolbarFrame", request)%>" src='<%="advanced/search.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
+ <frame name="HelpFrame" title="<%=ServletResources.getString("ignore", "HelpFrame", request)%>" src='<%="advanced/help.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" >
+</frameset>
+
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexList.css b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexList.css
new file mode 100644
index 0000000..14bf67a
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexList.css
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Intel Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Intel Corporation - initial API and implementation
+ *******************************************************************************/
+
+BODY {
+ background-color:<%=prefs.getViewBackground()%>;
+ font:<%=prefs.getViewFont()%>;
+ margin:0;
+ padding:0;
+ border:0;
+ cursor:default;
+}
+
+UL {
+ border-width:0;
+ margin-<%=isRTL?"right":"left"%>:20px;
+}
+
+#root {
+ margin-top:5px;
+ margin-<%=isRTL?"right":"left"%>:5px;
+}
+
+UL.expanded {
+ display:block;
+}
+
+UL.collapsed {
+ display:none;
+}
+
+LI {
+ margin:0;
+ list-style-image:none;
+ list-style-type:none;
+ white-space: nowrap;
+}
+
+IMG {
+ border:0;
+ margin:0;
+ padding:0;
+ margin-<%=isRTL?"left":"right"%>:4px;
+}
+
+A {
+ text-decoration:none;
+ padding-<%=isRTL?"left":"right"%>:2px;
+ /* this works in ie5.5, but not in ie5.0 */
+ white-space:nowrap;
+}
+
+A:link, A:visited {
+ color:blue;
+}
+
+A:hover {
+ text-decoration:underline;
+}
+
+A.nolink {
+ text-decoration:none;
+}
+
+A.nolink:link, A.nolink:visited {
+ color:WindowText;
+}
+
+A.nolink:hover {
+ text-decoration:none;
+}
+
+A.active {
+ background:Highlight;
+ color:HighlightText;
+ width:100%;
+}
+
+A.active:link, A.active:visited {
+ color:HighlightText;
+}
+
+<%if (data.isMozilla()) {%>
+UL {
+ margin-<%=isRTL?"right":"left"%>:-20px;
+}
+
+#root {
+ margin-<%=isRTL?"right":"left"%>:-35px;
+ margin-top:5px;
+}
+<%}%>
+
+.h {
+ visibility:hidden;
+}
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexList.js b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexList.js
new file mode 100644
index 0000000..e5e6213
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexList.js
@@ -0,0 +1,546 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Intel Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Intel Corporation - initial API and implementation
+ *******************************************************************************/
+
+var isMozilla = parent.isMozilla;
+var isIE = parent.isIE;
+
+var oldActive;
+var oldActiveClass = "";
+
+/**
+ * Returns the target node of an event
+ */
+function getTarget(e) {
+ var target;
+ if (isMozilla)
+ target = e.target;
+ else if (isIE)
+ target = window.event.srcElement;
+
+ return target;
+}
+
+/**
+ * Returns the next tree node "down" from current one
+ */
+function getNextDown(node) {
+ var a = getAnchorNode(node);
+ if (!a) return null;
+
+ // Try visible child first
+ var li = a.parentNode;
+ var ul = getChildNode(li, "UL");
+ if (ul) {
+ if (ul.className == "expanded") {
+ return getDescendantNode(ul, "A");
+ } else {
+ var ulNext = getNextSibling(ul);
+ if (ulNext && ulNext.nodeType == 1 && ulNext.tagName == "UL") {
+ return getDescendantNode(ulNext, "A");
+ }
+ }
+ }
+
+ // Try next sibling in current UL
+ var li_sib = getNextSibling(li);
+ if (li_sib != null) {
+ return getDescendantNode(li_sib, "A");
+ }
+
+ // Try child from next UL
+ var ulNext = getNextSibling(li.parentNode);
+ if (ulNext && ulNext.nodeType == 1 && ulNext.tagName == "UL") {
+ return getDescendantNode(ulNext, "A");
+ }
+
+ // Try looking to parent's sibling
+ while (li_sib == null) {
+ var ul = li.parentNode;
+ li = ul.parentNode;
+ if (li.tagName != "LI") // reached the top, nothing else to do
+ return null;
+
+ li_sib = getNextSibling(li);
+ }
+
+ // found the next down sibling
+ return getDescendantNode(li_sib, "A");
+}
+
+/**
+ * Returns the next tree node "up" from current one
+ */
+function getNextUp(node) {
+ var a = getAnchorNode(node);
+ if (!a) return null;
+
+ // Get previous sibling first
+ var li = a.parentNode;
+ var li_sib = getPrevSibling(li);
+ if (li_sib != null) {
+ // try to get the deepest node that preceeds this current node
+ var candidate = getDescendantNode(li_sib, "A");
+ var nextDown = getNextDown(candidate);
+ while (nextDown != null && nextDown != node) {
+ candidate = nextDown;
+ nextDown = getNextDown(nextDown);
+ }
+ return getDescendantNode(candidate, "A");
+ } else {
+ // look into previous UL
+ var ulPrev = getPrevSibling(li.parentNode);
+ if (ulPrev && ulPrev.nodeType == 1 && ulPrev.tagName == "UL" && ulPrev.className == "expanded") {
+ var li = getChildNode(ulPrev, "LI");
+ var candidate = getDescendantNode(li, "A");
+ var nextDown = getNextDown(candidate);
+ while (nextDown != null && nextDown != node) {
+ candidate = nextDown;
+ nextDown = getNextDown(nextDown);
+ }
+ return getDescendantNode(candidate, "A");
+ } else {
+ // get the parent
+ var li = li.parentNode.parentNode;
+ if (li && li.tagName == "LI")
+ return getDescendantNode(li, "A");
+ else
+ return null;
+ }
+ }
+}
+
+/**
+ * Returns the next sibling element
+ */
+function getNextSibling(node) {
+ var sib = node.nextSibling;
+ while (sib && (sib.nodeType == 3 || sib.tagName == "SCRIPT")) // text or script node
+ sib = sib.nextSibling;
+ return sib;
+}
+
+/**
+ * Returns the next sibling element
+ */
+function getPrevSibling(node) {
+ var sib = node.previousSibling;
+ while (sib && (sib.nodeType == 3 || sib.tagName == "SCRIPT")) // text or script node
+ sib = sib.previousSibling;
+ return sib;
+}
+
+
+/**
+ * Returns the child node with specified tag
+ */
+function getChildNode(parent, childTag) {
+ var list = parent.childNodes;
+ if (list == null) return null;
+ for (var i = 0; i < list.length; i++)
+ if (list.item(i).tagName == childTag)
+ return list.item(i);
+ return null;
+}
+
+/**
+ * Returns the descendat node with specified tag (depth-first searches)
+ */
+function getDescendantNode(parent, childTag) {
+ if (parent == null) return null;
+
+ if (parent.tagName == childTag)
+ return parent;
+
+ var list = parent.childNodes;
+ if (list == null) return null;
+ for (var i = 0; i < list.length; i++) {
+ var child = list.item(i);
+ if (child.tagName == childTag)
+ return child;
+
+ child = getDescendantNode(child, childTag);
+ if (child != null)
+ return child;
+ }
+ return null;
+}
+
+/**
+ * Returns the anchor of this click
+ * NOTE: MOZILLA BUG WITH A:focus and A:active styles
+ */
+function getAnchorNode(node) {
+ if (node == null) return null;
+
+ if (node.nodeType == 3) //"Node.TEXT_NODE")
+ return node.parentNode;
+ else if (node.tagName == "A")
+ return node;
+ else if (node.tagName == "IMG")
+ return getChildNode(node.parentNode, "A");
+ return null;
+}
+
+/**
+ * Returns true when the node is the plus or minus icon
+ */
+function isPlusMinus(node) {
+ return (node.nodeType != 3 && node.tagName == "IMG" && (node.className == "expanded" || node.className == "collapsed"));
+}
+
+/**
+ * Returns the plus/minus icon for this tree node
+ */
+function getPlusMinus(node) {
+ if (isPlusMinus(node))
+ return node;
+ else if (node.nodeType == 3) //"Node.TEXT_NODE")
+ return getChildNode(node.parentNode.parentNode, "IMG");
+ else if (node.tagName == "IMG")
+ return getChildNode(node.parentNode.parentNode, "IMG");
+ else if (node.tagName == "A")
+ return getChildNode(node.parentNode, "IMG");
+
+ return null;
+}
+
+/**
+ * Collapses a tree rooted at the specified element
+ */
+function collapse(node) {
+ node.className = "collapsed";
+ node.src = plus.src;
+ node.alt = altExpandTopicTitles;
+ // set the UL as well
+ var ul = getChildNode(node.parentNode, "UL");
+ if (ul != null) ul.className = "collapsed";
+}
+
+/**
+ * Expands a tree rooted at the specified element
+ */
+function expand(node) {
+ node.className = "expanded";
+ node.src = minus.src;
+ node.alt = altCollapseTopicTitles;
+ // set the UL as well
+ var ul = getChildNode(node.parentNode, "UL");
+ if (ul != null) {
+ ul.className = "expanded";
+ if (ul.id.length > 0) {
+ if (!frames.dynLoadFrame) {
+ return;
+ }
+ var ix = window.location.href.indexOf('?');
+ if (ix < 0) {
+ return;
+ }
+ var query = window.location.href.substr(ix);
+ frames.dynLoadFrame.location = "tocFragment.jsp" + query + "&path=" + ul.id;
+ }
+ }
+}
+
+/**
+ * Returns true when this is an expanded tree node
+ */
+function isExpanded(node) {
+ return node.className == "expanded";
+}
+
+/**
+ * Returns true when this is a collapsed tree node
+ */
+function isCollapsed(node) {
+ return node.className == "collapsed";
+}
+
+/**
+ * Highlights link
+ */
+function highlightTopic(topic) {
+ if (isMozilla) {
+ // try-catch is a workaround for the getSelection() problem
+ // reported for Safari 2.0.3
+ try {
+ window.getSelection().removeAllRanges();
+ } catch (e) {}
+ }
+
+ var a = getAnchorNode(topic);
+ if (a != null) {
+ // TO DO:
+ // parent.parent.parent.parent.setContentToolbarTitle(tocTitle);
+ if (oldActive)
+ oldActive.className = oldActiveClass;
+
+ oldActive = a;
+ oldActiveClass = a.className;
+ a.className += " active";
+
+ // it looks like the onclick event is not handled in mozilla
+ // *** TO DO: handle failed synchronization, do not select in that case
+ if (isMozilla && a.onclick)
+ a.onclick()
+ //if (isIE)
+ // a.hideFocus = "true";
+ }
+}
+
+/**
+ * Selects a topic in the tree: expand tree and highlight it
+ * returns true if success
+ */
+function selectTopicById(id) {
+ var topic = document.getElementById(id);
+ if (topic) {
+ highlightTopic(topic);
+ scrollToViewTop(topic);
+ return true;
+ }
+ return false;
+}
+/**
+ * Returns the horizontal offset on which the page should be scrolled to show the node.
+ * Returns 0 if the node is already visible.
+ */
+function getVerticalScroll(node) {
+ var nodeTop = node.offsetTop;
+ var nodeBottom = nodeTop + node.offsetHeight;
+ var pageTop = 0;
+ var pageBottom = 0;
+
+ if (isIE) {
+ pageTop = document.body.scrollTop;
+ pageBottom = pageTop + document.body.clientHeight;
+ } else if (isMozilla) {
+ pageTop = window.pageYOffset;
+ pageBottom = pageTop + window.innerHeight - node.offsetHeight;
+ }
+
+ var scroll = 0;
+ if (nodeTop >= pageTop) {
+ if (nodeBottom <= pageBottom)
+ scroll = 0; // already in view
+ else
+ scroll = nodeBottom - pageBottom;
+ } else {
+ scroll = nodeTop - pageTop;
+ }
+
+ return scroll;
+}
+
+
+/**
+ * Scrolls the page to show the specified element
+ */
+function scrollIntoView(node) {
+ var scroll = getVerticalScroll(node);
+ if (scroll != 0)
+ window.scrollBy(0, scroll);
+}
+
+/**
+ * Scrolls the page so the node gets to the first line
+ */
+function scrollToViewTop(node) {
+ window.scrollTo(0, node.offsetTop);
+}
+
+/*
+ * Currently called on IE only
+ */
+function focusHandler(e)
+{
+ /*if (isMozilla)
+ return;
+ */
+
+ try{
+ if (oldActive){
+ // only focus when the element is visible
+ var scroll = getVerticalScroll(oldActive);
+ if (scroll == 0)
+ oldActive.focus();
+ }
+ }
+ catch(e){}
+}
+
+
+/**
+ * display topic label in the status line on mouse over topic
+ */
+function mouseMoveHandler(e) {
+ var overNode = getTarget(e);
+ if (!overNode) return;
+
+ overNode = getAnchorNode(overNode);
+ if (overNode == null) {
+ window.status = "";
+ return;
+ }
+
+ if (isMozilla)
+ e.cancelBubble = false;
+
+ if (overNode.title == "") {
+ if (overNode.innerText)
+ overNode.title = overNode.innerText;
+ else if (overNode.text)
+ overNode.title = overNode.text;
+ }
+ window.status = overNode.title;
+}
+
+/**
+ * handler for expanding / collapsing topic tree
+ */
+function mouseClickHandler(e) {
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ var plus_minus = getPlusMinus(clickedNode);
+ if (plus_minus != null) {
+ if (isCollapsed(plus_minus))
+ expand(plus_minus);
+ else if (isPlusMinus(clickedNode) && isExpanded(plus_minus))
+ // collapse only if click on minus image
+ collapse(plus_minus);
+ }
+
+ var anchorNode = getAnchorNode(clickedNode);
+ if (anchorNode) {
+ highlightTopic(anchorNode);
+ parent.setTypeinValue(anchorNode);
+ }
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+}
+
+/**
+ * Handler for key down (arrows)
+ */
+function keyDownHandler(e) {
+ var key;
+
+ if (isIE) {
+ key = window.event.keyCode;
+ } else if (isMozilla) {
+ key = e.keyCode;
+ }
+
+ if (key <37 || key > 40)
+ return true;
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+
+ if (key == 39) { // Right arrow, expand
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+ if (isIE) {
+ if (clickedNode.id != null) {
+ if (clickedNode.id.charAt(0) == 'b') {
+ if (clickedNode.name != "opened") {
+ loadTOC(clickedNode.name);
+ return true;
+ }
+ }
+ }
+ }
+
+ var plus_minus = getPlusMinus(clickedNode);
+ if (plus_minus != null)
+ {
+ if (isCollapsed(plus_minus))
+ expand(plus_minus);
+
+ highlightTopic(plus_minus);
+ scrollIntoView(clickedNode);
+ }
+ } else if (key == 37) { // Left arrow,collapse
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ if (clickedNode.id != null){
+ if (clickedNode.id.charAt(0) == 'b'){
+ if(clickedNode.name == "opened"){
+ loadTOC(" ");
+ return true;
+ } else {
+ return true;
+ }
+ }
+ }
+
+ var plus_minus = getPlusMinus(clickedNode);
+ if (plus_minus != null) {
+ if (isExpanded(plus_minus))
+ collapse(plus_minus);
+
+ highlightTopic(plus_minus);
+ scrollIntoView(clickedNode);
+ }
+ } else if (key == 40 ) { // down arrow
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ var next = getNextDown(clickedNode);
+ if (next) {
+ highlightTopic(next);
+ parent.setTypeinValue(next);
+ next.focus();
+ }
+
+ } else if (key == 38) { // up arrow
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ var next = getNextUp(clickedNode);
+ if (next) {
+ highlightTopic(next);
+ parent.setTypeinValue(next);
+ next.focus();
+ }
+ }
+
+
+ return true;
+}
+
+/**
+ * IndexListFrame onload handler
+ */
+function onloadHandler() {
+ parent.listFrame = window;
+
+ var node = document.getElementsByTagName("A").item(0);
+ highlightTopic(node);
+ scrollToViewTop(node);
+
+ if (isMozilla) {
+ document.addEventListener('click', mouseClickHandler, true);
+ document.addEventListener('mousemove', mouseMoveHandler, true);
+ document.addEventListener('keydown', keyDownHandler, true);
+ } else if (isIE) {
+ document.onclick = mouseClickHandler;
+ document.onmousemove = mouseMoveHandler;
+ document.onkeydown = keyDownHandler;
+ //window.onfocus = focusHandler;
+ }
+}
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexList.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexList.jsp
new file mode 100644
index 0000000..1e8d741
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexList.jsp
@@ -0,0 +1,50 @@
+<%--
+ Copyright (c) 2005, 2006 Intel Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Intel Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ IndexData data = new IndexData(application, request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("IndexListTitle", request)%></title>
+
+<style type="text/css">
+<%@ include file="indexList.css"%>
+</style>
+
+<base target="ContentViewFrame">
+
+<script language="JavaScript">
+var ids = [<%data.generateIds(out);%>];
+minus = new Image();
+minus.src = "<%=prefs.getImagesDirectory()%>" + "/minus.gif";
+plus = new Image();
+plus.src = "<%=prefs.getImagesDirectory()%>" + "/plus.gif";
+altExpandTopicTitles = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("expandTopicTitles", request))%>";
+altCollapseTopicTitles = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("collapseTopicTitles", request))%>";
+usePlusMinus = <%=prefs.isIndexPlusMinus()%>;
+</script>
+<script language="JavaScript" src="indexList.js"></script>
+
+</head>
+<body dir="<%=direction%>" onload="onloadHandler()">
+ <ul dir="<%=direction%>" id="root" class="expanded">
+<%
+ data.generateIndex(out);
+%>
+ </ul>
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexToolbar.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexToolbar.jsp
new file mode 100644
index 0000000..4cad5f0
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexToolbar.jsp
@@ -0,0 +1,31 @@
+<%--
+ Copyright (c) 2005 Intel Corporation.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Intel Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+
+<jsp:include page="toolbar.jsp">
+ <jsp:param name="script" value="navActions.js"/>
+ <jsp:param name="view" value="index"/>
+
+ <jsp:param name="name" value="show_all"/>
+ <jsp:param name="tooltip" value='show_all'/>
+ <jsp:param name="image" value="show_all.gif"/>
+ <jsp:param name="action" value="toggleShowAll"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value="<%=(new ActivitiesData(application, request, response)).getButtonState()%>"/>
+
+ <jsp:param name="name" value="synchnav"/>
+ <jsp:param name="tooltip" value='SynchNav'/>
+ <jsp:param name="image" value="synch_nav.gif"/>
+ <jsp:param name="action" value="resynchNav"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='off'/>
+</jsp:include>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexTypein.css b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexTypein.css
new file mode 100644
index 0000000..5d12032
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexTypein.css
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Intel Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Intel Corporation - initial API and implementation
+ *******************************************************************************/
+
+BODY {
+ background-color:<%=prefs.getViewBackground()%>;
+ font:<%=prefs.getViewFont()%>;
+ margin-top:5px;
+ margin-<%=isRTL?"right":"left"%>:5px;
+ padding:0;
+ border:0;
+}
+
+TABLE, TR, TD, P {
+ margin:0;
+ padding:0;
+ border:0;
+}
+
+TABLE {
+ font:<%=prefs.getViewFont()%>;
+ width:100%;
+}
+
+TR {
+ height:21px;
+}
+
+INPUT {
+ font:<%=prefs.getViewFont()%>;
+ margin:0;
+ padding:0;
+ border:1px solid ThreeDShadow;
+}
+
+#instruction {
+ white-space:nowrap;
+}
+
+#typein {
+ width:100%;
+}
+
+#button {
+ background:ThreeDShadow;
+ color:Window;
+ font-weight:bold;
+ margin-left:1px;
+}
+
+<%
+ if (data.isIE()) {
+%>
+#go {
+ padding-<%=isRTL?"right":"left"%>:1px;
+}
+<%
+ }
+%>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexTypein.js b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexTypein.js
new file mode 100644
index 0000000..85b745b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexTypein.js
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Intel Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Intel Corporation - initial API and implementation
+ *******************************************************************************/
+
+var isMozilla = parent.isMozilla;
+var isIE = parent.isIE;
+
+var typein;
+var currentId;
+
+function compare(keyword, pattern) {
+ var kI = 0, pI = 0;
+ var kCh, pCh;
+
+ while (kI < keyword.length && pI < pattern.length) {
+ kCh = keyword.charAt(kI).toLowerCase();
+ pCh = pattern.charAt(pI).toLowerCase();
+ if (kCh > pCh) {
+ return 1;
+ } else if (kCh < pCh) {
+ return -1;
+ }
+ kI++;
+ pI++;
+ }
+ if (keyword.length >= pattern.length) {
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+function searchPattern(pattern) {
+ if (!parent.listFrame) return null;
+
+ var from = 0;
+ var to = parent.listFrame.ids.length;
+ var i;
+ var res;
+
+ while (to > from) {
+ i = Math.floor((to + from) / 2);
+ res = compare(parent.listFrame.ids[i], pattern);
+ if (res == 0) {
+ while (i > 0) {
+ res = compare(parent.listFrame.ids[--i], pattern);
+ if (res != 0) {
+ i++;
+ break;
+ }
+ }
+ return parent.listFrame.ids[i];
+ } else if (res < 0) {
+ from = i + 1;
+ } else {
+ to = i;
+ }
+ }
+
+ return null;
+}
+
+function keyDownHandler(e) {
+ var key;
+
+ if (isIE) {
+ key = window.event.keyCode;
+ } else if (isMozilla) {
+ key = e.keyCode;
+ }
+
+ if (key != 13 && key != 38 && key != 40)
+ return true;
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+
+ if (key == 13) { // enter
+ // display topic corresponded to selected list item
+ parent.setTypeinValue(parent.getSelection());
+ parent.doDisplay();
+ } if (key == 38) { // up arrow
+ parent.selectNextUp();
+ } else if (key == 40) { // down arrow
+ parent.selectNextDown();
+ }
+
+ return false;
+}
+
+/**
+ * Select the corresponding item in the index list on typein value change.
+ * Check is performed periodically in short interval.
+ */
+function intervalHandler() {
+ if (typein.value != typein.previous) {
+ // typein value has been changed
+ typein.previous = typein.value;
+ var id = searchPattern(typein.value);
+ if (id && id != currentId) {
+ // the value has became to fit to other item
+ if (parent.selectTopicById(id)) {
+ currentId = id;
+ }
+ }
+ }
+}
+
+/**
+ * IndexTypeinFrame onload handler
+ */
+function onloadHandler() {
+ parent.typeinFrame = window;
+
+ typein = document.getElementById("typein");
+
+ typein.value = "";
+ typein.previous = "";
+
+ currentId = "";
+
+ if (isMozilla) {
+ document.addEventListener("keydown", keyDownHandler, true);
+ } else if (isIE) {
+ document.onkeydown = keyDownHandler;
+ }
+
+ setInterval("intervalHandler()", 200);
+}
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexTypein.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexTypein.jsp
new file mode 100644
index 0000000..ed9d711
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexTypein.jsp
@@ -0,0 +1,49 @@
+<%--
+ Copyright (c) 2005, 2006 Intel Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Intel Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ RequestData data = new RequestData(application, request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("IndexTypeinTitle", request)%></title>
+
+<style type="text/css">
+<%@ include file="indexTypein.css"%>
+</style>
+
+<script language="JavaScript" src="indexTypein.js"></script>
+
+</head>
+
+<body dir="<%=direction%>" onload="onloadHandler()">
+
+<table>
+<%if (prefs.isIndexInstruction()) {%>
+ <tr>
+ <td colspan="2"><p id="instruction"><%=ServletResources.getString("IndexTypeinInstructions", request)%></p></td>
+ </tr>
+<%}%>
+ <tr>
+ <td width="100%"><input type="text" id="typein"></td>
+ <%if (prefs.isIndexButton()) {%>
+ <td><input type="button" id="button" value="<%=ServletResources.getString("IndexTypeinButton", request)%>" onclick="this.blur();parent.doDisplay()"></td>
+ <%}%>
+ </tr>
+</table>
+
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexView.js b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexView.js
new file mode 100644
index 0000000..e129b3b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexView.js
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Intel Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Intel Corporation - initial API and implementation
+ *******************************************************************************/
+
+var isMozilla = navigator.userAgent.indexOf("Mozilla") != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
+var isIE = navigator.userAgent.indexOf("MSIE") != -1;
+
+/**
+ * Global references to IndexTypein and IndexList child frames.
+ * Are intialized by the child frames on theirs load.
+ */
+var typeinFrame;
+var listFrame;
+
+/**
+ * Selects a topic in the index list
+ */
+function selectTopicById(id) {
+ if (!listFrame) return false;
+
+ return listFrame.selectTopicById(id);
+}
+
+/**
+ * Selects the next index list node "up" from current one
+ */
+function selectNextUp() {
+ if (!listFrame) return false;
+
+ var next = listFrame.getNextUp(listFrame.oldActive);
+ if (next) {
+ listFrame.highlightTopic(next);
+ listFrame.scrollIntoView(next);
+ setTypeinValue(next);
+ }
+}
+
+/**
+ * Selects the next index list node "down" from current one
+ */
+function selectNextDown() {
+ if (!listFrame) return false;
+
+ var next = listFrame.getNextDown(listFrame.oldActive);
+ if (next) {
+ listFrame.highlightTopic(next);
+ listFrame.scrollIntoView(next);
+ setTypeinValue(next);
+ }
+}
+
+/**
+ * Returns selected list item
+ */
+function getSelection() {
+ if (!listFrame) return null;
+
+ return listFrame.oldActive;
+}
+
+/**
+ * Set value of the typein input field.
+ * The value can be anchor's id or anchor's text.
+ */
+function setTypeinValue(anchor) {
+ if (!typeinFrame) return;
+
+ if (!anchor) return;
+
+ var value = anchor.getAttribute("id");
+ if (value) {
+ typeinFrame.currentId = value;
+ } else {
+ typeinFrame.currentId = "";
+ if (isIE)
+ value = anchor.innerText;
+ else if (isMozilla)
+ value = anchor.lastChild.nodeValue;
+ if (!value)
+ value = "";
+ }
+ typeinFrame.typein.value = value;
+ typeinFrame.typein.previous = value;
+}
+
+/**
+ * Open current selected item in the content frame
+ */
+function doDisplay() {
+ if (!listFrame) return;
+ if (!listFrame.oldActive) return;
+
+ parent.parent.parent.parent.ContentFrame.ContentViewFrame.location.replace(listFrame.oldActive);
+}
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexView.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexView.jsp
new file mode 100644
index 0000000..1481cec
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/indexView.jsp
@@ -0,0 +1,38 @@
+<%--
+ Copyright (c) 2005, 2006 Intel Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Intel Corporation - initial API and implementation
+--%>
+<%@ include file="fheader.jsp"%>
+
+<%
+ RequestData data = new RequestData(application, request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("IndexViewTitle", request)%></title>
+
+<script language="JavaScript" src="indexView.js"></script>
+</head>
+
+<frameset id="indexViewFrameset"
+<%if (prefs.isIndexInstruction()){%>
+ rows="52,*"
+<%} else {%>
+ rows="32,*"
+<%}%>
+ frameborder="0" framespacing="0" border="0">
+ <frame name="IndexTypeinFrame" src="indexTypein.jsp" title='<%=ServletResources.getString("IndexTypeinTitle", request)%>' frameborder="0" marginheiht="0" marginwidth="0" noresize scrolling="no">
+ <frame name="IndexListFrame" src="indexList.jsp" title='<%=ServletResources.getString("IndexListTitle", request)%>' frameborder="0" marginheiht="0" marginwidth="0">
+</frameset>
+
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/linksToolbar.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/linksToolbar.jsp
new file mode 100644
index 0000000..a95923b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/linksToolbar.jsp
@@ -0,0 +1,24 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+
+<jsp:include page="toolbar.jsp">
+ <jsp:param name="script" value="navActions.js"/>
+ <jsp:param name="view" value="links"/>
+
+ <jsp:param name="name" value="synchnav"/>
+ <jsp:param name="tooltip" value='SynchNav'/>
+ <jsp:param name="image" value="synch_nav.gif"/>
+ <jsp:param name="action" value="resynchNav"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='off'/>
+</jsp:include>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/linksView.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/linksView.jsp
new file mode 100644
index 0000000..7610a5c
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/linksView.jsp
@@ -0,0 +1,82 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ LinksData data = new LinksData(application, request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Pragma" content="no-cache">
+<meta http-equiv="Expires" content="-1">
+
+<title><%=ServletResources.getString("Links", request)%></title>
+
+<style type="text/css">
+<%@ include file="list.css"%>
+</style>
+
+<base target="ContentViewFrame">
+<script language="JavaScript" src="list.js"></script>
+
+</head>
+
+
+<body dir="<%=direction%>">
+
+<%
+if(!data.isLinksRequest()) {
+ out.write(ServletResources.getString("pressF1", request));
+} else if (data.getLinksCount() == 0){
+ out.write(ServletResources.getString("Nothing_found", null));
+} else {
+%>
+
+<table id='list' cellspacing='0' >
+
+<%
+ for (int topic = 0; topic < data.getLinksCount(); topic++)
+ {
+%>
+
+<tr class='list' id='r<%=topic%>'>
+ <td align='<%=isRTL?"right":"left"%>' class='label' nowrap>
+ <a id='a<%=topic%>'
+ href='<%=data.getTopicHref(topic)%>'
+ onmouseover="showStatus(event);return true;"
+ onmouseout="clearStatus();return true;"
+ onclick='parent.parent.parent.setContentToolbarTitle(this.title)'
+ title="<%=data.getTopicTocLabel(topic)%>">
+ <img src="<%=prefs.getImagesDirectory()%>/topic.gif" alt=""><%=data.getTopicLabel(topic)%></a>
+ </td>
+</tr>
+
+<%
+ }
+%>
+
+</table>
+
+<%
+
+}
+
+%>
+
+<script language="JavaScript">
+ selectTopicById('<%=data.getSelectedTopicId()%>');
+</script>
+
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/list.css b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/list.css
new file mode 100644
index 0000000..ffee504
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/list.css
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+BODY {
+ background-color: <%=prefs.getViewBackground()%>;
+ color:WindowText;
+ font: <%=prefs.getViewFont()%>;
+ margin-top:5px;
+ margin-<%=isRTL?"right":"left"%>:5px;
+ padding:0;
+ border:0;
+ cursor:default;
+}
+
+A {
+ text-decoration:none;
+ color:WindowText;
+ padding:0px;
+ white-space: nowrap;
+}
+
+A:hover {
+ text-decoration:underline;
+}
+
+IMG {
+ border:0px;
+ margin:0px;
+ padding:0px;
+ margin-<%=isRTL?"left":"right"%>:4px;
+}
+
+TABLE {
+ background-color: <%=prefs.getViewBackground()%>;
+ font: <%=prefs.getViewFont()%>;
+ width:100%;
+}
+
+.list {
+ background-color: <%=prefs.getViewBackground()%>;
+ padding:2px;
+}
+
+.sectiontitle {
+ background-color: <%=prefs.getToolbarBackground()%>;
+ font-weight:bold;
+ margin-top:7px;
+}
+
+.active {
+ background:Highlight;
+ color:HighlightText;
+ width:100%;
+ height:100%;
+}
+
+.label {
+ margin-<%=isRTL?"right":"left"%>:4px;
+}
+
+#menu {
+ position:absolute;
+ display:none;
+ background:<%=prefs.getToolbarBackground()%>;
+ border:2px outset;
+ padding:2px 0px;
+}
+
+.selectedMenuItem {
+ background:Highlight;
+ color:HighlightText;
+ padding-left:10px;
+ padding-right:10px;
+}
+
+.unselectedMenuItem {
+ background:<%=prefs.getToolbarBackground()%>;
+ color:WindowText;
+ padding-left:10px;
+ padding-right:10px;
+}
+
+.score {
+ padding-<%=isRTL?"left":"right"%>:5px;
+}
+
+
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/list.js b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/list.js
new file mode 100644
index 0000000..8188885
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/list.js
@@ -0,0 +1,427 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+// Common scripts for IE and Mozilla.
+
+var isMozilla = navigator.userAgent.indexOf('Mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
+var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+var isSafari = navigator.userAgent.indexOf('Safari') != -1;
+
+// selected node
+var active;
+var oldActive;
+
+/**
+ * Returns the target node of an event
+ */
+function getTarget(e) {
+ var target;
+ if (isMozilla)
+ target = e.target;
+ else if (isIE)
+ target = window.event.srcElement;
+
+ return target;
+}
+
+
+/**
+ * Returns the row of this click
+ */
+function getTRNode(node) {
+ if (node.nodeType == 3) //"Node.TEXT_NODE")
+ return node.parentNode.parentNode.parentNode;
+ else if (node.tagName == "A")
+ return node.parentNode.parentNode;
+ else if (node.tagName == "TD")
+ return node.parentNode;
+ else if (node.tagName == "TR")
+ return node;
+ else if (node.tagName == "IMG")
+ return node.parentNode.parentNode.parentNode;
+ else
+ return null;
+}
+
+/**
+ * Returns the anchor node in this row
+ */
+function getAnchorNode(tr)
+{
+ var id = tr.id.substring(1);
+ return document.getElementById("a"+id);
+}
+
+
+/**
+ * Return next item in the list
+ */
+function getNextDown(node)
+{
+ var tr = getTRNode(node);
+ if (tr == null) return null;
+
+ var id = tr.id.substring(1);
+ var next = 1 + eval(id);
+ return document.getElementById("a"+next);
+}
+
+/**
+ * Return previous item in the list
+ */
+function getNextUp(node)
+{
+ var tr = getTRNode(node);
+ if (tr == null) return null;
+
+ var id = tr.id.substring(1);
+ var next = eval(id) - 1;
+ if (next >= 0)
+ return document.getElementById("a"+next);
+ else
+ return null;
+}
+
+
+/**
+ * Highlights link. Returns true if highlights.
+ */
+function highlightTopic(topic)
+{
+ if (!topic || (topic.tagName != "A" && topic.parentNode.tagName != "A"))
+ return false;
+
+ var tr = getTRNode(topic);
+ if (tr != null)
+ {
+ if (oldActive && oldActive != tr) {
+ oldActive.className="list";
+ var oldA = getAnchorNode(oldActive);
+ if (oldA) oldA.className = "";
+ }
+
+ oldActive = tr;
+ tr.className = "active";
+ var a = getAnchorNode(tr);
+ if (a)
+ {
+ a.className = "active";
+ // set toolbar title
+ if (a.onclick)
+ a.onclick();
+ //if (isIE)
+ // a.hideFocus = "true";
+ }
+ active = a;
+ return true;
+ }
+ return false;
+}
+
+/**
+ * Selects a topic in the tree: expand tree and highlight it
+ */
+function selectTopic(topic)
+{
+ if (!topic || topic == "") return;
+
+ var links = document.getElementsByTagName("a");
+
+ for (var i=0; i<links.length; i++)
+ {
+ // take into account the extra ?toc=.. or &toc=
+ if (links[i].href.indexOf(topic+"?toc=") == 0 ||
+ links[i].href.indexOf(topic+"&toc=") == 0 ||
+ links[i].href.indexOf(topic+"/?toc=") == 0)
+ {
+ highlightTopic(links[i]);
+ scrollIntoView(links[i]);
+ links[i].scrollIntoView(true);
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Selects a topic in the list
+ */
+function selectTopicById(id)
+{
+ var topic = document.getElementById(id);
+ if (topic)
+ {
+ highlightTopic(topic);
+ scrollIntoView(topic);
+ return true;
+ }
+ return false;
+}
+
+
+/**
+ * Scrolls the page to show the specified element
+ */
+function scrollIntoView(node)
+{
+ var scroll = getVerticalScroll(node);
+ if (scroll != 0)
+ window.scrollBy(0, scroll);
+}
+
+/**
+ * Scrolls the page to show the specified element
+ */
+function getVerticalScroll(node)
+{
+ // Use the parent element for getting the offsetTop, as it appears
+ // that tables get their own layout measurements.
+
+ //var nodeTop = node.offsetTop;
+ var nodeTop = node.parentNode.offsetTop;
+
+ //var nodeBottom = nodeTop + node.offsetHeight;
+ var nodeBottom = nodeTop + node.parentNode.offsetHeight;
+
+ var pageTop = 0;
+ var pageBottom = 0;
+
+ if (isIE)
+ {
+ pageTop = document.body.scrollTop;
+ pageBottom = pageTop + document.body.clientHeight;
+
+ }
+ else if (isMozilla)
+ {
+ pageTop = window.pageYOffset;
+ pageBottom = pageTop + window.innerHeight - node.offsetHeight;
+ }
+
+ var scroll = 0;
+ if (nodeTop >= pageTop )
+ {
+ if (nodeBottom <= pageBottom)
+ scroll = 0; // already in view
+ else
+ scroll = nodeBottom - pageBottom/2;
+ }
+ else
+ {
+ scroll = nodeTop - pageTop;
+ }
+
+ return scroll;
+}
+
+function hidePopupMenu() {
+ // hide popup if open
+ var menu = document.getElementById("menu");
+ if (!menu)
+ return;
+ if (menu.style.display == "block")
+ menu.style.display = "none";
+}
+
+var popupMenuTarget;
+
+function showPopupMenu(e) {
+ // show the menu
+ var x = e.clientX;
+ var y = e.clientY;
+
+ e.cancelBubble = true;
+
+ var menu = document.getElementById("menu");
+ if (!menu)
+ return;
+ menu.style.left = (x+1)+"px";
+ menu.style.top = (y+1)+"px";
+ menu.style.display = "block";
+ if (isMozilla)
+ popupMenuTarget = e.target;
+}
+
+/**
+ * display topic label in the status line on mouse over topic
+ */
+function showStatus(e) {
+ try {
+ var overNode;
+ if (isMozilla)
+ overNode = e.target;
+ else if (isIE)
+ overNode = window.event.srcElement;
+ else
+ return true;
+
+ overNode = getTRNode(overNode);
+ if (overNode == null) {
+ window.status = "";
+ return true;
+ }
+
+ if (isMozilla)
+ e.cancelBubble = false;
+
+ var a = getAnchorNode(overNode);
+ var statusText = "";
+ if (isIE)
+ statusText = a.innerText;
+ else if (isMozilla)
+ statusText = a.lastChild.nodeValue;
+
+ if (statusText != a.title)
+ statusText += " - " + a.title;
+
+ window.status = statusText;
+ } catch (e) {
+ }
+
+ return true;
+}
+
+function clearStatus() {
+ window.status="";
+}
+
+/**
+ * Popup a menu on right click over a bookmark.
+ * This handler assumes the list.js script has been loaded.
+ */
+function contextMenuHandler(e)
+{
+ // hide popup if open
+ hidePopupMenu();
+
+ if (isIE)
+ e = window.event;
+
+ var clickedNode;
+ if (isMozilla)
+ clickedNode = e.target;
+ else if (isIE)
+ clickedNode = e.srcElement;
+
+ if (!clickedNode)
+ return true;
+
+ // call the click handler to select node
+ mouseClickHandler(e);
+
+ if(clickedNode.tagName == "A")
+ active = clickedNode;
+ else if (clickedNode.parentNode.tagName == "A")
+ active = clickedNode.parentNode;
+ else
+ return true;
+
+ showPopupMenu(e);
+
+ return false;
+}
+
+/**
+ * handler for clicking on a node
+ */
+function mouseClickHandler(e) {
+
+ if (!isMozilla || e && e.target && e.target != popupMenuTarget)
+ hidePopupMenu();
+
+ var clickedNode;
+ if (isMozilla)
+ clickedNode = e.target;
+ else if (isIE)
+ clickedNode = window.event.srcElement;
+ else
+ return true;
+
+ highlightTopic(clickedNode);
+}
+
+
+function focusHandler(e)
+{
+ if (oldActive){
+ try{
+ oldActive.focus();
+ } catch (e) {
+ }
+ }
+}
+
+/**
+ * Handler for key down (arrows)
+ */
+function keyDownHandler(e)
+{
+ var key;
+
+ if (isIE) {
+ key = window.event.keyCode;
+ } else if (isMozilla) {
+ key = e.keyCode;
+ }
+
+ if (key <37 || key > 40)
+ return true;
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+
+ if (key == 40 ) { // down arrow
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ var next = getNextDown(clickedNode);
+ highlightTopic(next);
+ if (next)
+ next.focus();
+ else
+ return true;
+
+ } else if (key == 38 ) { // up arrow
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ var next = getNextUp(clickedNode);
+ highlightTopic(next);
+ if (next)
+ next.focus();
+ else
+ return true;
+ } else
+ return true;
+
+ return false;
+}
+
+
+// listen for events
+if (isMozilla) {
+ document.addEventListener('click', mouseClickHandler, true);
+ document.addEventListener('keydown', keyDownHandler, true);
+ //document.addEventListener("focus", focusHandler, true);
+ if (isSafari) {
+ // workaround for lack of good system colors in Safari
+ document.write('<style type="text/css">');
+ document.write('.active {background:#B5D5FF;color:#000000;}');
+ document.write('</style>');
+ }
+}
+else if (isIE){
+ document.onclick = mouseClickHandler;
+ document.onkeydown = keyDownHandler;
+ window.onfocus = focusHandler;
+}
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/livehelp_js.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/livehelp_js.jsp
new file mode 100644
index 0000000..240d052
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/livehelp_js.jsp
@@ -0,0 +1,70 @@
+<%--
+ Copyright (c) 2000, 2005 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ page import="org.eclipse.help.internal.webapp.data.*" errorPage="/advanced/err.jsp" contentType="text/html; charset=UTF-8"%>
+<%
+ request.setCharacterEncoding("UTF-8");
+%>
+<script language="JavaScript">
+function liveActionInternal(topHelpWindow, pluginId, className, argument)
+{
+<%
+ RequestData data = new RequestData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+ if(data.getMode() == RequestData.MODE_INFOCENTER){
+%>
+ alert("<%=UrlUtil.JavaScriptEncode(ServletResources.getString("noLiveHelpInInfocenter", request))%>");
+ return;
+<%
+ }else if(!prefs.isActiveHelp()){
+%>
+ alert("<%=UrlUtil.JavaScriptEncode(ServletResources.getString("noLiveHelp", request))%>");
+ return;
+<%
+ }else {
+%>
+ // construct the proper url for communicating with the server
+ var url= window.location.href;
+
+ var i = url.indexOf("?");
+ if(i>0)
+ url=url.substring(0, i);
+
+ i = url.indexOf("/topic/");
+ if(i < 0)
+ i = url.lastIndexOf("/");
+
+ url=url.substring(0, i+1);
+ var encodedArg=encodeURIComponent(argument);
+ url=url+"livehelp/?pluginID="+pluginId+"&class="+className+"&arg="+encodedArg+"&nocaching="+Math.random();
+
+ // we need to find the toolbar frame.
+ // to do: cleanup this, including the location of the hidden livehelp frame.
+ var toolbarFrame = topHelpWindow.HelpFrame.ContentFrame.ContentToolbarFrame;
+ if (!toolbarFrame){
+ window.location=url;
+ return;
+ }
+
+ if(toolbarFrame.liveHelpFrame){
+ toolbarFrame.liveHelpFrame.location=url;
+ }
+<%
+ }
+%>
+}
+function showTopicInContentsInternal(topHelpWindow, topic) {
+ try{
+ topHelpWindow.HelpFrame.NavFrame.displayTocFor(topic);
+ }catch(e){
+ }
+}
+
+</script>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/nav.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/nav.jsp
new file mode 100644
index 0000000..516a942
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/nav.jsp
@@ -0,0 +1,162 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="fheader.jsp"%>
+
+<%
+ LayoutData data = new LayoutData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title><%=ServletResources.getString("Help", request)%></title>
+
+<style type="text/css">
+<%
+if (data.isMozilla()) {
+%>
+HTML {
+ border-<%=isRTL?"right":"left"%>:1px solid ThreeDShadow;
+ background:<%=prefs.getToolbarBackground()%>;
+}
+<%
+} else {
+%>
+FRAMESET {
+ border-top:1px solid ThreeDShadow;
+ border-left:1px solid ThreeDShadow;
+ border-right:1px solid ThreeDShadow;
+}
+<%
+}
+%>
+</style>
+
+<script language="JavaScript">
+var isMozilla = navigator.userAgent.indexOf('Mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
+var isMozilla10 = isMozilla && navigator.userAgent.indexOf('rv:1') != -1;
+var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+
+/**
+ * Views can call this to set the title on the content toolbar
+ */
+function setContentToolbarTitle(title)
+{
+ if(parent.ContentFrame.ContentToolbarFrame && parent.ContentFrame.ContentToolbarFrame.setTitle ){
+ parent.ContentFrame.ContentToolbarFrame.setTitle(title);
+ }
+}
+
+/**
+ * Shows specified view. Called from actions that switch the view
+ */
+function showView(view)
+{
+ // Note: assumes the same id shared by tabs and iframes
+ ViewsFrame.showView(view);
+ TabsFrame.showTab(view);
+}
+
+var temp;
+var tempActiveId;
+var tempView = "";
+
+/**
+ * Shows the TOC frame, loads appropriate TOC, and selects the topic
+ */
+function displayTocFor(topic)
+{
+ tempView = ViewsFrame.lastView;
+
+ /******** HARD CODED VIEW NAME *********/
+ showView("toc");
+
+ var tocView = ViewsFrame.toc.tocViewFrame;
+
+ if (tocView.selectTopic && tocView.selectTopic(topic))
+ return;
+ else {
+ // save the current navigation, so we can retrieve it when synch does not work
+ saveNavigation();
+
+ var advIndex=window.location.href.indexOf("/advanced/nav.jsp");
+ if(advIndex < 0)
+ return;
+ var tocURL = window.location.href.substr(0, advIndex) + "/advanced/tocView.jsp";
+ tocView.location.replace(tocURL + "?topic="+topic+"&synch=yes");
+ }
+}
+
+/*
+ * Shows the TOC frame and collapses all TOCs.
+ */
+function collapseToc()
+{
+ /******** HARD CODED VIEW NAME *********/
+ showView("toc");
+ var tocView = ViewsFrame.toc.tocViewFrame;
+ if (tocView.location.href.indexOf("?") > 0) {
+ tocView.location = "tocView.jsp";
+ }
+}
+
+function saveNavigation()
+{
+ /**** HARD CODED VIEW NAME *********/
+ var tocView = ViewsFrame.toc.tocViewFrame;
+
+ if (tocView.oldActive) {
+ tempActiveId = tocView.oldActive.id;
+ tocView.oldActive.className = tocView.oldActiveClass;
+ tocView.oldActive = null;
+ }
+
+ if (isIE)
+ temp = tocView.document.body.innerHTML;
+ else if (isMozilla)
+ temp = tocView.document.documentElement.innerHTML;
+}
+
+function restoreNavigation(errorMessage)
+{
+ // switch to saved view
+ showView(tempView);
+
+ /**** HARD CODED VIEW NAME *********/
+ var tocView = ViewsFrame.toc.tocViewFrame;
+
+ if (temp && (isIE || isMozilla10)) {
+ // Restore old navigation
+ if (isIE) {
+ tocView.document.body.innerHTML = temp;
+ } else if (isMozilla10) {
+ tocView.document.documentElement.innerHTML = temp;
+ }
+ if (tempActiveId){
+ tocView.selectTopicById(tempActiveId);
+ }
+ } else {
+ // fail back case
+ tocView.location.replace("tocView.jsp");
+ }
+ window.status=errorMessage;
+}
+</script>
+</head>
+
+<frameset onload="showView('<%=data.getVisibleView()%>')" id="navFrameset" rows="*,21" framespacing="0" border="0" frameborder="0" scrolling="no">
+ <frame name="ViewsFrame" title="<%=ServletResources.getString("ignore", "ViewsFrame", request)%>" src='<%="views.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" resize=yes>
+ <frame name="TabsFrame" title="<%=ServletResources.getString("TabsFrame", request)%>" src='<%="tabs.jsp"+data.getQuery()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>
+</frameset>
+
+</html>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/navActions.js b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/navActions.js
new file mode 100644
index 0000000..45bbab5
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/navActions.js
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+
+function resynchNav(button)
+{
+ try {
+ parent.parent.parent.parent.ContentFrame.ContentToolbarFrame.resynch(button);
+ } catch(e){
+ }
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
+
+function toggleShowAll(button){
+ window.parent.parent.toggleShowAll();
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
+
+function removeBookmark(button){
+ try {
+ parent.bookmarksViewFrame.removeBookmark();
+ } catch(e){
+ }
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
+
+function removeAllBookmarks(button){
+ try {
+ parent.bookmarksViewFrame.removeAllBookmarks();
+ } catch(e){
+ }
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/search.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/search.jsp
new file mode 100644
index 0000000..90eed43
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/search.jsp
@@ -0,0 +1,29 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ page import="org.eclipse.help.internal.webapp.data.*" errorPage="/advanced/err.jsp" contentType="text/html; charset=UTF-8"%>
+<%
+ request.setCharacterEncoding("UTF-8");
+ boolean cookiesEnabled = false;
+ Cookie[] cookies = request.getCookies();
+ if (cookies != null) {
+ for (int i = 0; i < cookies.length; i++) {
+ if ("cookiesEnabled".equals(cookies[i].getName()) && "yes".equals(cookies[i].getValue())) {
+ cookiesEnabled = true;
+ break;
+ }
+ }
+ }
+ if(cookiesEnabled || (new RequestData(application, request, response)).getMode() != RequestData.MODE_INFOCENTER){
+ request.getRequestDispatcher("/advanced/searchScoped.jsp").forward(request, response);
+ }else{
+ request.getRequestDispatcher("/advanced/searchSimple.jsp").forward(request, response);
+ }
+%>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchList.css b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchList.css
new file mode 100644
index 0000000..b50a5d0
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchList.css
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+BODY {
+ background-color: <%=prefs.getViewBackground()%>;
+ color:WindowText;
+ font: <%=prefs.getViewFont()%>;
+ margin-top:5px;
+ margin-<%=isRTL?"right":"left"%>:5px;
+ padding:0;
+ border:0;
+ cursor:default;
+}
+
+A {
+ text-decoration:none;
+ padding:0px;
+}
+
+A:hover {
+ text-decoration:underline;
+}
+
+IMG {
+ border:0px;
+ margin:0px;
+ padding:0px;
+ margin-<%=isRTL?"left":"right"%>:4px;
+}
+
+TABLE {
+ background-color: <%=prefs.getViewBackground()%>;
+ font: <%=prefs.getViewFont()%>;
+ width:100%;
+}
+
+.list {
+ background-color: <%=prefs.getViewBackground()%>;
+ padding:2px;
+}
+
+.sectiontitle {
+ background-color: <%=prefs.getToolbarBackground()%>;
+ font-weight:bold;
+ margin-top:7px;
+}
+
+.active {
+ background:Highlight;
+ color:HighlightText;
+ width:100%;
+ height:100%;
+}
+
+.label {
+ margin-<%=isRTL?"right":"left"%>:4px;
+}
+
+#menu {
+ position:absolute;
+ display:none;
+ background:<%=prefs.getToolbarBackground()%>;
+ border:2px outset;
+ padding:2px 0px;
+}
+
+.selectedMenuItem {
+ background:Highlight;
+ color:HighlightText;
+ padding-left:10px;
+ padding-right:10px;
+}
+
+.unselectedMenuItem {
+ background:<%=prefs.getToolbarBackground()%>;
+ color:WindowText;
+ padding-left:10px;
+ padding-right:10px;
+}
+
+.score {
+ padding-<%=isRTL?"left":"right"%>:5px;
+}
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchScoped.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchScoped.jsp
new file mode 100644
index 0000000..f85a944
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchScoped.jsp
@@ -0,0 +1,247 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ SearchData data = new SearchData(application, request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+<title><%=ServletResources.getString("Search", request)%></title>
+
+<style type="text/css">
+/* need this one for Mozilla */
+HTML {
+ width:100%;
+ height:100%;
+ margin:0px;
+ padding:0px;
+ border:0px;
+ }
+
+BODY {
+ background:<%=prefs.getToolbarBackground()%>;
+ border:0px;
+ text:white;
+ height:100%;
+}
+
+TABLE {
+ font: <%=prefs.getToolbarFont()%>;
+ background:<%=prefs.getToolbarBackground()%>;
+ margin: 0px;
+ padding: 0px;
+ height:100%;
+}
+
+FORM {
+ background:<%=prefs.getToolbarBackground()%>;
+ height:100%;
+ margin:0px;
+}
+
+INPUT {
+ font: <%=prefs.getToolbarFont()%>;
+ margin:0px;
+ padding:0px;
+}
+
+A {
+ color:WindowText;
+ text-decoration:none;
+}
+
+#searchTD {
+ padding-<%=isRTL?"right":"left"%>:7px;
+ padding-<%=isRTL?"left":"right"%>:4px;
+}
+
+#searchWord {
+ padding-left:4px;
+ padding-right:4px;
+ border:1px solid ThreeDShadow;
+}
+
+#searchLabel {
+ color:WindowText;
+}
+
+#go {
+ background:ThreeDShadow;
+ color:Window;
+ font-weight:bold;
+ border:1px solid ThreeDShadow;
+ margin-left:1px;
+}
+
+#scopeLabel {
+ text-decoration:underline;
+ color:#0066FF;
+ cursor:hand;
+ padding-left:15px; /* This should be the same for both RTL and LTR. */
+}
+
+#scope {
+ text-align:<%=isRTL?"left":"right"%>;
+ margin-<%=isRTL?"right":"left"%>:5px;
+ border:0px;
+ color:WindowText;
+ text-decoration:none;
+}
+
+<%
+ if (data.isIE()) {
+%>
+#go {
+ padding-<%=isRTL?"right":"left"%>:1px;
+}
+<%
+ }
+%>
+</style>
+
+<script language="JavaScript">
+var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+var isMozilla = navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
+
+var advancedDialog;
+var w = 300;
+var h = 300;
+
+function openAdvanced()
+{
+ var scope = document.getElementById("scope").firstChild;
+ var workingSet = "";
+ if (scope != null)
+ workingSet = document.getElementById("scope").firstChild.nodeValue;
+
+<%
+if (data.isIE()){
+%>
+ var l = top.screenLeft + (top.document.body.clientWidth - w) / 2;
+ var t = top.screenTop + (top.document.body.clientHeight - h) / 2;
+<%
+} else {
+%>
+ var l = top.screenX + (top.innerWidth - w) / 2;
+ var t = top.screenY + (top.innerHeight - h) / 2;
+<%
+}
+%>
+ // move the dialog just a bit higher than the middle
+ if (t-50 > 0) t = t-50;
+
+ window.location="javascript://needModal";
+ advancedDialog = window.open("workingSetManager.jsp?workingSet="+encodeURIComponent(workingSet), "advancedDialog", "resizeable=no,height="+h+",width="+w+",left="+l+",top="+t );
+ advancedDialog.focus();
+}
+
+function closeAdvanced()
+{
+ try {
+ if (advancedDialog)
+ advancedDialog.close();
+ }
+ catch(e) {}
+}
+
+/**
+ * This function can be called from this page or from
+ * the advanced search page. When called from the advanced
+ * search page, a query is passed.
+ */
+function doSearch(query)
+{
+ var workingSet = document.getElementById("scope").firstChild.nodeValue;
+
+ if (!query || query == "")
+ {
+ var form = document.forms["searchForm"];
+ var searchWord = form.searchWord.value;
+ var maxHits = form.maxHits.value;
+ if (!searchWord || searchWord == "")
+ return;
+ query ="searchWord="+encodeURIComponent(searchWord)+"&maxHits="+maxHits;
+ if (workingSet != '<%=ServletResources.getString("All", request)%>')
+ query = query +"&scope="+encodeURIComponent(workingSet);
+ }
+
+ /******** HARD CODED VIEW NAME *********/
+ // do some tests to ensure the results are available
+ if (parent.HelpFrame &&
+ parent.HelpFrame.NavFrame &&
+ parent.HelpFrame.NavFrame.showView &&
+ parent.HelpFrame.NavFrame.ViewsFrame &&
+ parent.HelpFrame.NavFrame.ViewsFrame.search &&
+ parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame)
+ {
+ parent.HelpFrame.NavFrame.showView("search");
+ var searchView = parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame;
+ searchView.location.replace("searchView.jsp?"+query);
+ }
+}
+
+function fixHeights()
+{
+ if (!isIE) return;
+
+ var h = document.getElementById("searchWord").offsetHeight;
+ document.getElementById("go").style.height = h;
+}
+
+function onloadHandler(e)
+{
+ var form = document.forms["searchForm"];
+ form.searchWord.value = '<%=UrlUtil.JavaScriptEncode(data.getSearchWord())%>';
+ fixHeights();
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>" onload="onloadHandler()" onunload="closeAdvanced()">
+
+ <form name="searchForm" onsubmit="doSearch()">
+ <table id="searchTable" align="<%=isRTL?"right":"left"%>" valign="middle" cellspacing="0" cellpadding="0" border="0">
+ <tr nowrap valign="middle">
+ <td <%=isRTL?"nowrap":""%> id="searchTD">
+ <label id="searchLabel" for="searchWord" accesskey="<%=ServletResources.getAccessKey("Search", request)%>">
+ <%=ServletResources.getLabel("Search", request)%>:
+ </label>
+ </td>
+ <td>
+ <input type="text" id="searchWord" name="searchWord" value='' size="24" maxlength="256" alt='<%=ServletResources.getString("SearchExpression", request)%>' title='<%=ServletResources.getString("SearchExpression", request)%>'>
+ </td>
+ <td >
+ <input type="button" onclick="this.blur();doSearch()" value='<%=ServletResources.getString("GO", request)%>' id="go" alt='<%=ServletResources.getString("GO", request)%>' title='<%=ServletResources.getString("GO", request)%>'>
+ <input type="hidden" name="maxHits" value="500" >
+ </td>
+ <td nowrap>
+ <a id="scopeLabel" href="javascript:openAdvanced();" title='<%=ServletResources.getString("ScopeTooltip", request)%>' alt='<%=ServletResources.getString("ScopeTooltip", request)%>' onmouseover="window.status='<%=ServletResources.getString("ScopeTooltip", request)%>'; return true;" onmouseout="window.status='';"><%=ServletResources.getLabel("Scope", request)%>:</a>
+ </td>
+ <td nowrap>
+ <input type="hidden" name="workingSet" value='<%=data.getScope()%>'>
+ <div id="scope" ><%=data.getScope()%></div>
+ </td>
+ </tr>
+
+ </table>
+ </form>
+
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchSimple.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchSimple.jsp
new file mode 100644
index 0000000..8d96364
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchSimple.jsp
@@ -0,0 +1,225 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ SearchData data = new SearchData(application, request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+<title><%=ServletResources.getString("Search", request)%></title>
+
+<style type="text/css">
+/* need this one for Mozilla */
+HTML {
+ width:100%;
+ height:100%;
+ margin:0px;
+ padding:0px;
+ border:0px;
+ }
+
+BODY {
+ background:<%=prefs.getToolbarBackground()%>;
+ border:0px;
+ text:white;
+ height:100%;
+}
+
+TABLE {
+ font: <%=prefs.getToolbarFont()%>;
+ background:<%=prefs.getToolbarBackground()%>;
+ margin: 0px;
+ padding: 0px;
+ height:100%;
+}
+
+FORM {
+ background:<%=prefs.getToolbarBackground()%>;
+ height:100%;
+ margin:0px;
+}
+
+INPUT {
+ font: <%=prefs.getToolbarFont()%>;
+ margin:0px;
+ padding:0px;
+}
+
+
+#searchTable {
+ padding-<%=isRTL?"right":"left"%>:5;
+}
+
+#searchWord {
+ padding-left:4px;
+ padding-right:4px;
+ border:1px solid ThreeDShadow;
+}
+
+#go {
+ background:ThreeDShadow;
+ color:Window;
+ font-weight:bold;
+ border:1px solid ThreeDShadow;
+}
+
+
+#advanced {
+ text-decoration:underline;
+ text-align:<%=isRTL?"left":"right"%>;
+ color:#0066FF;
+ cursor:hand;
+ margin-<%=isRTL?"right":"left"%>:4px;
+ border:0px;
+}
+
+<%
+ if (data.isIE()) {
+%>
+#go {
+ padding-<%=isRTL?"right":"left"%>:1px;
+}
+<%
+ }
+%>
+</style>
+
+<script language="JavaScript">
+var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+var isMozilla = navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
+
+<%
+ String[] selectedBooks = data.getSelectedTocs();
+%>
+// create list of books initilize selectedBooks variable used by advances search
+var selectedBooks = new Array(<%=selectedBooks.length%>);
+<%
+for (int i=0; i<selectedBooks.length; i++)
+{
+%>
+ selectedBooks[<%=i%>] = "<%=UrlUtil.JavaScriptEncode(selectedBooks[i])%>";
+<%
+}
+%>
+
+var advancedDialog;
+var w = 400;
+var h = 300;
+
+function saveSelectedBooks(books)
+{
+ selectedBooks = new Array(books.length);
+ for (var i=0; i<selectedBooks.length; i++){
+ selectedBooks[i] = new String(books[i]);
+ }
+}
+
+function openAdvanced()
+{
+ window.location="javascript://needModal";
+ advancedDialog = window.open("advanced.jsp?searchWord="+encodeURIComponent(document.getElementById("searchWord").value), "advancedDialog", "resizeable=no,height="+h+",width="+w );
+ advancedDialog.focus();
+}
+
+function closeAdvanced()
+{
+ try {
+ if (advancedDialog)
+ advancedDialog.close();
+ }
+ catch(e) {}
+}
+
+/**
+ * This function can be called from this page or from
+ * the advanced search page. When called from the advanced
+ * search page, a query is passed.
+ */
+function doSearch(query)
+{
+ if (!query || query == "")
+ {
+ var form = document.forms["searchForm"];
+ var searchWord = form.searchWord.value;
+ var maxHits = form.maxHits.value;
+ if (!searchWord || searchWord == "")
+ return;
+ query ="searchWord="+encodeURIComponent(searchWord)+"&maxHits="+maxHits;
+ }
+
+ /******** HARD CODED VIEW NAME *********/
+ // do some tests to ensure the results are available
+ if (parent.HelpFrame &&
+ parent.HelpFrame.NavFrame &&
+ parent.HelpFrame.NavFrame.showView &&
+ parent.HelpFrame.NavFrame.ViewsFrame &&
+ parent.HelpFrame.NavFrame.ViewsFrame.search &&
+ parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame)
+ {
+ parent.HelpFrame.NavFrame.showView("search");
+ var searchView = parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame;
+ searchView.location.replace("searchView.jsp?"+query);
+ }
+}
+
+function fixHeights()
+{
+ if (!isIE) return;
+
+ var h = document.getElementById("searchWord").offsetHeight;
+ document.getElementById("go").style.height = h;
+}
+
+function onloadHandler(e)
+{
+ var form = document.forms["searchForm"];
+ form.searchWord.value = '<%=UrlUtil.JavaScriptEncode(data.getSearchWord())%>';
+ fixHeights();
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>" onload="onloadHandler()" onunload="closeAdvanced()">
+
+ <form name="searchForm" onsubmit="doSearch()">
+ <table id="searchTable" align="<%=isRTL?"right":"left"%>" valign="middle" cellspacing="0" cellpadding="0" border="0">
+ <tr nowrap valign="middle">
+ <td <%=isRTL?"nowrap":""%>>
+ <label id="searchLabel" for="searchWord" accesskey="<%=ServletResources.getAccessKey("Search", request)%>">
+ <%=ServletResources.getLabel("Search", request)%>:
+ </label>
+ </td>
+ <td>
+ <input type="text" id="searchWord" name="searchWord" value='' size="20" maxlength="256" alt='<%=ServletResources.getString("SearchExpression", request)%>' title='<%=ServletResources.getString("SearchExpression", request)%>'>
+ </td>
+ <td >
+ <input type="button" onclick="this.blur();doSearch()" value='<%=ServletResources.getString("GO", request)%>' id="go" alt='<%=ServletResources.getString("GO", request)%>' title='<%=ServletResources.getString("GO", request)%>'>
+ <input type="hidden" name="maxHits" value="500" >
+ </td>
+ <td nowrap>
+ <a id="advanced" href="javascript:openAdvanced();" alt='<%=ServletResources.getString("Advanced", request)%>' title='<%=ServletResources.getString("Advanced", request)%>' onmouseover="window.status='<%=ServletResources.getString("Advanced", request)%>'; return true;" onmouseout="window.status='';"><%=ServletResources.getString("Advanced", request)%></a>
+ </td>
+ </tr>
+
+ </table>
+ </form>
+
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchToolbar.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchToolbar.jsp
new file mode 100644
index 0000000..3722637
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchToolbar.jsp
@@ -0,0 +1,31 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+
+<jsp:include page="toolbar.jsp">
+ <jsp:param name="script" value="navActions.js"/>
+ <jsp:param name="view" value="search"/>
+
+ <jsp:param name="name" value="show_all"/>
+ <jsp:param name="tooltip" value='show_all'/>
+ <jsp:param name="image" value="show_all.gif"/>
+ <jsp:param name="action" value="toggleShowAll"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value="<%=(new ActivitiesData(application, request, response)).getButtonState()%>"/>
+
+ <jsp:param name="name" value="synchnav"/>
+ <jsp:param name="tooltip" value='SynchNav'/>
+ <jsp:param name="image" value="synch_nav.gif"/>
+ <jsp:param name="action" value="resynchNav"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value='off'/>
+</jsp:include>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchView.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchView.jsp
new file mode 100644
index 0000000..5ab85b4
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/searchView.jsp
@@ -0,0 +1,164 @@
+<%--
+ Copyright (c) 2000, 2006 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ SearchData data = new SearchData(application, request, response);
+ // After each search we preserve the scope (working set), if any
+ // this need to be at the beginning, otherwise cookie is not written
+ if (data.isSearchRequest())
+ data.saveScope();
+
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Pragma" content="no-cache">
+<meta http-equiv="Expires" content="-1">
+
+<title><%=ServletResources.getString("SearchResults", request)%></title>
+
+<style type="text/css">
+<%@ include file="searchList.css"%>
+</style>
+
+
+<base target="ContentViewFrame">
+<script language="JavaScript" src="list.js"></script>
+<script language="JavaScript">
+
+function refresh()
+{
+ window.location.replace("searchView.jsp?<%=request.getQueryString()%>");
+}
+</script>
+
+
+</head>
+
+<body dir="<%=direction%>">
+
+<%
+if (!data.isSearchRequest()) {
+ out.write(ServletResources.getString("doSearch", request));
+} else if (data.getQueryExceptionMessage()!=null) {
+ out.write(data.getQueryExceptionMessage());
+} else if (data.isProgressRequest()) {
+%>
+
+<CENTER>
+<TABLE BORDER='0'>
+ <TR><TD><%=ServletResources.getString("Indexing", request)%></TD></TR>
+ <TR><TD ALIGN='<%=isRTL?"RIGHT":"LEFT"%>'>
+ <DIV STYLE='width:100px;height:16px;border:1px solid ThreeDShadow;'>
+ <DIV ID='divProgress' STYLE='width:<%=data.getIndexedPercentage()%>px;height:100%;background-color:Highlight'></DIV>
+ </DIV>
+ </TD></TR>
+ <TR><TD><%=data.getIndexedPercentage()%>% <%=ServletResources.getString("complete", request)%></TD></TR>
+ <TR><TD><br><%=ServletResources.getString("IndexingPleaseWait", request)%></TD></TR>
+</TABLE>
+</CENTER>
+<script language='JavaScript'>
+setTimeout('refresh()', 2000);
+</script>
+</body>
+</html>
+
+<%
+ return;
+} else if (data.getResultsCount() == 0){
+ out.write(ServletResources.getString("Nothing_found", request));
+} else {
+%>
+
+<table id='list' cellspacing='0' >
+
+<%
+ for (int topic = 0; topic < data.getResultsCount(); topic++)
+ {
+ if(data.isActivityFiltering() && !data.isEnabled(topic)){
+ continue;
+ }
+%>
+
+<tr class='list' id='r<%=topic%>'>
+ <td class='score' align='<%=isRTL?"left":"right"%>'>
+
+<%
+ boolean isPotentialHit = data.isPotentialHit(topic);
+ if (isPotentialHit) {
+%>
+
+
+ <img src="<%=prefs.getImagesDirectory()%>/d_topic.gif" alt=""/>
+
+<%
+ }
+ else {
+%>
+
+ <img src="<%=prefs.getImagesDirectory()%>/topic.gif" alt=""/>
+
+<%
+ }
+%>
+
+ </td>
+ <td align='<%=isRTL?"right":"left"%>'>
+ <a class='link' id='a<%=topic%>'
+ href="<%=data.getTopicHref(topic)%>"
+ onmouseover="showStatus(event);return true;"
+ onmouseout="clearStatus();return true;"
+ onclick='parent.parent.parent.setContentToolbarTitle(this.title)'
+ title="<%=data.getTopicTocLabel(topic)%>">
+
+<%
+ String label = null;
+ if (isPotentialHit) {
+ label = ServletResources.getString("PotentialHit", data.getTopicLabel(topic), request);
+ }
+ else {
+ label = data.getTopicLabel(topic);
+ }
+%>
+
+ <%=label%></a>
+ </td>
+</tr>
+
+<%
+ String desc = data.getTopicDescription(topic);
+ if (desc!=null) {
+%>
+<tr class='description' id='d<%=topic%>'>
+ <td class='score'>
+ </td>
+ <td align='<%=isRTL?"right":"left"%>' class='label'>
+ <%=desc%>
+ </td>
+<%
+ }
+ }
+%>
+</table>
+
+<%
+}
+%>
+
+<script language="JavaScript">
+ selectTopicById('<%=data.getSelectedTopicId()%>');
+</script>
+
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tabs.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tabs.jsp
new file mode 100644
index 0000000..8592b38
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tabs.jsp
@@ -0,0 +1,296 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ LayoutData data = new LayoutData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+ View[] views = data.getViews();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("Tabs", request)%></title>
+
+<style type="text/css">
+
+
+BODY {
+ margin:0px;
+ padding:0px;
+ background:<%=prefs.getToolbarBackground()%>;
+ height:100%;
+<%
+if (data.isMozilla()){
+%>
+ height:21px;
+<%
+}
+%>
+}
+
+/* tabs at the bottom */
+.tab {
+ font-size:5px;<%-- needed to verticaly center icon image --%>
+ margin:0px;
+ padding:0px;
+ border-top:1px solid ThreeDShadow;
+ border-bottom:1px solid <%=data.isMozilla()?prefs.getToolbarBackground():"ThreeDShadow"%>;
+ cursor:default;
+}
+
+.pressed {
+ font-size:5px;<%-- needed to verticaly center icon image (on IE--%>
+ margin:0px;
+ padding:0px;
+ cursor:default;
+ background-color:<%=prefs.getViewBackground()%>;
+ border-top:1px solid <%=prefs.getViewBackground()%>;
+ border-bottom:1px solid ThreeDShadow;
+}
+
+.separator {
+ height:100%;
+ background-color:ThreeDShadow;
+ border-bottom:1px solid <%=prefs.getToolbarBackground()%>;
+}
+
+.separator_pressed {
+ height:100%;
+ background-color:ThreeDShadow;
+ border-top:1px solid <%=prefs.getViewBackground()%>;
+ border-bottom:1px solid <%=prefs.getToolbarBackground()%>;
+}
+
+A {
+ text-decoration:none;
+ vertical-align:middle;
+ height:16px;
+ width:16px;
+<%
+if (data.isIE()){
+%>
+ writing-mode:tb-rl; <%-- needed to verticaly center icon image on IE--%>
+<%
+} else {
+%>
+ display:block;<%-- needed to verticaly center icon image (remove extra pixels below) on Mozilla--%>
+<%
+}
+%>
+}
+
+IMG {
+ border:0px;
+ margin:0px;
+ padding:0px;
+ height:16px;
+ width:16px;
+}
+
+</style>
+
+<script language="JavaScript">
+
+var isMozilla = navigator.userAgent.indexOf('Mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
+var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+var linksArray = new Array ("linktoc", "linksearch", "linklinks", "linkbookmarks");
+
+if (isMozilla) {
+ document.addEventListener('keydown', keyDownHandler, true);
+}
+else if (isIE){
+ document.onkeydown = keyDownHandler;
+}
+
+/**
+ * Returns the target node of an event
+ */
+function getTarget(e) {
+ var target;
+ if (isMozilla)
+ target = e.target;
+ else if (isIE)
+ target = window.event.srcElement;
+
+ return target;
+}
+
+<%
+for (int i=0; i<views.length; i++) {
+%>
+ var <%=views[i].getName()%> = new Image();
+ <%=views[i].getName()%>.src = "<%=views[i].getOnImage()%>";
+<%
+}
+%>
+
+var lastTab = "";
+/*
+ * Switch tabs.
+ */
+function showTab(tab)
+{
+ if (tab == lastTab)
+ return;
+
+ lastTab = tab;
+
+ // show the appropriate pressed tab
+ var buttons = document.body.getElementsByTagName("TD");
+ for (var i=0; i<buttons.length; i++)
+ {
+ if (buttons[i].id == tab) {
+ buttons[i].className = "pressed";
+ if (i > 0)
+ buttons[i-1].className = "separator_pressed";
+ if (i<buttons.length-1)
+ buttons[i+1].className = "separator_pressed";
+ } else if (buttons[i].className == "pressed") {
+ buttons[i].className = "tab";
+ if (i > 0)
+ if (i > 1 && buttons[i-2].id == tab)
+ buttons[i-1].className = "separator_pressed";
+ else
+ buttons[i-1].className = "separator";
+ if (i<buttons.length-1)
+ if (i<buttons.length-2 && buttons[i+2].id == tab)
+ buttons[i+1].className = "separator_pressed";
+ else
+ buttons[i+1].className = "separator";
+ }
+ }
+}
+
+/**
+ * Handler for key down (arrows)
+ */
+function keyDownHandler(e)
+{
+ var key;
+
+ if (isIE) {
+ key = window.event.keyCode;
+ } else if (isMozilla) {
+ key = e.keyCode;
+ }
+
+ if (key <37 || key > 39)
+ return true;
+
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return true;
+
+ var linkId="";
+ if (clickedNode.tagName == 'A')
+ linkId=clickedNode.id;
+ else if(clickedNode.tagName == 'TD')
+ linkId="link"+clickedNode.id;
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+ if (key == 38 ) { // up arrow
+ if(linkId.length>4){
+ parent.showView(linkId.substring(4, linkId.length));
+ clickedNode.blur();
+ parent.frames.ViewsFrame.focus();
+ }
+ } else if (key == 39) { // Right arrow, expand
+ var nextLink=getNextLink(linkId);
+ if(nextLink!=null){
+ document.getElementById(nextLink).focus();
+ }
+ } else if (key == 37) { // Left arrow,collapse
+ var previousLink=getPreviousLink(linkId);
+ if(previousLink!=null){
+ document.getElementById(previousLink).focus();
+ }
+ }
+
+ return false;
+}
+
+function getNextLink(currentLink){
+ for(i=0; i<linksArray.length; i++){
+ if(currentLink==linksArray[i]){
+ if((i+1)<linksArray.length)
+ return linksArray[i+1];
+ }
+ }
+ return linksArray[0];
+}
+
+function getPreviousLink(currentLink){
+ for(i=0; i<linksArray.length; i++){
+ if(currentLink==linksArray[i]){
+ if(i>0)
+ return linksArray[i-1];
+ }
+ }
+ return linksArray[linksArray.length-1];
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>">
+
+ <table cellspacing="0" cellpadding="0" border="0" width="100%" height="100%" valign="middle">
+ <tr>
+
+<%
+ for (int i=0; i<views.length; i++)
+ {
+ String title = ServletResources.getString(views[i].getName(), request);
+ if (i != 0) {
+%>
+ <td width="1px" class="separator"><div style="width:1px;height:1px;display:block;"></div></td>
+ <%-- div inside separator cell fixes top separator pixel that was not white on IE, or first separator not displayed when frame width happens to be even number of pixels --%>
+<%
+ }
+%>
+ <td title="<%=title%>"
+ align="center"
+ valign="middle"
+ class="tab"
+ id="<%=views[i].getName()%>"
+ onclick="parent.showView('<%=views[i].getName()%>')"
+ onmouseover="window.status='<%=title%>';return true;"
+ onmouseout="window.status='';">
+ <a href='javascript:parent.showView("<%=views[i].getName()%>");'
+ onclick='this.blur();return false;'
+ onmouseover="window.status='<%=title%>';return true;"
+ onmouseout="window.status='';"
+ id="link<%=views[i].getName()%>"
+ <%=views[i].getKey()==View.NO_SHORTCUT?"":"ACCESSKEY=\""+views[i].getKey()+"\""%>>
+ <img alt="<%=title%>"
+ title="<%=title%>"
+ src="<%=views[i].getOnImage()%>"
+ id="img<%=views[i].getName()%>"
+ height="16"
+ >
+ </a>
+ </td>
+<%
+ }
+%>
+
+ </tr>
+ </table>
+
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toc.js b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toc.js
new file mode 100644
index 0000000..c6660ef
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toc.js
@@ -0,0 +1,607 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+// Common scripts for IE and Mozilla.
+
+var isMozilla = navigator.userAgent.indexOf('Mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
+var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+
+var oldActive;
+var oldActiveClass = "";
+
+
+// Preload images
+// **********************************************************
+// Note: code moved into the jsp, for dynamic image preferences
+
+/**
+ * Returns the target node of an event
+ */
+function getTarget(e) {
+ var target;
+ if (isMozilla)
+ target = e.target;
+ else if (isIE)
+ target = window.event.srcElement;
+
+ return target;
+}
+
+/**
+ * Returns the next tree node "down" from current one
+ */
+function getNextDown(node)
+{
+ var a = getAnchorNode(node);
+ if (!a) return null;
+
+ // Try visible child first
+ var li = a.parentNode;
+ var ul = getChildNode(li, "UL");
+ if (ul && ul.className == "expanded")
+ return getDescendantNode(ul, "A");
+
+ // Try next sibling
+ var li_sib = getNextSibling(li);
+ if (li_sib != null)
+ return getDescendantNode(li_sib, "A");
+
+ // Try looking to parent's sibling
+ while(li_sib == null) {
+ var ul = li.parentNode;
+ li = ul.parentNode;
+ if (li.tagName != "LI") // reached the top, nothing else to do
+ return null;
+
+ li_sib = getNextSibling(li);
+ }
+
+ // found the next down sibling
+ return getDescendantNode(li_sib, "A");
+}
+
+/**
+ * Returns the next tree node "down" from current one
+ */
+function getNextUp(node)
+{
+ var a = getAnchorNode(node);
+ if (!a) return null;
+
+ // Get previous sibling first
+ var li = a.parentNode;
+ var li_sib = getPrevSibling(li);
+ if (li_sib != null) {
+ // try to get the deepest node that preceeds this current node
+ var candidate = getDescendantNode(li_sib, "A");
+ var nextDown = getNextDown(candidate);
+ while(nextDown != null && nextDown != node){
+ candidate = nextDown;
+ nextDown = getNextDown(nextDown);
+ }
+ return getDescendantNode(candidate, "A"); ;
+ } else {
+ // get the parent
+ var li = li.parentNode.parentNode;
+ if (li && li.tagName == "LI")
+ return getDescendantNode(li, "A");
+ else
+ return null;
+ }
+}
+
+/**
+ * Returns the next sibling element
+ */
+function getNextSibling(node)
+{
+ var sib = node.nextSibling;
+ while (sib && (sib.nodeType == 3 || sib.tagName=="SCRIPT")) // text or script node
+ sib = sib.nextSibling;
+ return sib;
+}
+
+/**
+ * Returns the next sibling element
+ */
+function getPrevSibling(node)
+{
+ var sib = node.previousSibling;
+ while (sib && (sib.nodeType == 3 || sib.tagName=="SCRIPT")) // text or script node
+ sib = sib.previousSibling;
+ return sib;
+}
+
+
+/**
+ * Returns the child node with specified tag
+ */
+function getChildNode(parent, childTag)
+{
+ var list = parent.childNodes;
+ if (list == null) return null;
+ for (var i=0; i<list.length; i++)
+ if (list.item(i).tagName == childTag)
+ return list.item(i);
+ return null;
+}
+
+/**
+ * Returns the descendat node with specified tag (depth-first searches)
+ */
+function getDescendantNode(parent, childTag)
+{
+ if (parent == null) return null;
+
+ if (parent.tagName == childTag)
+ return parent;
+
+ var list = parent.childNodes;
+ if (list == null) return null;
+ for (var i=0; i<list.length; i++) {
+ var child = list.item(i);
+ if(child.tagName == childTag)
+ return child;
+
+ child = getDescendantNode(child, childTag);
+ if (child != null)
+ return child;
+ }
+ return null;
+}
+
+
+/**
+ * Returns the anchor of this click
+ * NOTE: MOZILLA BUG WITH A:focus and A:active styles
+ */
+function getAnchorNode(node) {
+ if (node == null) return null;
+
+ if (node.nodeType == 3) //"Node.TEXT_NODE")
+ return node.parentNode;
+ else if (node.tagName == "A")
+ return node;
+ else if (node.tagName == "IMG")
+ return getChildNode(node.parentNode, "A");
+ return null;
+}
+
+/**
+ * Returns the plus/minus icon for this tree node
+ */
+function getPlusMinus(node)
+{
+ if (isPlusMinus(node))
+ return node;
+ else if (node.nodeType == 3) //"Node.TEXT_NODE")
+ return getChildNode(node.parentNode.parentNode, "IMG");
+ else if (node.tagName == "IMG")
+ return getChildNode(node.parentNode.parentNode, "IMG");
+ else if (node.tagName == "A")
+ return getChildNode(node.parentNode, "IMG");
+
+ return null;
+}
+
+
+/**
+ * Returns true when the node is the plus or minus icon
+ */
+function isPlusMinus(node)
+{
+ return (node.nodeType != 3 && node.tagName == "IMG" && (node.className == "expanded" || node.className == "collapsed"));
+}
+
+/**
+ * Collapses a tree rooted at the specified element
+ */
+function collapse(node) {
+ node.className = "collapsed";
+ node.src = plus.src;
+ node.alt = altTopicClosed;
+ // set the UL as well
+ var ul = getChildNode(node.parentNode, "UL");
+ if (ul != null) ul.className = "collapsed";
+}
+
+/**
+ * Expands a tree rooted at the specified element
+ */
+function expand(node) {
+ node.className = "expanded";
+ node.src = minus.src;
+ node.alt = altTopicOpen;
+ // set the UL as well
+ var ul = getChildNode(node.parentNode, "UL");
+ if (ul != null){
+ ul.className = "expanded";
+ if (ul.id.length > 0){
+ if (!frames.dynLoadFrame) {
+ return;
+ }
+ var ix = window.location.href.indexOf('?');
+ if (ix < 0) {
+ return;
+ }
+ var query = window.location.href.substr(ix);
+ frames.dynLoadFrame.location = "tocFragment.jsp" + query + "&path=" + ul.id;
+ }
+ }
+}
+
+/**
+ * Expands the nodes from root to the specified node
+ */
+function expandPathTo(node, inclusive)
+{
+ // when the node is a link, get the plus/minus image
+ if (node.tagName == "A")
+ {
+ var img = getChildNode(node.parentNode, "IMG")
+ if (img == null) return;
+ expandPathTo(img, inclusive);
+ return;
+ }
+
+ if (inclusive && isCollapsed(node))
+ expand(node);
+
+ var li = node.parentNode;
+ if (li == null) return;
+ var ul = li.parentNode;
+ if (ul == null) return;
+ li = ul.parentNode;
+ if (li == null) return;
+ var img = getChildNode(li, "IMG");
+ if (img == null) return;
+
+ expandPathTo(img, true);
+}
+
+/**
+ * Returns true when this is an expanded tree node
+ */
+function isExpanded(node) {
+ return node.className == "expanded";
+}
+
+/**
+ * Returns true when this is a collapsed tree node
+ */
+function isCollapsed(node) {
+ return node.className == "collapsed";
+}
+
+/**
+ * Highlights link
+ */
+function highlightTopic(topic)
+{
+ if (isMozilla)
+ window.getSelection().removeAllRanges();
+
+ var a = getAnchorNode(topic);
+ if (a != null)
+ {
+ parent.parent.parent.setContentToolbarTitle(tocTitle);
+ if (oldActive)
+ oldActive.className = oldActiveClass;
+
+ oldActive = a;
+ oldActiveClass = a.className;
+ a.className = "active";
+ // it looks like the onclick event is not handled in mozilla
+ // *** TO DO: handle failed synchronization, do not select in that case
+ if (isMozilla && a.onclick)
+ a.onclick()
+ //if (isIE)
+ // a.hideFocus = "true";
+ }
+}
+
+/**
+ * Selects a topic in the tree: expand tree and highlight it
+ * returns true if success
+ */
+function selectTopic(topic)
+{
+ if (!topic)
+ return false;
+
+ // remove the query, if any
+ var i = topic.indexOf('?');
+ if (i != -1)
+ topic = topic.substring(0, i);
+
+ var links = document.getElementsByTagName("a");
+
+ for (var i=0; i<links.length; i++)
+ {
+ if (topic == links[i].href)
+ {
+ expandPathTo(links[i], false);
+ highlightTopic(links[i]);
+ scrollIntoView(links[i]);
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Selects a topic in the tree: expand tree and highlight it
+ * returns true if success
+ */
+function selectTopicById(id)
+{
+ var topic = document.getElementById(id);
+ if (topic)
+ {
+ expandPathTo(topic, false);
+ highlightTopic(topic);
+ scrollIntoView(topic);
+ return true;
+ }
+ return false;
+}
+
+/**
+ * Scrolls the page to show the specified element
+ */
+function scrollIntoView(node)
+{
+ var scroll = getVerticalScroll(node);
+ if (scroll != 0)
+ window.scrollBy(0, scroll);
+}
+
+/**
+ * Scrolls the page to show the specified element
+ */
+function getVerticalScroll(node)
+{
+ var nodeTop = node.offsetTop;
+ var nodeBottom = nodeTop + node.offsetHeight;
+ var pageTop = 0;
+ var pageBottom = 0;
+
+ if (isIE)
+ {
+ pageTop = document.body.scrollTop;
+ pageBottom = pageTop + document.body.clientHeight;
+
+ }
+ else if (isMozilla)
+ {
+ pageTop = window.pageYOffset;
+ pageBottom = pageTop + window.innerHeight - node.offsetHeight;
+ }
+
+ var scroll = 0;
+ if (nodeTop >= pageTop )
+ {
+ if (nodeBottom <= pageBottom)
+ scroll = 0; // already in view
+ else
+ scroll = nodeBottom - pageBottom;
+ }
+ else
+ {
+ scroll = nodeTop - pageTop;
+ }
+
+ return scroll;
+}
+
+/*
+ * Currently called on IE only
+ */
+function focusHandler(e)
+{
+ /*if (isMozilla)
+ return;
+ */
+
+ try{
+ if (oldActive){
+ // only focus when the element is visible
+ var scroll = getVerticalScroll(oldActive);
+ if (scroll == 0)
+ oldActive.focus();
+ }
+ }
+ catch(e){}
+}
+
+
+/**
+ * display topic label in the status line on mouse over topic
+ */
+function mouseMoveHandler(e) {
+ var overNode = getTarget(e);
+ if (!overNode) return;
+
+ overNode = getAnchorNode(overNode);
+ if (overNode == null){
+ window.status = "";
+ return;
+ }
+
+ if (isMozilla)
+ e.cancelBubble = false;
+
+ if (overNode.title == "") {
+ if (overNode.innerText)
+ overNode.title = overNode.innerText;
+ else if (overNode.text)
+ overNode.title = overNode.text;
+ }
+ window.status = overNode.title;
+}
+
+/**
+ * handler for expanding / collapsing topic tree
+ */
+function mouseClickHandler(e) {
+
+ var clickedNode = getTarget(e);
+
+ if (isPlusMinus(clickedNode) )
+ {
+ if (isCollapsed(clickedNode))
+ expand(clickedNode);
+ else if (isExpanded(clickedNode))
+ collapse(clickedNode);
+ }
+ else
+ {
+ var plus_minus = getPlusMinus(clickedNode);
+ if (plus_minus != null)
+ highlightTopic(plus_minus);
+ }
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+}
+
+/**
+ * handler for expanding / collapsing topic tree
+ */
+function mouseDblClickHandler(e) {
+
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ var plus_minus = getPlusMinus(clickedNode);
+ if (plus_minus != null)
+ {
+ if (isCollapsed(plus_minus))
+ expand(plus_minus);
+ else if (isExpanded(plus_minus))
+ collapse(plus_minus);
+
+ highlightTopic(plus_minus);
+ }
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+}
+
+/**
+ * Handler for key down (arrows)
+ */
+function keyDownHandler(e)
+{
+ var key;
+
+ if (isIE) {
+ key = window.event.keyCode;
+ } else if (isMozilla) {
+ key = e.keyCode;
+ }
+
+ if (key <37 || key > 40)
+ return true;
+
+ if (isMozilla)
+ e.cancelBubble = true;
+ else if (isIE)
+ window.event.cancelBubble = true;
+
+ if (key == 39) { // Right arrow, expand
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+ if (isIE){
+ if(clickedNode.id!=null){
+ if(clickedNode.id.charAt(0)=='b'){
+ if(clickedNode.name!="opened"){
+ loadTOC(clickedNode.name);
+ return true;
+ }
+ }
+ }
+ }
+
+ var plus_minus = getPlusMinus(clickedNode);
+ if (plus_minus != null)
+ {
+ if (isCollapsed(plus_minus))
+ expand(plus_minus);
+
+ highlightTopic(plus_minus);
+ scrollIntoView(clickedNode);
+ }
+ } else if (key == 37) { // Left arrow,collapse
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ if(clickedNode.id!=null){
+ if(clickedNode.id.charAt(0)=='b'){
+ if(clickedNode.name=="opened"){
+ loadTOC(" ");
+ return true;
+ }
+ else{
+ return true;
+ }
+ }
+
+ }
+
+ var plus_minus = getPlusMinus(clickedNode);
+ if (plus_minus != null)
+ {
+ if (isExpanded(plus_minus))
+ collapse(plus_minus);
+
+ highlightTopic(plus_minus);
+ scrollIntoView(clickedNode);
+ }
+ } else if (key == 40 ) { // down arrow
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ var next = getNextDown(clickedNode);
+ if (next)
+ next.focus();
+
+ } else if (key == 38 ) { // up arrow
+ var clickedNode = getTarget(e);
+ if (!clickedNode) return;
+
+ var next = getNextUp(clickedNode);
+ if (next)
+ next.focus();
+ }
+
+
+ return true;
+}
+
+if (isMozilla) {
+ document.addEventListener('click', mouseClickHandler, true);
+ document.addEventListener('dblclick', mouseDblClickHandler, true);
+ document.addEventListener('mousemove', mouseMoveHandler, true);
+ document.addEventListener('keydown', keyDownHandler, true);
+}
+else if (isIE){
+ document.onclick = mouseClickHandler;
+ document.ondblclick = mouseDblClickHandler;
+ document.onmousemove = mouseMoveHandler;
+ document.onkeydown = keyDownHandler;
+ //window.onfocus = focusHandler;
+}
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocFragment.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocFragment.jsp
new file mode 100644
index 0000000..fe38db0
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocFragment.jsp
@@ -0,0 +1,54 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+<%
+ TocData data = new TocData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title><%=ServletResources.getString("partialContent", request)%></title>
+<script language="JavaScript">
+plus = new Image();
+plus.src = "<%=prefs.getImagesDirectory()%>"+"/plus.gif";
+folder_img = new Image();
+folder_img.src = "<%=prefs.getImagesDirectory()%>"+"/container_obj.gif";
+topic_img = new Image();
+topic_img.src = "<%=prefs.getImagesDirectory()%>"+"/topic.gif";
+
+function onloadHandler()
+{
+ var fragment = null;
+ for (var i=0; i < document.body.childNodes.length; i++)
+ if (document.body.childNodes[i].nodeName == "UL"){
+ fragment = document.body.childNodes[i];
+ break;
+ }
+ if(fragment == null) return;
+ var path = fragment.id;
+ var oldFragment = window.parent.document.getElementById(path);
+ oldFragment.innerHTML = fragment.innerHTML;
+ oldFragment.id = "";
+}
+</script>
+</head>
+<body dir="<%=direction%>" onload="onloadHandler()">
+<%
+ int toc=data.getSelectedToc();
+ // Only generate the selected toc
+ if (toc != -1 && data.getTocHref(data.getSelectedToc()).equals(data.getTocHref(toc)))
+ {
+ data.generateToc(toc, out);
+ }
+%>
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocToolbar.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocToolbar.jsp
new file mode 100644
index 0000000..8ff6f53
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocToolbar.jsp
@@ -0,0 +1,30 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<jsp:include page="toolbar.jsp">
+ <jsp:param name="script" value="navActions.js"/>
+ <jsp:param name="view" value="toc"/>
+
+ <jsp:param name="name" value="show_all"/>
+ <jsp:param name="tooltip" value='show_all'/>
+ <jsp:param name="image" value="show_all.gif"/>
+ <jsp:param name="action" value="toggleShowAll"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value="<%=(new ActivitiesData(application, request, response)).getButtonState()%>"/>
+
+ <jsp:param name="name" value="synchnav"/>
+ <jsp:param name="tooltip" value='SynchNav'/>
+ <jsp:param name="image" value="synch_nav.gif"/>
+ <jsp:param name="action" value="resynchNav"/>
+ <jsp:param name="param" value=""/>
+ <jsp:param name="state" value="off"/>
+</jsp:include>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocView.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocView.jsp
new file mode 100644
index 0000000..4676b03
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tocView.jsp
@@ -0,0 +1,218 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ TocData data = new TocData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("Content", request)%></title>
+
+<style type="text/css">
+<%@ include file="tree.css"%>
+</style>
+
+<base target="ContentViewFrame">
+<script language="JavaScript">
+
+// Preload images
+minus = new Image();
+minus.src = "<%=prefs.getImagesDirectory()%>"+"/minus.gif";
+plus = new Image();
+plus.src = "<%=prefs.getImagesDirectory()%>"+"/plus.gif";
+toc_open_img = new Image();
+toc_open_img.src = "<%=prefs.getImagesDirectory()%>"+"/toc_open.gif";
+toc_closed_img = new Image();
+toc_closed_img.src = "<%=prefs.getImagesDirectory()%>"+"/toc_closed.gif";
+folder_img = new Image();
+folder_img.src = "<%=prefs.getImagesDirectory()%>"+"/container_obj.gif";
+topic_img = new Image();
+topic_img.src = "<%=prefs.getImagesDirectory()%>"+"/topic.gif";
+altTopicClosed = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("topicClosed", request))%>";
+altTopicOpen = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("topicOpen", request))%>";
+</script>
+
+<script language="JavaScript" src="toc.js"></script>
+<script language="JavaScript">
+
+/**
+ * Loads the specified table of contents
+ */
+function loadTOC(tocHref)
+{
+ // navigate to this toc, if not already loaded
+ if (window.location.href.indexOf("tocView.jsp?toc="+tocHref) != -1)
+ return;
+ window.location.replace("tocView.jsp?toc="+tocHref);
+}
+
+var tocTitle = "";
+var tocId = "";
+
+function onloadHandler()
+{
+<%
+ if (data.getSelectedToc() != -1)
+ {
+%>
+ tocTitle = '<%=UrlUtil.JavaScriptEncode(data.getTocLabel(data.getSelectedToc()))%>';
+ var tocTopic = "<%=data.getTocDescriptionTopic(data.getSelectedToc())%>";
+
+ // set title on the content toolbar
+ parent.parent.parent.setContentToolbarTitle(tocTitle);
+
+ var topicSelected=false;
+ // select specified topic, or else the book
+ var topic = "<%=data.getSelectedTopic()%>";
+ if (topic != "about:blank" && topic != tocTopic) {
+ if (topic.indexOf(window.location.protocol) != 0 && topic.length > 2) {
+ // remove the .. from topic
+ topic = topic.substring(2);
+ // remove advanced/tocView.jsp from path to obtain contextPath
+ var contextPath = window.location.pathname;
+ var slash = contextPath.lastIndexOf('/');
+ if(slash > 0) {
+ slash = contextPath.lastIndexOf('/', slash-1);
+ if(slash >= 0) {
+ contextPath = contextPath.substr(0, slash);
+ topic = window.location.protocol + "//" +window.location.host + contextPath + topic;
+ }
+ }
+ }
+ topicSelected = selectTopic(topic);
+ } else {
+ topicSelected = selectTopicById(tocId);
+ }
+<%
+ // if topic failed to be selected, but we know it exist in some book,
+ // offer to turn on "show all"
+
+ // do not offer to show all just after it was manually turned off
+ if (null==request.getParameter("showAll")) {
+%>
+ if(!topicSelected){
+ if(parent.parent.activityFiltering){
+ askShowAll();
+ }
+ }
+<%
+ }
+%>
+<%
+ } else if ("yes".equals(request.getParameter("synch"))) {
+%>
+ var message='<%=UrlUtil.JavaScriptEncode(ServletResources.getString("CannotSync", request))%>';
+ // when we don't find the specified toc, we just restore navigation
+ parent.parent.parent.restoreNavigation(message);
+<%
+ }
+%>
+ focusHandler("e");
+}
+
+var askShowAllDialog;
+var w = 470;
+var h = 270;
+
+function askShowAll(){
+<%
+if (data.isIE()){
+%>
+ var l = top.screenLeft + (top.document.body.clientWidth - w) / 2;
+ var t = top.screenTop + (top.document.body.clientHeight - h) / 2;
+<%
+} else {
+%>
+ var l = top.screenX + (top.innerWidth - w) / 2;
+ var t = top.screenY + (top.innerHeight - h) / 2;
+<%
+}
+%>
+ // move the dialog just a bit higher than the middle
+ if (t-50 > 0) t = t-50;
+
+ window.location="javascript://needModal";
+ askShowAllDialog = window.open("askShowAll.jsp", "askShowAllDialog", "resizeable=no,height="+h+",width="+w+",left="+l+",top="+t );
+ askShowAllDialog.focus();
+}
+
+function yesShowAll(){
+ window.parent.parent.showAll();
+}
+
+function closeAskShowAllDialog(){
+ try {
+ if (askShowAllDialog){
+ askShowAllDialog.close();
+ }
+ }
+ catch(e) {}
+}
+
+function onunloadHandler() {
+ closeAskShowAllDialog();
+<%
+// for large books, we want to avoid a long unload time
+if (data.isIE()){
+%>
+ document.body.innerHTML = "";
+<%
+}
+%>
+}
+
+</script>
+</head>
+
+
+<body dir="<%=direction%>" onload="onloadHandler()" onunload="onunloadHandler()">
+ <ul dir="<%=direction%>" class='expanded' id='root'>
+<%
+ for (int toc=0; toc<data.getTocCount(); toc++) {
+ boolean isSelected =data.getSelectedToc() != -1 &&
+ data.getTocHref(data.getSelectedToc()).equals(data.getTocHref(toc));
+ if(!data.isEnabled(toc)){
+ // do not show
+ continue;
+ }
+ if(isSelected) {
+%>
+ <li>
+ <img src="<%=prefs.getImagesDirectory()%>/toc_open.gif" alt="<%=ServletResources.getString("bookOpen", request)%>"><a id="b<%=toc%>" name="opened" style="font-weight: bold;" href="<%=data.getTocDescriptionTopic(toc)%>" onclick=''><%=data.getTocLabel(toc)%></a>
+<%
+ // Only generate the selected toc
+ data.generateToc(toc, out);
+ // keep track of the selected toc id
+%>
+ <script language="JavaScript">tocId="b"+<%=toc%></script>
+<%
+ } else {
+%>
+ <li>
+ <img src="<%=prefs.getImagesDirectory()%>/toc_closed.gif" alt="<%=ServletResources.getString("bookClosed", request)%>"><a id="b<%=toc%>" name="<%=data.getTocHref(toc)%>" style="font-weight: bold;" href="<%=data.getTocDescriptionTopic(toc)%>" onclick='loadTOC("<%=data.getTocHref(toc)%>")'><%=data.getTocLabel(toc)%></a>
+<%
+ }
+%>
+ </li>
+<%
+ }
+%>
+ </ul>
+ <iframe name="dynLoadFrame" title="<%=ServletResources.getString("ignore", "dynLoadFrame", request)%>" style="visibility:hidden" tabindex="-1" frameborder="no" width="0" height="0" scrolling="no">
+ </iframe>
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toolbar.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toolbar.jsp
new file mode 100644
index 0000000..2eecd9d
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/toolbar.jsp
@@ -0,0 +1,328 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ ToolbarData data = new ToolbarData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("Toolbar", request)%></title>
+
+<style type="text/css">
+
+/* need this one for Mozilla */
+HTML {
+ margin:0px;
+ padding:0px;
+}
+
+BODY {
+ background:<%=prefs.getToolbarBackground()%>;
+}
+
+#titleText {
+ font-weight:bold;
+ color:WindowText;
+}
+
+.buttonOn a {
+ display:block;
+ margin-left:2px;
+ margin-right:2px;
+ width:<%=data.isMozilla()?18:20%>px;
+ height:<%=data.isMozilla()?18:20%>px;
+ border:1px solid Highlight;
+ writing-mode:tb-rl;
+ vertical-align:middle;
+ background: <%=prefs.getViewBackground()%>;
+}
+
+.button a {
+ display:block;
+ margin-left:2px;
+ margin-right:2px;
+ width:<%=data.isMozilla()?18:20%>px;
+ height:<%=data.isMozilla()?18:20%>px;
+ border:1px solid <%=prefs.getToolbarBackground()%>;
+ writing-mode:tb-rl;
+ vertical-align:middle;
+}
+
+.button a:hover {
+ border-top:1px solid ButtonHighlight;
+ border-<%=isRTL?"right":"left"%>:1px solid ButtonHighlight;
+ border-<%=isRTL?"left":"right"%>:1px solid ButtonShadow;
+ border-bottom:1px solid ButtonShadow;
+}
+
+<% if (data.isIE() || data.isMozilla() && "1.2.1".compareTo(data.getMozillaVersion()) <=0){
+// maximize (last) button should not jump
+%>
+#b<%=data.getButtons().length-1%>:hover{
+ border:1px solid <%=prefs.getToolbarBackground()%>;
+}
+<%}%>
+
+.separator {
+ background-color: ThreeDShadow;
+ height:100%;
+ width: 1px;
+ border-top:2px solid <%=prefs.getToolbarBackground()%>;
+ border-bottom:2px solid <%=prefs.getToolbarBackground()%>;
+ border-left:3px solid <%=prefs.getToolbarBackground()%>;
+ border-right:3px solid <%=prefs.getToolbarBackground()%>;
+
+}
+
+#container {
+ border-bottom:1px solid ThreeDShadow;
+<%
+if (data.isIE()) {
+%>
+<%
+}else if (data.isMozilla()){
+%>
+ border-top:1px solid ThreeDShadow;
+ height:24px;
+<%
+}
+%>
+}
+
+<%
+// workaround for adding right border on mozilla (ugly..)
+if (data.isMozilla() && "content".equals(request.getParameter("toolbar"))) {
+%>
+
+/* need this one for Mozilla */
+HTML {
+ margin:0px;
+ padding:0px;
+}
+<%
+}
+%>
+
+</style>
+
+<script language="JavaScript">
+
+var bRestore = false;
+// Preload images
+<%
+ToolbarButton[] buttons = data.getButtons();
+for (int i=0; i<buttons.length; i++) {
+ if (!buttons[i].isSeparator()) {
+%>
+ var <%=buttons[i].getName()%> = new Image();
+ <%=buttons[i].getName()%>.src = "<%=buttons[i].getOnImage()%>";
+<%
+ }
+}
+%>
+
+function setTitle(label)
+{
+ if( label == null) label = "";
+ var title = document.getElementById("titleText");
+ if (title == null) return;
+ var text = title.lastChild;
+ if (text == null) return;
+ text.nodeValue = label;
+}
+
+<% if (data.isIE()
+ || data.isMozilla() && "1.2.1".compareTo(data.getMozillaVersion()) <=0
+ || (data.isSafari() && "120".compareTo(data.getSafariVersion()) <= 0) ){
+%>
+function registerMaximizedChangedListener(){
+ // get to the frameset
+ var p = parent;
+ while (p && !p.registerMaximizeListener)
+ p = p.parent;
+
+ if (p!= null){
+ p.registerMaximizeListener('<%=data.getName()%>Toolbar', maximizedChanged);
+ }
+}
+registerMaximizedChangedListener();
+
+/**
+ * Handler for double click: maximize/restore this view
+ * Note: Mozilla browsers prior to 1.2.1 do not support programmatic frame resizing well.
+ */
+function mouseDblClickHandler(e) {
+ // ignore double click on buttons
+ var target=<%=data.isIE()?"window.event.srcElement":"e.target"%>;
+ if (target.tagName && (target.tagName == "A" || target.tagName == "IMG"))
+ return;
+ toggleFrame();
+ return false;
+}
+function restore_maximize(button)
+{
+ toggleFrame();
+ if (isIE && button && document.getElementById(button)){
+ document.getElementById(button).blur();
+ }
+}
+function toggleFrame(){
+ // get to the frameset
+ var p = parent;
+ while (p && !p.toggleFrame)
+ p = p.parent;
+
+ if (p!= null){
+ p.toggleFrame('<%=data.getTitle()%>');
+ }
+ document.selection.clear;
+}
+
+function maximizedChanged(maximizedNotRestored){
+ if(maximizedNotRestored){
+ document.getElementById("maximize_restore").src="<%=data.getRestoreImage()%>";
+ document.getElementById("maximize_restore").setAttribute("title", "<%=data.getRestoreTooltip()%>");
+ document.getElementById("maximize_restore").setAttribute("alt", "<%=data.getRestoreTooltip()%>");
+ bRestore = true;
+ }else{
+ document.getElementById("maximize_restore").src="<%=data.getMaximizeImage()%>";
+ document.getElementById("maximize_restore").setAttribute("title", "<%=data.getMaximizeTooltip()%>");
+ document.getElementById("maximize_restore").setAttribute("alt", "<%=data.getMaximizeTooltip()%>");
+ bRestore = false;
+ }
+}
+
+<%=( data.isIE() || data.isSafari() )?
+ "document.ondblclick = mouseDblClickHandler;"
+:
+ "document.addEventListener('dblclick', mouseDblClickHandler, true);"%>
+<%}%>
+
+function setButtonState(buttonName, pressed) {
+ if(!document.getElementById("tdb_"+buttonName))
+ return;
+ if(pressed){
+ document.getElementById("tdb_"+buttonName).className="buttonOn";
+ }else{
+ document.getElementById("tdb_"+buttonName).className="button";
+ }
+}
+
+function setWindowStatus(buttonName){
+ <%
+ for (int i=0; i<buttons.length; i++) {
+ String name = buttons[i].getName();%>
+ if (buttonName == "<%=name%>"){
+ if (buttonName == "maximize_restore"){
+ if (bRestore){
+ window.status = "<%=data.getRestoreTooltip()%>";
+ }else{
+ window.status = "<%=data.getMaximizeTooltip()%>";
+ }
+ }else{
+ window.status = "<%=buttons[i].getTooltip()%>";
+ }
+ }
+ <%
+ }
+ %>
+}
+</script>
+
+<%
+if (data.getScript() != null) {
+%>
+<script language="JavaScript" src="<%=data.getScript()%>"></script>
+<%
+}
+%>
+
+</head>
+
+<%
+if(buttons.length > 0){
+%>
+ <body dir="<%=direction%>">
+<%
+}else{
+%>
+ <body dir="<%=direction%>" tabIndex="-1">
+<%
+}
+%>
+
+<table id="container" width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" style='padding-<%=isRTL?"right":"left"%>:<%=data.isIE()?"5px":"8px"%>;'>
+
+ <tr>
+ <td nowrap style="font: <%=prefs.getToolbarFont()%>" valign="middle">
+ <div id="titleTextTableDiv" style="overflow:hidden; height:22px;"><table><tr><td nowrap style="font:<%=prefs.getToolbarFont()%>"><div id="titleText" > <%=data.getTitle()%></div></td></tr></table>
+ </div>
+
+
+ <div style="position:absolute; top:1px; <%=isRTL?"left":"right"%>:0px;">
+ <table width="100%" border="0" cellspacing="1" cellpadding="0" height="100%">
+ <tr>
+ <td align="<%=isRTL?"left":"right"%>">
+ <table align="<%=isRTL?"left":"right"%>" border="0" cellspacing="0" cellpadding="0" height="100%" style="background:<%=prefs.getToolbarBackground()%>">
+ <tr>
+<%
+ for (int i=0; i<buttons.length; i++) {
+ if (buttons[i].isSeparator()) {
+%>
+ <td align="middle" class="separator" valign="middle">
+ </td>
+<%
+ } else {
+%>
+ <td align="middle" id="tdb_<%=buttons[i].getName()%>" class="<%=buttons[i].isOn()?"buttonOn":"button"%>" height=18>
+ <a href="javascript:<%=buttons[i].getAction()%>('b<%=i%>', '<%=buttons[i].getParam()%>');"
+ onmouseover="javascript:setWindowStatus('<%=buttons[i].getName()%>');return true;"
+ onmouseout="window.status='';"
+ id="b<%=i%>">
+ <img src="<%=buttons[i].getOnImage()%>"
+ alt='<%=buttons[i].getTooltip()%>'
+ title='<%=buttons[i].getTooltip()%>'
+ border="0"
+ id="<%=buttons[i].getName()%>">
+ </a>
+ </td>
+<%
+ }
+ }
+%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+</table>
+
+<%// special case for content toolbar - internally used live help frame
+if ("content".equals(request.getParameter("toolbar"))) {
+%>
+ <iframe name="liveHelpFrame" title="<%=ServletResources.getString("ignore", "liveHelpFrame", request)%>" style="visibility:hidden" tabindex="-1" frameborder="no" width="0" height="0" scrolling="no">
+ </iframe>
+<%
+}
+%>
+
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tree.css b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tree.css
new file mode 100644
index 0000000..7d48c4d
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/tree.css
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+BODY {
+ background-color: <%=prefs.getViewBackground()%>;
+ font: <%=prefs.getViewFont()%>;
+ margin:0;
+ padding:0;
+ border:0;
+}
+
+UL {
+ border-width:0;
+ margin-<%=isRTL?"right":"left"%>:20px;
+}
+
+#root {
+ margin-top:5px;
+ margin-<%=isRTL?"right":"left"%>:5px;
+}
+
+UL.expanded {
+ display:block;
+}
+
+UL.collapsed {
+ display: none;
+}
+
+LI {
+ margin-top:3px;
+ list-style-image:none;
+ list-style-type:none;
+ white-space: nowrap;
+}
+
+IMG {
+ border:0px;
+ margin:0px;
+ padding:0px;
+ margin-<%=isRTL?"left":"right"%>:4px;
+}
+
+
+A {
+ text-decoration:none;
+ color:WindowText;
+ padding-<%=isRTL?"left":"right"%>:2px;
+ /* this works in ie5.5, but not in ie5.0 */
+ white-space: nowrap;
+}
+
+A:hover{
+ text-decoration:underline;
+}
+
+A.active{
+ background:Highlight;
+ color:HighlightText;
+ width:100%;
+}
+
+A.active:hover{
+ text-decoration:underline;
+ background:Highlight;
+ color:HighlightText;
+ width:100%;
+}
+
+<%
+if (data.isMozilla()){
+%>
+UL {
+ margin-<%=isRTL?"right":"left"%>:-20px;
+}
+#root{
+ margin-<%=isRTL?"right":"left"%>:-35px;
+ margin-top:5px;
+}
+
+<%
+}
+%>
+
+.h {
+ visibility:hidden;
+}
+
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/view.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/view.jsp
new file mode 100644
index 0000000..fc842d1
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/view.jsp
@@ -0,0 +1,49 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="fheader.jsp"%>
+
+<%
+ new ActivitiesData(application, request, response); // here it can turn filtering on or off
+ LayoutData data = new LayoutData(application,request, response);
+ View view = data.getCurrentView();
+ if (view == null) return;
+%>
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title><%=ServletResources.getString(view.getName(), request)%></title>
+
+<script language="JavaScript">
+
+function onloadHandler(e)
+{
+<% if (data.isIE() || data.isMozilla() && "1.2.1".compareTo(data.getMozillaVersion()) <=0){
+%> var h=window.<%=view.getName()%>ToolbarFrame.document.getElementById("titleText").offsetHeight; <%-- default 13 --%>
+ if(h<=19){
+ return; <%-- no need to resize up to 19px --%>
+ }
+ document.getElementById("viewFrameset").setAttribute("rows", (11+h)+",*"); <%-- default 24 --%>
+ window.<%=view.getName()%>ToolbarFrame.document.getElementById("titleTextTableDiv").style.height=(9+h)+"px"; <%-- default 22 --%>
+<%}%>
+}
+</script>
+
+</head>
+
+<frameset id="viewFrameset" onload="onloadHandler()" rows="24,*" frameborder="0" framespacing="0" border=0 >
+ <frame id="toolbar" name="<%=view.getName()%>ToolbarFrame" title="<%=ServletResources.getString(view.getName()+"ViewToolbar", request)%>" src='<%=view.getURL()+view.getName()+"Toolbar.jsp"%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
+ <frame name='<%=view.getName()%>ViewFrame' title="<%=ServletResources.getString(view.getName()+"View", request)%>" src='<%=view.getURL()+view.getName()+"View.jsp?"+request.getQueryString()%>' marginwidth="10" marginheight="0" frameborder="0" >
+</frameset>
+
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/views.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/views.jsp
new file mode 100644
index 0000000..f9c3b17
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/views.jsp
@@ -0,0 +1,221 @@
+<%--
+ Copyright (c) 2000, 2006 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ LayoutData data = new LayoutData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+ View[] views = data.getViews();
+%>
+
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+
+<title><%=ServletResources.getString("Views", request)%></title>
+
+<style type="text/css">
+
+/* need this one for Mozilla */
+HTML {
+ width:100%;
+ height:100%;
+ margin:0px;
+ padding:0px;
+ border:0px;
+ }
+
+BODY {
+ margin:0px;
+ padding:0px;
+ /* Mozilla does not like width:100%, so we set height only */
+ height:100%;
+}
+
+IFRAME {
+ width:100%;
+ height:100%;
+}
+
+.hidden {
+ visibility:hidden;
+ width:0;
+ height:0;
+}
+
+.visible {
+ visibility:visible;
+ width:100%;
+ height:100%;
+}
+
+</style>
+
+<script language="Javascript">
+
+var lastView = "";
+/**
+ * Switches to specified view
+ */
+function showView(view)
+{
+ if (view == lastView)
+ return;
+
+ lastView = view;
+
+ // show appropriate frame
+ var iframes = parent.ViewsFrame.document.body.getElementsByTagName("IFRAME");
+ for (var i=0; i<iframes.length; i++)
+ {
+ if (iframes[i].id != view){
+ iframes[i].className = "hidden";
+ iframes[i].style.visibility="hidden";
+ }else{
+ iframes[i].className = "visible";
+ iframes[i].style.visibility="visible";
+ }
+ }
+}
+
+var activityFiltering = <%=(new ActivitiesData(application, request, response)).isActivityFiltering()?"true":"false"%>;
+var displayShowAllConfirmation = <%=prefs.isDontConfirmShowAll()?"false":"true"%>;
+var regExp=/&(showAll|synch)=(on|off|yes|no)/gi;
+function toggleShowAll(){
+ if(activityFiltering){
+ if( displayShowAllConfirmation ){
+ confirmShowAll();
+ }else{
+ showAll();
+ }
+ } else {
+ dontShowAll();
+ }
+}
+
+function dontAskAgain(){
+ displayShowAllConfirmation = false;
+}
+function showAll(){
+ var displayConfirmParam;
+ if(displayShowAllConfirmation){
+ displayConfirmParam="";
+ }else{
+ displayConfirmParam="&showconfirm=false";
+ }
+ activityFiltering=false;
+ try{
+ window.frames.toc.tocToolbarFrame.setButtonState("show_all", true);
+ }catch(ex) {}
+ try{
+ window.frames.index.indexToolbarFrame.setButtonState("show_all", true);
+ }catch(ex) {}
+ try{
+ window.frames.search.searchToolbarFrame.setButtonState("show_all", true);
+ }catch(ex) {}
+ try{
+ window.frames.toc.tocViewFrame.location.replace(window.frames.toc.tocViewFrame.location.href.replace(regExp, "")+"&showAll=on"+displayConfirmParam);
+ }catch(ex) {}
+ try{
+ window.frames.index.indexViewFrame.location.replace(window.frames.index.indexViewFrame.location.href.replace(regExp, "")+"&showAll=on"+displayConfirmParam);
+ }catch(ex) {}
+ try{
+ window.frames.search.searchViewFrame.location.replace(window.frames.search.searchViewFrame.location.href.replace(regExp, "")+"&showAll=on");
+ }catch(ex) {}
+}
+
+function dontShowAll(){
+ activityFiltering=true;
+ try{
+ window.frames.toc.tocToolbarFrame.setButtonState("show_all", false);
+ }catch(ex) {}
+ try{
+ window.frames.index.indexToolbarFrame.setButtonState("show_all", false);
+ }catch(ex) {}
+ try{
+ window.frames.search.searchToolbarFrame.setButtonState("show_all", false);
+ }catch(ex) {}
+ try{
+ window.frames.toc.tocViewFrame.location.replace(window.frames.toc.tocViewFrame.location.href.replace(regExp, "")+"&showAll=off");
+ }catch(ex) {}
+ try{
+ window.frames.index.indexViewFrame.location.replace(window.frames.index.indexViewFrame.location.href.replace(regExp, "")+"&showAll=off");
+ }catch(ex) {}
+ try{
+ window.frames.search.searchViewFrame.location.replace(window.frames.search.searchViewFrame.location.href.replace(regExp, "")+"&showAll=off");
+ }catch(ex) {}
+}
+
+var confirmShowAllDialog;
+var w = 470;
+var h = 240;
+
+function confirmShowAll()
+{
+<%
+if (data.isIE()){
+%>
+ var l = top.screenLeft + (top.document.body.clientWidth - w) / 2;
+ var t = top.screenTop + (top.document.body.clientHeight - h) / 2;
+<%
+} else {
+%>
+ var l = top.screenX + (top.innerWidth - w) / 2;
+ var t = top.screenY + (top.innerHeight - h) / 2;
+<%
+}
+%>
+ // move the dialog just a bit higher than the middle
+ if (t-50 > 0) t = t-50;
+
+ window.location="javascript://needModal";
+ confirmShowAllDialog = window.open("confirmShowAll.jsp", "confirmShowAllDialog", "resizeable=no,height="+h+",width="+w+",left="+l+",top="+t );
+ confirmShowAllDialog.focus();
+}
+
+function closeConfirmShowAllDialog(){
+ try {
+ if (confirmShowAllDialog){
+ confirmShowAllDialog.close();
+ }
+ }
+ catch(e) {}
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>" tabIndex="-1" onunload="closeConfirmShowAllDialog()">
+<%
+ for (int i=0; i<views.length; i++)
+ {
+ // normally we would hide the views first, but mozilla needs all iframes to be visible to load
+ // other frames
+ String className = data.getVisibleView().equals(views[i].getName()) || data.isMozilla() ? "visible" : "hidden";
+%>
+ <iframe frameborder="0"
+ class="<%=className%>"
+ name="<%=views[i].getName()%>"
+ title="<%=ServletResources.getString("ignore", views[i].getName(), request)%>"
+ id="<%=views[i].getName()%>"
+ src='<%="view.jsp?view="+views[i].getName()+(request.getQueryString()==null?"":("&"+request.getQueryString()))%>'>
+ </iframe>
+<%
+ }
+%>
+
+ <iframe frameborder="0" style="visibility:hidden" tabindex="-1" name="temp" id="temp" title="<%=ServletResources.getString("ignore", "temp", request)%>"></iframe>
+
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/workingSet.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/workingSet.jsp
new file mode 100644
index 0000000..2fdc77d
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/workingSet.jsp
@@ -0,0 +1,430 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ WorkingSetData data = new WorkingSetData(application, request, response);
+ TocData tocData = new TocData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+
+<html>
+<head>
+<title><%=ServletResources.getString(data.isEditMode()?"EditWorkingSet":"NewWorkingSet", request)%></title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Pragma" content="no-cache">
+<meta http-equiv="Expires" content="-1">
+
+<style type="text/css">
+
+/* need this one for Mozilla */
+HTML, BODY {
+ width:100%;
+ height:100%;
+ margin:0px;
+ padding:0px;
+ border:0px;
+}
+
+BODY {
+ font: <%=prefs.getViewFont()%>;
+ background:<%=prefs.getToolbarBackground()%>;
+ color: WindowText;
+}
+
+TABLE {
+ font:<%=prefs.getViewFont()%>;
+ background:<%=prefs.getToolbarBackground()%>;
+}
+
+TD, TR {
+ margin:0px;
+ padding:0px;
+ border:0px;
+}
+
+
+#workingSet {
+ width:100%;
+ font:<%=prefs.getViewFont()%>;
+}
+
+#booksContainer {
+ background:Window;
+ color:WindowText;
+ border: 2px inset ThreeDHighlight;
+ margin:10px;
+ margin-top:2px;
+ padding-<%=isRTL?"right":"left"%>:5px;
+ overflow:auto;
+ height:350px;
+<%if (data.isIE()) {%>
+ width:100%;
+<%}%>
+}
+
+.book {
+ margin:0xp;
+ border:0px;
+ padding:0px;
+ white-space: nowrap;
+}
+
+.topic {
+ margin-<%=isRTL?"right":"left"%>:30px;
+ border:0px;
+ padding:0px;
+ white-space: nowrap;
+}
+
+BUTTON {
+ font:<%=prefs.getViewFont()%>;
+}
+
+.expanded {
+ display:block;
+}
+
+.collapsed {
+ display:none;
+}
+
+.grayed {
+ background-color: <%=prefs.getToolbarBackground()%>;
+}
+
+<%
+if (data.isMozilla()) {
+%>
+input[type="checkbox"] {
+ border:2px solid WindowText;
+ margin:0xp;
+ padding:0px;
+ height:12px;
+ width:12px;
+}
+
+.grayed {
+ background: <%=prefs.getToolbarBackground()%>;
+}
+<%
+}
+%>
+</style>
+
+<script language="JavaScript">
+
+// Preload images
+var minus = new Image();
+minus.src = "<%=prefs.getImagesDirectory()%>"+"/minus.gif";
+var plus = new Image();
+plus.src = "<%=prefs.getImagesDirectory()%>"+"/plus.gif";
+
+var oldName = '<%=data.isEditMode()?data.getWorkingSetName():""%>';
+var altBookClosed = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("bookClosed", request))%>";
+var altBookOpen = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("bookOpen", request))%>";
+
+function onloadHandler() {
+<%if(!data.isMozilla() || "1.3".compareTo(data.getMozillaVersion()) <=0){
+// buttons are not resized immediately on mozilla before 1.3
+%>
+ sizeButtons();
+<%}%>
+ document.getElementById("workingSet").focus();
+ enableOK();
+<%-- event handlers that call enableOK() are not invoked properly on Japanese --%>
+ setInterval("enableOK()", 250);
+
+}
+
+function sizeButtons() {
+ var minWidth=60;
+
+ if(document.getElementById("ok").offsetWidth < minWidth){
+ document.getElementById("ok").style.width = minWidth+"px";
+ }
+ if(document.getElementById("cancel").offsetWidth < minWidth){
+ document.getElementById("cancel").style.width = minWidth+"px";
+ }
+}
+
+function doSubmit()
+{
+ try
+ {
+ var workingSet = document.getElementById("workingSet").value;
+ if (!workingSet || workingSet == "")
+ return false;
+
+ var hrefs = getSelectedResources();
+ if (!hrefs || hrefs == "")
+ return false;
+
+ var query = "operation="+'<%=data.getOperation()%>'+"&workingSet="+encodeURIComponent(workingSet)+ hrefs+"&oldName="+encodeURIComponent(oldName);
+ window.opener.location.replace("workingSetManager.jsp?"+query);
+ window.opener.focus();
+ window.close();
+ } catch(ex) {alert("Error..." + ex.message)}
+}
+
+function getSelectedResources() {
+ var hrefs = "";
+ var inputs = document.getElementsByTagName("INPUT");
+ for (var i=0; i<inputs.length; i++)
+ {
+ if (inputs[i].type != "checkbox") continue;
+ if (inputs[i].checked == false) continue;
+ if (getGrayed(inputs[i])) continue;
+ if (isToc(inputs[i].name)) {
+ hrefs += "&hrefs="+encodeURIComponent(inputs[i].name);
+ } else if (!isParentTocSelected(inputs[i].name)) {
+ hrefs += "&hrefs="+encodeURIComponent(inputs[i].name);
+ }
+ }
+ return hrefs;
+}
+
+// Assumption: last character of a toc reference cannot be underscore _
+function isToc(name) {
+ return name.charAt(name.length-1) != "_";
+}
+
+function isParentTocSelected(name) {
+ var parentCheckbox = getParentCheckbox(name);
+ return (parentCheckbox.checked && !getGrayed(parentCheckbox));
+}
+
+function getParentCheckbox(name) {
+ var parentId = name.substring(0, name.lastIndexOf("_", name.length-2));
+ return document.getElementById(parentId);
+}
+
+function collapseOrExpand(nodeId) {
+ var node = document.getElementById("div"+nodeId);
+ var img = document.getElementById("img"+nodeId);
+ if (!node || !img) return;
+ if (node.className == "expanded") {
+ node.className = "collapsed";
+ img.src = plus.src;
+ img.alt = altBookClosed;
+ } else {
+ node.className = "expanded";
+ img.src = minus.src;
+ img.alt = altBookOpen;
+ }
+}
+
+function collapse(nodeId) {
+ var node = document.getElementById("div"+nodeId);
+ var img = document.getElementById("img"+nodeId);
+ if (!node || !img) return;
+ node.className = "collapsed";
+ img.src = plus.src;
+ img.alt = altBookClosed;
+}
+
+function expand(nodeId) {
+ var node = document.getElementById("div"+nodeId);
+ var img = document.getElementById("img"+nodeId);
+ if (!node || !img) return;
+ node.className = "expanded";
+ img.src = minus.src;
+ img.alt = altBookOpen;
+}
+
+function getParent(child) {
+ var id = child.name;
+ var parentId = id.substring(0, id.lastIndexOf("_", id.length-2));
+ return document.getElementById(parentId);
+}
+
+function updateParentState(checkbox,parentDiv) {
+
+ if (checkbox == null)
+ return;
+
+ var baseChildState = checkbox.checked;
+ var parent = getParent(checkbox);
+ if (parent == null)
+ return;
+
+ var allSameState = true;
+ var children = document.getElementById(parentDiv).getElementsByTagName("INPUT");
+ for (var i = children.length - 1; i >= 0; i--) {
+ if (children[i].checked != baseChildState ) {
+ allSameState = false;
+ break;
+ }
+ }
+
+ setGrayed(parent, !allSameState);
+ parent.checked = !allSameState || baseChildState;
+}
+
+function setSubtreeChecked(checkbox, parentDiv) {
+ var state = checkbox.checked;
+ var children = document.getElementById(parentDiv).getElementsByTagName("INPUT");
+ for (var i = children.length - 1; i >= 0; i--) {
+ var element = children[i];
+ if (state) {
+ element.checked = true;
+ } else {
+ element.checked = false;
+ }
+ }
+ setGrayed(checkbox, false);
+}
+
+function setGrayed(node, enableGray) {
+ if (enableGray)
+ node.className = "grayed";
+ else
+ node.className = "checkbox";
+}
+
+function getGrayed(node) {
+ return node.className == "grayed";
+}
+
+function isExpanded(nodeId) {
+ var node = document.getElementById("div"+nodeId);
+ if (node == null) return false;
+ return node.className == "expanded";
+}
+
+function isCollapsed(nodeId) {
+ var node = document.getElementById("div"+nodeId);
+ if (node == null) return false;
+ return node.className == "collapsed";
+}
+
+/**
+ * Handler for key down (arrows)
+ */
+function keyDownHandler(folderId, key, target)
+{
+ if (key != 37 && key != 39)
+ return true;
+
+ if (key == 39) { // Right arrow, expand
+ if (isCollapsed(folderId))
+ expand(folderId);
+ target.focus();
+ } else if (key == 37) { // Left arrow,collapse
+ if (isExpanded(folderId))
+ collapse(folderId);
+ var parentCheckbox = getParentCheckbox(target.name);
+ if (parentCheckbox != null)
+ parentCheckbox.focus();
+ else
+ target.focus();
+ }
+
+ return false;
+}
+
+function enableOK() {
+ var value = document.getElementById("workingSet").value;
+ if (!value || value.length == 0 || value.charAt(0) == " ")
+ document.getElementById("ok").disabled = true;
+ else
+ document.getElementById("ok").disabled = false;
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>" onload="onloadHandler()">
+<form onsubmit="doSubmit();return false;">
+ <table id="wsTable" width="100%" cellspacing=0 cellpading=0 border=0 align=center >
+ <tr><td style="padding:5px 10px 0px 10px;"><label for="workingSet" accesskey="<%=ServletResources.getAccessKey("WorkingSetName", request)%>"><%=ServletResources.getLabel("WorkingSetName", request)%>:</label>
+ </td></tr>
+ <tr><td style="padding:0px 10px;"><input type="text" id="workingSet" name="workingSet" value='<%=data.isEditMode()?data.getWorkingSetName():""%>' maxlength=256 alt='<%=ServletResources.getString("WorkingSetName", request)%>' title='<%=ServletResources.getString("WorkingSetName", request)%>' onkeyup="enableOK();return true;">
+ </td></tr>
+ <tr><td><div id="selectBook" style="padding-top:5px; margin-<%=isRTL?"right":"left"%>:10px;"><%=ServletResources.getString("WorkingSetContent", request)%>:</div>
+ </td></tr>
+ </table>
+
+<div id="booksContainer" style="background:<%=prefs.getViewBackground()%>;">
+
+<%
+for (int i=0; i<data.getTocCount(); i++)
+{
+ if(!tocData.isEnabled(i)){
+ // do not show
+ continue;
+ }
+ String label = data.getTocLabel(i);
+ short state = data.getTocState(i);
+ String checked = state == WorkingSetData.STATE_CHECKED || state == WorkingSetData.STATE_GRAYED ? "checked" : "";
+ String className = state == WorkingSetData.STATE_GRAYED ? "grayed" : "checkbox";
+%>
+ <div class="book" id='<%="id"+i%>' >
+ <img id='<%="img"+i%>' alt="<%=ServletResources.getString("bookClosed", request)%>" src="<%=prefs.getImagesDirectory()%>/plus.gif" onclick="collapseOrExpand('<%=i%>')">
+ <input class='<%=className%>'
+ type="checkbox"
+ id='<%=data.getTocHref(i)%>'
+ name='<%=data.getTocHref(i)%>'
+ alt="<%=label%>" <%=checked%>
+ onkeydown="keyDownHandler(<%=i%>, event.keyCode, this)"
+ onclick="setSubtreeChecked(this, '<%="div"+i%>')">
+ <label for="<%=data.getTocHref(i)%>"><%=label%></label>
+ <div id='<%="div"+i%>' class="collapsed">
+<%
+ for (int topic=0; topic<data.getTopicCount(i); topic++)
+ {
+ String topicLabel = data.getTopicLabel(i, topic);
+ String topicChecked = (state == WorkingSetData.STATE_CHECKED) ||
+ (state == WorkingSetData.STATE_GRAYED && data.getTopicState(i,topic) == WorkingSetData.STATE_CHECKED)
+ ? "checked" : "";
+%>
+ <div class="topic" id='<%="id"+i+"_"+topic%>'>
+ <input class="checkbox"
+ type="checkbox"
+ id='<%=data.getTocHref(i)+"_"+topic+"_"%>'
+ name='<%=data.getTocHref(i)+"_"+topic+"_"%>'
+ alt="<%=topicLabel%>" <%=topicChecked%>
+ onkeydown="keyDownHandler(<%=i%>, event.keyCode, this)"
+ onclick="updateParentState(this, '<%="div"+i%>')">
+ <label for="<%=data.getTocHref(i)+"_"+topic+"_"%>"><%=topicLabel%></label>
+ </div>
+<%
+ }
+%>
+ </div>
+ </div>
+<%
+}
+%>
+
+</div>
+<div style="height:50px;">
+ <table valign="bottom" align="<%=isRTL?"left":"right"%>">
+ <tr id="buttonsTable" valign="bottom"><td valign="bottom" align="<%=isRTL?"left":"right"%>">
+ <table cellspacing=10 cellpading=0 border=0 style="background:transparent;">
+ <tr>
+ <td>
+ <button type="submit" id="ok"><%=ServletResources.getString("OK", request)%></button>
+ </td>
+ <td>
+ <button type="reset" onclick="window.close()" id="cancel"><%=ServletResources.getString("Cancel", request)%></button>
+ </td>
+ </tr>
+ </table>
+ </td></tr>
+ </table>
+</div>
+</form>
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/workingSetManager.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/workingSetManager.jsp
new file mode 100644
index 0000000..cf6ecbc
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/advanced/workingSetManager.jsp
@@ -0,0 +1,321 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+<%
+ WorkingSetManagerData data = new WorkingSetManagerData(application, request, response);
+ WebappPreferences prefs = data.getPrefs();
+ String dataSaveError = data.getSaveError();
+%>
+
+
+<html>
+<head>
+<title><%=ServletResources.getString("SelectWorkingSet", request)%></title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Pragma" content="no-cache">
+<meta http-equiv="Expires" content="-1">
+
+
+<style type="text/css">
+<%@ include file="list.css"%>
+</style>
+
+<style type="text/css">
+HTML, BODY {
+ width:100%;
+ height:100%;
+ margin:0px;
+ padding:0px;
+ border:0px;
+}
+
+BODY {
+ background-color: <%=prefs.getToolbarBackground()%>;
+ color:WindowText;
+}
+
+TABLE {
+ width:auto;
+}
+
+TD, TR {
+ margin:0px;
+ padding:0px;
+ border:0px;
+}
+TD.radio {
+ white-space: nowrap;
+}
+
+BUTTON {
+ font:<%=prefs.getViewFont()%>;
+}
+
+#workingSetContainer {
+ background:Window;
+ color:WindowText;
+ border: 2px inset ThreeDHighlight;
+ margin:0px 5px;
+ padding:5px;
+ overflow:auto;
+}
+
+</style>
+
+<script language="JavaScript" src="list.js"></script>
+<script language="JavaScript">
+
+function highlightHandler()
+{
+ document.getElementById('selectws').checked = true;
+ enableButtons();
+}
+
+// register handler
+_highlightHandler = highlightHandler;
+
+function onloadHandler() {
+<%if(dataSaveError != null){%>
+ alert("<%=dataSaveError%>");
+ window.location="workingSetManager.jsp"
+<%}
+if(!data.isMozilla() || "1.3".compareTo(data.getMozillaVersion()) <=0){
+// buttons are not resized immediately on mozilla before 1.3
+%>
+ sizeButtons();
+<%}%>
+ enableButtons();
+ document.getElementById("alldocs").focus();
+}
+
+function sizeButtons() {
+ var minWidth=60;
+
+ if(document.getElementById("ok").offsetWidth < minWidth){
+ document.getElementById("ok").style.width = minWidth+"px";
+ }
+ if(document.getElementById("cancel").offsetWidth < minWidth){
+ document.getElementById("cancel").style.width = minWidth+"px";
+ }
+ if(document.getElementById("edit").offsetWidth < minWidth){
+ document.getElementById("edit").style.width = minWidth+"px";
+ }
+ if(document.getElementById("remove").offsetWidth < minWidth){
+ document.getElementById("remove").style.width = minWidth+"px";
+ }
+ if(document.getElementById("new").offsetWidth < minWidth){
+ document.getElementById("new").style.width = minWidth+"px";
+ }
+}
+
+function enableButtons() {
+ if (document.getElementById('selectws').checked){
+ document.getElementById("edit").disabled = (active == null);
+ document.getElementById("remove").disabled = (active == null);
+ document.getElementById("ok").disabled = (active == null);
+ } else {
+ document.getElementById("edit").disabled = true;
+ document.getElementById("remove").disabled = true;
+ document.getElementById("ok").disabled = false;
+ }
+}
+
+function getWorkingSet()
+{
+ if (active != null && document.getElementById("selectws").checked)
+ return active.title;
+ else
+ return "";
+}
+
+
+function selectWorkingSet() {
+ var workingSet = getWorkingSet();
+
+ var search = window.opener.location.search;
+ if (search && search.length > 0) {
+ var i = search.indexOf("workingSet=");
+ if (i >= 0)
+ search = search.substring(0, i);
+ else
+ search += "&";
+ } else {
+ search = "?";
+ }
+
+ search += "workingSet=" + encodeURIComponent(workingSet);
+ var searchWord = window.opener.document.forms["searchForm"].searchWord.value;
+ if (searchWord)
+ search += "&searchWord="+encodeURIComponent(searchWord);
+
+ window.opener.location.replace(
+ window.opener.location.protocol +
+ "//" +
+ window.opener.location.host +
+ window.opener.location.pathname +
+ search);
+
+ window.close();
+ return false;
+}
+
+function removeWorkingSet() {
+ window.location.replace("workingSetManager.jsp?operation=remove&workingSet="+encodeURIComponent(getWorkingSet()));
+}
+
+var workingSetDialog;
+var w = 300;
+var h = 500;
+
+function newWorkingSet() {
+ <%
+ if (data.isIE()){
+ %>
+ var l = top.screenLeft + (top.document.body.clientWidth - w) / 2;
+ var t = top.screenTop + (top.document.body.clientHeight - h) / 2;
+ <%
+ } else {
+ %>
+ var l = top.screenX + (top.innerWidth - w) / 2;
+ var t = top.screenY + (top.innerHeight - h) / 2;
+ <%
+ }
+ %>
+ // move the dialog just a bit higher than the middle
+ if (t-50 > 0) t = t-50;
+ window.location="javascript://needModal";
+ workingSetDialog = window.open("workingSet.jsp?operation=add&workingSet="+encodeURIComponent(getWorkingSet()), "workingSetDialog", "resizeable=no,height="+h+",width="+w +",left="+l+",top="+t);
+ workingSetDialog.focus();
+}
+
+function editWorkingSet() {
+
+ <%
+ if (data.isIE()){
+ %>
+ var l = top.screenLeft + (top.document.body.clientWidth - w) / 2;
+ var t = top.screenTop + (top.document.body.clientHeight - h) / 2;
+ <%
+ } else {
+ %>
+ var l = top.screenX + (top.innerWidth - w) / 2;
+ var t = top.screenY + (top.innerHeight - h) / 2;
+ <%
+ }
+ %>
+ // move the dialog just a bit higher than the middle
+ if (t-50 > 0) t = t-50;
+
+ window.location="javascript://needModal";
+ workingSetDialog = window.open("workingSet.jsp?operation=edit&workingSet="+encodeURIComponent(getWorkingSet()), "workingSetDialog", "resizeable=no,height="+h+",width="+w+",left="+l+",top="+t );
+ workingSetDialog.focus();
+}
+
+function closeWorkingSetDialog()
+{
+ try {
+ if (workingSetDialog)
+ workingSetDialog.close();
+ }
+ catch(e) {}
+}
+
+</script>
+
+</head>
+
+<body dir="<%=direction%>" onload="onloadHandler()" onunload="closeWorkingSetDialog()">
+<form onsubmit="selectWorkingSet();return false;">
+<div style="overflow:auto;height:250px;width:100%;">
+ <table id="filterTable" cellspacing=0 cellpading=0 border=0 align=center style="background:<%=prefs.getToolbarBackground()%>; font:<%=prefs.getToolbarFont()%>;margin-top:5px;width:100%;">
+ <tr><td class="radio">
+ <input id="alldocs" type="radio" name="workingSet" onclick="enableButtons()"><label for="alldocs" accesskey="<%=ServletResources.getAccessKey("selectAll", request)%>"><%=ServletResources.getLabel("selectAll", request)%></label>
+ </td></tr>
+ <tr><td class="radio">
+ <input id="selectws" type="radio" name="workingSet" onclick="enableButtons()"><label for="selectws" accesskey="<%=ServletResources.getAccessKey("selectWorkingSet", request)%>"><%=ServletResources.getLabel("selectWorkingSet", request)%>:</label>
+ </td></tr>
+ <tr><td>
+ <div id="workingSetContainer" style="overflow:auto; height:140px; background:<%=prefs.getViewBackground()%>;">
+
+<table id='list' cellspacing='0' style="width:100%;">
+<%
+String[] wsets = data.getWorkingSets();
+String workingSetId = "";
+for (int i=0; i<wsets.length; i++)
+{
+ if (data.isCurrentWorkingSet(i))
+ workingSetId = "a" + i;
+%>
+<tr class='list' id='r<%=i%>' style="width:100%;">
+ <td align='<%=isRTL?"right":"left"%>' class='label' nowrap style="width:100%; padding-left:5px;">
+ <a id='a<%=i%>'
+ href='#'
+ onclick="active=this;highlightHandler()"
+ ondblclick="selectWorkingSet()"
+ title="<%=wsets[i]%>">
+ <%=wsets[i]%>
+ </a>
+ </td>
+</tr>
+
+<%
+}
+%>
+
+</table>
+ </div>
+ </td></tr>
+ <tr id="actionsTable" valign="bottom"><td>
+ <table cellspacing=10 cellpading=0 border=0 style="background:transparent;">
+ <tr>
+ <td>
+ <button type="button" onclick="newWorkingSet()" id="new" accesskey="<%=ServletResources.getAccessKey("NewWorkingSetButton", request)%>"><%=ServletResources.getLabel("NewWorkingSetButton", request)%>...</button>
+ </td>
+ <td>
+ <button type="button" onclick="editWorkingSet()" id="edit" disabled='<%=data.getWorkingSet() == null ?"true":"false"%>' accesskey="<%=ServletResources.getAccessKey("EditWorkingSetButton", request)%>"><%=ServletResources.getLabel("EditWorkingSetButton", request)%>...</button>
+ </td>
+ <td>
+ <button type="button" onclick="removeWorkingSet()" id="remove" disabled='<%=data.getWorkingSet() == null ?"true":"false"%>' accesskey="<%=ServletResources.getAccessKey("RemoveWorkingSetButton", request)%>"><%=ServletResources.getLabel("RemoveWorkingSetButton", request)%></button>
+ </td>
+ </tr>
+ </table>
+ </td></tr>
+ </table>
+</div>
+<div style="height:50px;">
+ <table valign="bottom" align="<%=isRTL?"left":"right"%>" style="background:<%=prefs.getToolbarBackground()%>">
+ <tr id="buttonsTable" valign="bottom"><td valign="bottom" align="<%=isRTL?"left":"right"%>">
+ <table cellspacing=10 cellpading=0 border=0 style="background:transparent;">
+ <tr>
+ <td>
+ <button type="submit" id="ok"><%=ServletResources.getString("OK", request)%></button>
+ </td>
+ <td>
+ <button type="reset" onclick="window.close()" id="cancel"><%=ServletResources.getString("Cancel", request)%></button>
+ </td>
+ </tr>
+ </table>
+ </td></tr>
+ </table>
+</div>
+</form>
+<script language="JavaScript">
+ var selected = selectTopicById('<%=workingSetId%>');
+ if (!selected)
+ document.getElementById("alldocs").checked = true;
+ else
+ document.getElementById("selectws").checked = true;
+
+</script>
+
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/advanced.inc b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/advanced.inc
new file mode 100644
index 0000000..bcbddd6
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/advanced.inc
@@ -0,0 +1,68 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<form action="searchView.jsp" method="get" accept-charset="UTF-8" target="_self">
+
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ <label for="searchWord"><%=ServletResources.getString("SearchExpression", request)%></label>
+ </td>
+ </tr>
+ <tr>
+ <td nowrap>
+ <input type="text" name="searchWord" id="searchWord" value='<%=data.getSearchWord()%>' maxlength=256 alt='<%=ServletResources.getString("SearchExpression", request)%>' title='<%=ServletResources.getString("SearchExpression", request)%>'>
+ <input type="hidden" name="maxHits" value="500" >
+ <input type="hidden" name="scopedSearch" value="true" >
+ <input type="submit" value='<%=ServletResources.getString("GO", request)%>' alt='<%=ServletResources.getString("GO", request)%>' title='<%=ServletResources.getString("GO", request)%>'>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <%=ServletResources.getString("expression_label", request)%>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <hr>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b>
+ <%=ServletResources.getString("Select", request)%>
+ </b>
+ </td>
+ </tr>
+
+<%
+TocData tocData = new TocData(application, request, response);
+for (int toc=0; toc<tocData.getTocCount(); toc++)
+{
+ //if(!tocData.isEnabled(toc)){
+ // do not show
+ // continue;
+ //}
+ String label = tocData.getTocLabel(toc);
+ String checked="checked=\"yes\" ";
+ if( data.isSearchRequest() && !data.isTocSelected(toc) ){
+ checked="";
+ }
+%>
+ <tr>
+ <td nowrap>
+ <input type="checkbox" name='scope' id="checkbox<%=toc%>" value='<%=tocData.getTocHref(toc)%>' <%=checked%> alt="<%=label%>"><label for="checkbox<%=toc%>"><%=label%></label>
+ </td>
+ </tr>
+<%
+}
+%>
+ </table>
+ </form>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/err.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/err.jsp
new file mode 100644
index 0000000..196be27
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/err.jsp
@@ -0,0 +1,40 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ page import="org.eclipse.help.internal.webapp.data.*" contentType="text/html; charset=UTF-8"%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title> Error </title>
+</head>
+<%
+String direction = "ltr";
+try{
+ if(UrlUtil.isRTL(request, response)){
+ direction = "rtl";
+ }
+}catch(Exception e){
+}
+%>
+
+<body dir="<%=direction%>">
+
+ <%@ page isErrorPage="true" %>
+
+ There was an error in your action:
+ <p>
+ <%= exception.toString() %>
+ </P>
+
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/header.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/header.jsp
new file mode 100644
index 0000000..6a6ca76
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/header.jsp
@@ -0,0 +1,30 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ page import="org.eclipse.help.internal.webapp.data.*" errorPage="/advanced/err.jsp" contentType="text/html; charset=UTF-8"%>
+
+<%
+ request.setCharacterEncoding("UTF-8");
+ boolean isRTL = UrlUtil.isRTL(request, response);
+ String direction = isRTL?"rtl":"ltr";
+%>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!------------------------------------------------------------------------------
+ ! Copyright (c) 2000, 2004 IBM Corporation and others.
+ ! All rights reserved. This program and the accompanying materials
+ ! are made available under the terms of the Eclipse Public License v1.0
+ ! which accompanies this distribution, and is available at
+ ! http://www.eclipse.org/legal/epl-v10.html
+ !
+ ! Contributors:
+ ! IBM Corporation - initial API and implementation
+ ------------------------------------------------------------------------------->
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/help.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/help.jsp
new file mode 100644
index 0000000..aa539c8
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/help.jsp
@@ -0,0 +1,41 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+<%
+ LayoutData data = new LayoutData(application,request, response);
+%>
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title><%=ServletResources.getString("Help", request)%></title>
+
+</head>
+
+<frameset cols="<%=isRTL?"*,300":"300,*"%>">
+<%
+if (isRTL) {
+%>
+ <frame name="ContentViewFrame" title="<%=ServletResources.getString("aView", ServletResources.getString("topic", request), request)%>" src='<%=data.getContentURL()%>' marginwidth="5" marginheight="5">
+ <frame name="ViewsFrame" title="<%=ServletResources.getString("ignore", "ViewsFrame", request)%>" src='<%="view.jsp?view="+data.getVisibleView()+"&"+request.getQueryString()%>' marginwidth="0" marginheight="0" scrolling="no">
+<%
+} else {
+%>
+ <frame name="ViewsFrame" title="<%=ServletResources.getString("ignore", "ViewsFrame", request)%>" src='<%="view.jsp?view="+data.getVisibleView()+"&"+request.getQueryString()%>' marginwidth="0" marginheight="0" scrolling="no">
+ <frame name="ContentViewFrame" title="<%=ServletResources.getString("aView", ServletResources.getString("topic", request), request)%>" src='<%=data.getContentURL()%>' marginwidth="5" marginheight="5">
+<%
+}
+%>
+</frameset>
+
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/bookmark_obj.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/bookmark_obj.gif
new file mode 100644
index 0000000..0665a4d
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/bookmark_obj.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/bookmarks_view.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/bookmarks_view.gif
new file mode 100644
index 0000000..8eefad3
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/bookmarks_view.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/container_obj.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/container_obj.gif
new file mode 100644
index 0000000..391cfdb
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/container_obj.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_contents_view.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_contents_view.gif
new file mode 100644
index 0000000..9e665d5
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_contents_view.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_index_view.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_index_view.gif
new file mode 100644
index 0000000..6645b64
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_index_view.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_links_view.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_links_view.gif
new file mode 100644
index 0000000..d0b5c15
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_links_view.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_search_results_view.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_search_results_view.gif
new file mode 100644
index 0000000..111d5d1
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_search_results_view.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_synch_toc_nav.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_synch_toc_nav.gif
new file mode 100644
index 0000000..4353fd5
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/e_synch_toc_nav.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/synch_toc_nav.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/synch_toc_nav.gif
new file mode 100644
index 0000000..b986e49
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/synch_toc_nav.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/toc_closed.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/toc_closed.gif
new file mode 100644
index 0000000..5edd28c
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/toc_closed.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/toc_open.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/toc_open.gif
new file mode 100644
index 0000000..520c1a8
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/toc_open.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/topic.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/topic.gif
new file mode 100644
index 0000000..fbd1394
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/images/topic.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/index.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/index.jsp
new file mode 100644
index 0000000..c405813
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/index.jsp
@@ -0,0 +1,37 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+<%
+ LayoutData data = new LayoutData(application,request, response);
+%>
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title><%=data.getWindowTitle()%></title>
+<jsp:include page="livehelp_js.jsp"/>
+</head>
+
+<frameset rows="<%="0".equals(data.getBannerHeight())?"":data.getBannerHeight()+","%>45,*">
+<%
+ if(!("0".equals(data.getBannerHeight()))){
+%>
+ <frame name="BannerFrame" title="<%=ServletResources.getString("Banner", request)%>" src='<%=data.getBannerURL()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="no" noresize>
+<%
+ }
+%>
+ <frame name="TabsFrame" title="<%=ServletResources.getString("helpToolbarFrame", request)%>" src='<%="basic/tabs.jsp"+data.getQuery()%>' marginwidth="5" marginheight="5" scrolling="no">
+ <frame name="HelpFrame" title="<%=ServletResources.getString("ignore", "HelpFrame", request)%>" src='<%="basic/help.jsp"+data.getQuery()%>' frameborder="no" marginwidth="0" marginheight="0" scrolling="no">
+</frameset>
+
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/indexToolbar.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/indexToolbar.jsp
new file mode 100644
index 0000000..4fbf66e
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/indexToolbar.jsp
@@ -0,0 +1,16 @@
+<%--
+ Copyright (c) 2006 Intel Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Intel Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+
+<jsp:include page="toolbar.jsp">
+ <jsp:param name="view" value="index"/>
+</jsp:include>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/indexView.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/indexView.jsp
new file mode 100644
index 0000000..9120d47
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/indexView.jsp
@@ -0,0 +1,37 @@
+<%--
+ Copyright (c) 2006 Intel Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Intel Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+<%
+ IndexData data = new IndexData(application, request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("Content", request)%></title>
+
+<base target="ContentViewFrame">
+</head>
+
+
+<body dir="<%=direction%>" bgcolor="<%=prefs.getBasicViewBackground()%>">
+
+<table border="0" cellpadding="0" cellspacing="0">
+<%
+ data.generateBasicIndex(out);
+%>
+</table>
+
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/linksToolbar.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/linksToolbar.jsp
new file mode 100644
index 0000000..f0e6386
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/linksToolbar.jsp
@@ -0,0 +1,16 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+
+<jsp:include page="toolbar.jsp">
+ <jsp:param name="view" value="links"/>
+</jsp:include>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/linksView.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/linksView.jsp
new file mode 100644
index 0000000..b12d4b0
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/linksView.jsp
@@ -0,0 +1,67 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+<%
+ LinksData data = new LinksData(application, request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Pragma" content="no-cache">
+<meta http-equiv="Expires" content="-1">
+
+<title><%=ServletResources.getString("Links", request)%></title>
+
+<base target="ContentViewFrame">
+</head>
+
+
+<body dir="<%=direction%>" bgcolor="<%=prefs.getBasicViewBackground()%>">
+
+<%
+if(!data.isLinksRequest()) {
+ out.write(ServletResources.getString("pressF1", request));
+} else if (data.getLinksCount() == 0){
+ out.write(ServletResources.getString("Nothing_found", null));
+} else {
+%>
+
+<table border="0" cellpadding="0" cellspacing="0">
+
+<%
+ for (int link = 0; link < data.getLinksCount(); link++)
+ {
+%>
+
+<tr>
+ <td align='<%=isRTL?"right":"left"%>' nowrap>
+ <a href='<%=data.getTopicHref(link)%>'>
+ <img src="<%=prefs.getImagesDirectory()%>/topic.gif" alt="" border=0>
+ <%=data.getTopicLabel(link)%>
+ </a>
+ </td>
+</tr>
+
+<%
+ }
+%>
+
+</table>
+
+<%
+
+}
+
+%>
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/livehelp_js.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/livehelp_js.jsp
new file mode 100644
index 0000000..2143fcc
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/livehelp_js.jsp
@@ -0,0 +1,63 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ page import="org.eclipse.help.internal.webapp.data.*" errorPage="/basic/err.jsp" contentType="text/html; charset=UTF-8"%>
+<%
+ request.setCharacterEncoding("UTF-8");
+%>
+<script language="JavaScript">
+function liveActionInternal(topHelpWindow, pluginId, className, argument)
+{
+<%
+ RequestData data = new RequestData(application,request, response);
+ if(data.getMode() == RequestData.MODE_INFOCENTER){
+%>
+ alert("<%=UrlUtil.JavaScriptEncode(ServletResources.getString("noLiveHelpInInfocenter", request))%>");
+ return;
+<%
+ }else{
+%>
+ // construct the proper url for communicating with the server
+ var url= window.location.href;
+
+ var i = url.indexOf("?");
+ if(i>0)
+ url=url.substring(0, i);
+
+ i = url.indexOf("/topic/");
+ if(i < 0)
+ i = url.lastIndexOf("/");
+
+ url=url.substring(0, i+1);
+ var encodedArg;
+ if(window.encodeURIComponent){
+ encodedArg=encodeURIComponent(argument);
+ }else{
+ encodedArg=escape(argument);
+ }
+ url=url+"livehelp/?pluginID="+pluginId+"&class="+className+"&arg="+encodedArg+"&nocaching="+Math.random();
+
+ var tabsFrame = topHelpWindow.TabsFrame;
+ if (!tabsFrame){
+ return;
+ }
+ if(tabsFrame.liveHelpFrame){
+ tabsFrame.liveHelpFrame.location=url;
+ } else if(tabsFrame.document && tabsFrame.document.liveHelpFrame){
+ tabsFrame.document.liveHelpFrame.src=url;
+ }
+<%
+ }
+%>
+}
+function showTopicInContentsInternal(topHelpWindow, topic) {
+}
+
+</script>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/searchToolbar.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/searchToolbar.jsp
new file mode 100644
index 0000000..827ebf4
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/searchToolbar.jsp
@@ -0,0 +1,16 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+
+<jsp:include page="toolbar.jsp">
+ <jsp:param name="view" value="search"/>
+</jsp:include>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/searchView.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/searchView.jsp
new file mode 100644
index 0000000..b154f11
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/searchView.jsp
@@ -0,0 +1,104 @@
+<%--
+ Copyright (c) 2000, 2006 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+<%
+ SearchData data = new SearchData(application, request, response);
+ WebappPreferences prefs = data.getPrefs();
+ LayoutData ldata = new LayoutData(application,request, response);
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="Pragma" content="no-cache">
+<meta http-equiv="Expires" content="-1">
+
+<%
+if (data.isProgressRequest()) {
+%>
+ <meta HTTP-EQUIV="REFRESH" CONTENT="2;URL=<%="searchView.jsp?"+request.getQueryString()%>">
+<%
+}
+%>
+
+<title><%=ServletResources.getString("SearchResults", request)%></title>
+<base target="ContentViewFrame">
+</head>
+
+<body dir="<%=direction%>" bgcolor="<%=prefs.getBasicViewBackground()%>">
+<%
+if (data.isProgressRequest()) {
+%>
+<table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ <%=ServletResources.getString("Indexing", request)%>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <%=data.getIndexedPercentage()%>% <%=ServletResources.getString("complete", request)%>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <br>
+ <%=ServletResources.getString("IndexingPleaseWait", request)%>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
+
+<%
+ return;
+} else {
+%>
+ <%@ include file="advanced.inc"%>
+<%
+ if (data.isSearchRequest()) {
+ if (data.getResultsCount() == 0){
+ out.write(ServletResources.getString("Nothing_found", request));
+ } else {
+%>
+
+<table border="0" cellpadding="0" cellspacing="0">
+<%
+ //boolean disabledSearchResults = false;
+ for (int topic = 0; topic < data.getResultsCount(); topic++){
+ // if(!data.isEnabled(topic)){
+ // continue;
+ // }
+%>
+<tr>
+ <td align='<%=isRTL?"left":"right"%>'><img src="<%=prefs.getImagesDirectory()%>/topic.gif" alt=""/></td>
+ <td align='<%=isRTL?"right":"left"%>' nowrap>
+
+ <a <%=("a"+topic).equals(data.getSelectedTopicId())?" name=\"selectedItem\" ":""%>
+ href='<%=data.getTopicHref(topic)%>'
+ title="<%=data.getTopicTocLabel(topic)%>">
+ <%=data.getTopicLabel(topic)%>
+ </a>
+ </td>
+</tr>
+<%
+ }
+%>
+</table>
+<%
+ }
+ }
+}
+
+%>
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/tabs.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/tabs.jsp
new file mode 100644
index 0000000..a6f364c
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/tabs.jsp
@@ -0,0 +1,100 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+<%
+ LayoutData data = new LayoutData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+ View[] views = data.getViews();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("Tabs", request)%></title>
+
+<base target="ViewsFrame">
+<SCRIPT TYPE="text/javascript">
+<!--
+function resynch()
+{
+ var topic = parent.HelpFrame.ContentViewFrame.window.location.href;
+ // remove the query, if any
+ var i = topic.indexOf('?');
+ if (i != -1)
+ topic = topic.substring(0, i);
+ // remove the fragment, if any
+ var i = topic.indexOf('#');
+ if (i != -1)
+ topic = topic.substring(0, i);
+ parent.HelpFrame.ViewsFrame.location="view.jsp?view=toc&topic="+topic;
+}
+//-->
+</SCRIPT>
+</head>
+
+<body dir="<%=direction%>" bgcolor="<%=prefs.getBasicToolbarBackground()%>" link="#0000FF" vlink="#0000FF" alink="#0000FF">
+ <table align="<%=isRTL?"right":"left"%>" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+
+<%
+ for (int i=0; i<views.length; i++)
+ {
+ // do not show booksmarks view
+ if("bookmarks".equals(views[i].getName())){
+ continue;
+ }
+
+ // search view is not called "advanced view"
+ String title = ServletResources.getString(views[i].getName(), request);
+ if("search".equals(views[i].getName())){
+ title=ServletResources.getString("Search", request);
+ }
+
+ String viewHref="view.jsp?view="+views[i].getName();
+ // always pass query string to "links view"
+ if("links".equals(views[i].getName())){
+ viewHref=viewHref+(request.getQueryString()!=null?"&"+request.getQueryString():"");
+ }
+
+%>
+ <td nowrap>
+ <b>
+ <a href='<%=viewHref%>' >
+ <img alt="<%=title%>"
+ title="<%=title%>"
+ src="<%=views[i].getOnImage()%>" border=0>
+
+ <%=title%>
+ </a>
+
+ </b>
+ </td>
+<%
+ }
+%>
+ </tr>
+ </table>
+
+<SCRIPT TYPE="text/javascript">
+<!--
+document.write("<table align=\"<%=isRTL?"left":"right"%>\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td nowrap><b><a href='javascript:parent.parent.TabsFrame.resynch();' >");
+document.write("<img alt=\"\" title=\"<%=ServletResources.getString("Synch", request)%>\" src=\"images/e_synch_toc_nav.gif\" border=0> ");
+document.write("<%=ServletResources.getString("shortSynch", request)%></a> </b></td></tr></table>");
+//-->
+</SCRIPT>
+
+ <iframe name="liveHelpFrame" title="<%=ServletResources.getString("ignore", "liveHelpFrame", request)%>" frameborder="no" width="0" height="0" scrolling="no">
+ <layer name="liveHelpFrame" frameborder="no" width="0" height="0" scrolling="no"></layer>
+ </iframe>
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/tocToolbar.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/tocToolbar.jsp
new file mode 100644
index 0000000..af65696
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/tocToolbar.jsp
@@ -0,0 +1,16 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+
+
+<jsp:include page="toolbar.jsp">
+ <jsp:param name="view" value="toc"/>
+</jsp:include>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/tocView.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/tocView.jsp
new file mode 100644
index 0000000..caa2dd0
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/tocView.jsp
@@ -0,0 +1,79 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+<%
+ TocData data = new TocData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("Content", request)%></title>
+
+<base target="ContentViewFrame">
+</head>
+
+
+<body dir="<%=direction%>" bgcolor="<%=prefs.getBasicViewBackground()%>">
+<table border="0" cellpadding="0" cellspacing="0">
+<%
+ for (int toc=0; toc<data.getTocCount(); toc++) {
+ boolean isSelected =data.getSelectedToc() != -1 &&
+ data.getTocHref(data.getSelectedToc()).equals(data.getTocHref(toc));
+ //if(!data.isEnabled(toc) && !isSelected){
+ // do not show
+ // continue;
+ //}
+ String icon = isSelected ?
+ prefs.getImagesDirectory()+"/toc_open.gif" :
+ prefs.getImagesDirectory()+"/toc_closed.gif";
+ String alt = isSelected ?
+ ServletResources.getString("bookOpen", request) :
+ ServletResources.getString("bookClosed", request) ;
+%>
+ <tr>
+ <td align='<%=isRTL?"right":"left"%>' nowrap>
+<%
+ if(isSelected){
+%>
+ <b><img src="<%=icon%>" alt="<%=alt%>"><a href="<%=data.getTocDescriptionTopic(toc)%>" target="ContentViewFrame"> <%=data.getTocLabel(toc)%></a></b>
+<%
+ }else{
+%>
+ <b><img src="<%=icon%>" alt="<%=alt%>"><a href="<%="tocView.jsp?toc="+data.getTocHref(toc)%>" target='_self'> <%=data.getTocLabel(toc)%></a></b>
+<%
+ }
+%>
+ </td>
+ </tr>
+<%
+ // Only generate the selected toc
+ if (isSelected) {
+%>
+ <tr>
+ <td align='<%=isRTL?"right":"left"%>' nowrap>
+ <ul>
+<%
+ data.generateBasicToc(toc, out);
+%>
+ </ul>
+ </td>
+ </tr>
+<%
+ }
+ }
+%>
+</table>
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/toolbar.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/toolbar.jsp
new file mode 100644
index 0000000..b05d615
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/toolbar.jsp
@@ -0,0 +1,39 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+<%
+ ToolbarData data = new ToolbarData(application,request, response);
+ WebappPreferences prefs = data.getPrefs();
+%>
+
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<title><%=ServletResources.getString("Toolbar", request)%></title>
+</head>
+
+<body dir="<%=direction%>" bgcolor="<%=prefs.getBasicToolbarBackground()%>">
+<%
+ String title=data.getTitle();
+ // search view is not called "advanced view"
+ if("search".equals(request.getParameter("view"))){
+ title=ServletResources.getString("Search", request);
+ }
+%>
+ <b>
+ <%=title%>
+ </b>
+
+</body>
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/view.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/view.jsp
new file mode 100644
index 0000000..77562e9
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/basic/view.jsp
@@ -0,0 +1,31 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+<%
+ LayoutData data = new LayoutData(application,request, response);
+ View view = data.getCurrentView();
+ if (view == null) return;
+%>
+
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title><%=ServletResources.getString(view.getName(), request)%></title>
+</head>
+
+<frameset rows="30,*" >
+ <frame name="<%=view.getName()%>ToolbarFrame" title="<%=ServletResources.getString(view.getName()+"ViewToolbar", request)%>" src='<%=view.getURL()+view.getName()+"Toolbar.jsp"%>' frameborder="no" marginwidth="5" marginheight="3" scrolling="no">
+ <frame name='<%=view.getName()%>ViewFrame' title="<%=ServletResources.getString(view.getName()+"View", request)%>" src='<%=view.getURL()+view.getName()+"View.jsp?"+request.getQueryString()%>#selectedItem' frameborder="no" marginwidth="5" marginheight="5">
+</frameset>
+
+</html>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/index.jsp b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/index.jsp
new file mode 100644
index 0000000..e71d829
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/index.jsp
@@ -0,0 +1,41 @@
+<%--
+ Copyright (c) 2000, 2004 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ IBM Corporation - initial API and implementation
+--%>
+<%@ page import="org.eclipse.help.internal.webapp.data.*" errorPage="/advanced/err.jsp" contentType="text/html; charset=UTF-8"%>
+<%
+ request.setCharacterEncoding("UTF-8");
+
+ if (request.getParameter("noscript") != null) {
+ request.getRequestDispatcher("/basic/index.jsp").forward(request, response);
+ return;
+ }
+
+ RequestData data = new RequestData(application,request, response);
+ if(data.isBot()){
+ TocData tData = new TocData(application,request, response);
+ LayoutData lData = new LayoutData(application,request, response);
+%>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title><%=lData.getWindowTitle()%></title>
+</head>
+<body>
+<% tData.generateLinks(out); %>
+</body>
+</html>
+<%
+ }else if(data.isAdvancedUI()){
+ request.getRequestDispatcher("/advanced/index.jsp").forward(request, response);
+ }else{
+ request.getRequestDispatcher("/basic/index.jsp").forward(request, response);
+ }
+%>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/plugin.properties b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/plugin.properties
new file mode 100644
index 0000000..1dd144b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/plugin.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2000, 2005 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+help_webapp_plugin_name = Help System Webapp
+providerName=Eclipse.org
+
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/plugin.xml b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/plugin.xml
new file mode 100644
index 0000000..41fd612
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.help.base.webapp">
+ <webapp
+ default="true">
+ </webapp>
+ </extension>
+
+</plugin>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/webapp.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/webapp.jar
new file mode 100644
index 0000000..ae7a1f2
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help.webapp_3.2.1.R321_v20060803/webapp.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.help_3.2.1.R321_v20060920.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.help_3.2.1.R321_v20060920.jar
new file mode 100644
index 0000000..a75c6ce
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.help_3.2.1.R321_v20060920.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.jface.databinding_1.0.0.I20060605-1400.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.jface.databinding_1.0.0.I20060605-1400.jar
new file mode 100644
index 0000000..d9f433b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.jface.databinding_1.0.0.I20060605-1400.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.jface.text_3.2.1.r321_v20060810.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.jface.text_3.2.1.r321_v20060810.jar
new file mode 100644
index 0000000..a9adfb4
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.jface.text_3.2.1.r321_v20060810.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.jface_3.2.1.M20060908-1000.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.jface_3.2.1.M20060908-1000.jar
new file mode 100644
index 0000000..b9f0a85
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.jface_3.2.1.M20060908-1000.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.osgi_3.2.1.R32x_v20060919.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.osgi_3.2.1.R32x_v20060919.jar
new file mode 100644
index 0000000..553568c
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.osgi_3.2.1.R32x_v20060919.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.rcp_3.2.0.v20060605.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.rcp_3.2.0.v20060605.jar
new file mode 100644
index 0000000..65515c0
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.rcp_3.2.0.v20060605.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/META-INF/MANIFEST.MF b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..6ddd94a
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Eclipse-AutoStart: true
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-ManifestVersion: 2
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.sdk; singleton:=true
+Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",org.ecli
+ pse.help.ui;bundle-version="[3.2.0,4.0.0)",org.eclipse.help.base;bund
+ le-version="[3.1.0,4.0.0)",org.eclipse.ui.cheatsheets;bundle-version=
+ "[3.2.0,4.0.0)"
+Bundle-Version: 3.2.1.r321_v20060705
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/META-INF/eclipse.inf b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/META-INF/eclipse.inf
new file mode 100644
index 0000000..45a8f15
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/META-INF/eclipse.inf
@@ -0,0 +1,2 @@
+#Thu Sep 21 11:41:42 EDT 2006
+pack200.conditioned=true
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/about.html b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/about.html
new file mode 100644
index 0000000..4602330
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 2, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/about.ini b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/about.ini
new file mode 100644
index 0000000..188896b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/about.ini
@@ -0,0 +1,31 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=eclipse32.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
+
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/about.mappings b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/about.mappings
new file mode 100644
index 0000000..fce47a5
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=M20060921-0945
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/about.properties b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/about.properties
new file mode 100644
index 0000000..85a807b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/about.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 2000, 2005 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Eclipse Project SDK\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright Eclipse contributors and others 2000, 2006. All rights reserved.\n\
+Visit http://www.eclipse.org/eclipse
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/book.css b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/book.css
new file mode 100644
index 0000000..1ecf145
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/book.css
@@ -0,0 +1,112 @@
+P.Code {
+ display: block;
+ text-align: left;
+ text-indent: 0.00pt;
+ margin-top: 0.000000pt;
+ margin-bottom: 0.000000pt;
+ margin-right: 0.000000pt;
+ margin-left: 15pt;
+ font-size: 10.000000pt;
+ font-weight: normal;
+ font-style: normal;
+ color: #4444CC;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+ font-family: "Courier New", Courier, monospace;
+}
+H6.CaptionFigColumn {
+ display: block;
+ text-align: left;
+ text-indent: 0.000000pt;
+ margin-top: 3.000000pt;
+ margin-bottom: 11.000000pt;
+ margin-right: 0.000000pt;
+ margin-left: 0.000000pt;
+ font-size: 9.000000pt;
+ font-weight: bold;
+ font-style: Italic;
+ color: #000000;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+}
+P.Note {
+ display: block;
+ text-align: left;
+ text-indent: 0pt;
+ margin-top: 19.500000pt;
+ margin-bottom: 19.500000pt;
+ margin-right: 0.000000pt;
+ margin-left: 30pt;
+ font-size: 11.000000pt;
+ font-weight: normal;
+ font-style: Italic;
+ color: #000000;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+}
+EM.UILabel {
+ font-weight: Bold;
+ font-style: normal;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+}
+EM.CodeName {
+ font-weight: Bold;
+ font-style: normal;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+ font-family: "Courier New", Courier, monospace;
+}
+
+body, html { border: 0px }
+
+
+/* following font face declarations need to be removed for DBCS */
+
+body, h1, h2, h3, h4, h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt {font-family: Arial, Helvetica, sans-serif; color: #000000}
+pre { font-family: "Courier New", Courier, monospace;}
+
+/* end font face declarations */
+
+/* following font size declarations should be OK for DBCS */
+body, h1, h2, h3, h4, h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt {font-size: 10pt; }
+pre { font-size: 10pt}
+
+/* end font size declarations */
+
+body { background: #FFFFFF; margin-bottom: 1em }
+h1 { font-size: 18pt; margin-top: 5; margin-bottom: 1 }
+h2 { font-size: 14pt; margin-top: 25; margin-bottom: 3 }
+h3 { font-size: 11pt; margin-top: 20; margin-bottom: 3 }
+h4 { font-size: 10pt; margin-top: 20; margin-bottom: 3; font-style: italic }
+p { margin-top: 10px; margin-bottom: 10px }
+pre { margin-left: 6; font-size: 9pt; color: #4444CC }
+a:link { color: #0000FF }
+a:hover { color: #000080 }
+a:visited { text-decoration: underline }
+ul { margin-top: 10px; margin-bottom: 10px; }
+li { margin-top: 5px; margin-bottom: 5px; }
+li p { margin-top: 5px; margin-bottom: 5px; }
+ol { margin-top: 10px; margin-bottom: 10px; }
+dl { margin-top: 10px; margin-bottom: 10px; }
+dt { margin-top: 5px; margin-bottom: 5px; font-weight: bold; }
+dd { margin-top: 5px; margin-bottom: 5px; }
+strong { font-weight: bold}
+em { font-style: italic}
+var { font-style: italic}
+div.revision { border-left-style: solid; border-left-width: thin;
+ border-left-color: #7B68EE; padding-left:5 }
+th { font-weight: bold }
+
+a.command-link {
+}
+a.command-link img {
+ border-width: 0px;
+ border-style: none;
+ vertical-align: middle;
+}
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/disabled_book.css b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/disabled_book.css
new file mode 100644
index 0000000..5abd004
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/disabled_book.css
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse.gif
new file mode 100644
index 0000000..7d7e32b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse.png b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse.png
new file mode 100644
index 0000000..25e3bb5
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse.png
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse32.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse32.gif
new file mode 100644
index 0000000..811eccb
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse32.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse32.png b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse32.png
new file mode 100644
index 0000000..568fac1
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse32.png
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse48.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse48.gif
new file mode 100644
index 0000000..80a40d6
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse48.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse48.png b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse48.png
new file mode 100644
index 0000000..1c939c8
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse48.png
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse_lg.gif b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse_lg.gif
new file mode 100644
index 0000000..bf8b872
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/eclipse_lg.gif
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/intro-eclipse.png b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/intro-eclipse.png
new file mode 100644
index 0000000..0661268
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/intro-eclipse.png
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/introData.xml b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/introData.xml
new file mode 100644
index 0000000..2b1c002
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/introData.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<extensions>
+ <page id="tutorials">
+ <group path="page-content/bottom-left" default="true">
+ </group>
+ <group path="page-content/bottom-right" default="true">
+ </group>
+ <group path="page-content/top-left">
+ <extension id="org.eclipse.jdt" importance="low"/>
+ <extension id="org.eclipse.team" importance="low"/>
+ </group>
+ <group path="page-content/top-right">
+ <extension id="org.eclipse.pde" importance="low"/>
+ </group>
+ </page>
+ <page id="whatsnew">
+ <group path="page-content/bottom-left" default="true">
+ </group>
+ <group path="page-content/bottom-right" default="true">
+ </group>
+ <group path="page-content/top-left">
+ <extension id="org.eclipse.ui.workbench.news" importance="low"/>
+ <extension id="org.eclipse.jdt" importance="low"/>
+ <extension id="org.eclipse.pde.changes" importance="low"/>
+ <extension id="org.eclipse.ui.workbench.migration" importance="callout"/>
+ </group>
+ <group path="page-content/top-right">
+ <extension id="org.eclipse.ui.workbench" importance="low"/>
+ </group>
+ </page>
+ <page id="samples">
+ <group path="page-content/bottom-left" default="true">
+ </group>
+ <group path="page-content/bottom-right" default="true">
+ </group>
+ <group path="page-content/top-left">
+ <extension id="org.eclipse.pde.workbench" importance="low"/>
+ </group>
+ <group path="page-content/top-right">
+ <extension id="org.eclipse.jdt" importance="low"/>
+ <extension id="org.eclipse.pde.swt" importance="low"/>
+ </group>
+ </page>
+ <page id="overview">
+ <group path="page-content/bottom-left" default="true">
+ </group>
+ <group path="page-content/bottom-right" default="true">
+ </group>
+ <group path="page-content/top-left">
+ <extension id="org.eclipse.ui.workbench" importance="low"/>
+ </group>
+ <group path="page-content/top-right">
+ <extension id="org.eclipse.jdt" importance="low"/>
+ <extension id="org.eclipse.pde" importance="low"/>
+ </group>
+ </page>
+</extensions>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/macosx_narrow_book.css b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/macosx_narrow_book.css
new file mode 100644
index 0000000..344e5e4
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/macosx_narrow_book.css
@@ -0,0 +1 @@
+h1,h2 { color: Black }
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/narrow_book.css b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/narrow_book.css
new file mode 100644
index 0000000..5a19bf3
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/narrow_book.css
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/plugin.properties b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/plugin.properties
new file mode 100644
index 0000000..5e30c03
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/plugin.properties
@@ -0,0 +1,74 @@
+###############################################################################
+# Copyright (c) 2000, 2006 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+pluginName=Eclipse Project SDK
+providerName=Eclipse.org
+
+productName=Eclipse SDK
+productBlurb=Eclipse SDK\n\
+\n\
+Version: 3.2.1\n\
+Build id: {0}\n\
+\n\
+(c) Copyright Eclipse contributors and others 2000, 2006. All rights reserved.\n\
+Visit http://www.eclipse.org/platform\n\
+\n\
+This product includes software developed by the\n\
+Apache Software Foundation http://www.apache.org/
+
+activity.java=Java Development
+activity.java.desc=Develop Java applications.
+activity.plugin=Plug-in Development
+activity.plugin.desc=Develop plug-ins, fragments, and features for Eclipse.
+
+activity.team.cvs=CVS Support
+activity.team.cvs.desc=Use the Concurrent Versions System (CVS) to manage resources.
+activity.team=Core Team Support
+activity.team.desc=Share projects using configuration management systems.
+
+activity.cat.development=Development
+activity.cat.development.desc=Use the Eclipse SDK to develop applications.
+activity.cat.team=Team
+activity.cat.team.desc=Use configuration management systems to manage resources.
+
+PreferencePages.Capabilities = Capabilities
+PreferencePages.Capabilities.activityName = &Capabilities
+PreferencePages.Capabilities.categoryName = &Capabilities
+PreferencePages.Capabilities.activityPromptButton = &Prompt when enabling capabilities
+PreferencePages.Capabilities.activityPromptButtonTooltip = Prompt when a feature is first used that requires enablement of capabilities
+PreferencePages.Capabilities.captionMessage = Capabilities allow you to enable or disable various product components. These capabilities are grouped according to a set of predefined categories.
+
+helpActivitySupport.showAllMessage = While showing all topics, documentation about disabled capabilities is also shown in the table of contents and search results. Some documents may refer to user interface elements that are not visible. To manually enable capabilities, use the "General -> Capabilities" preference page.
+helpActivitySupport.documentMessage = This topic belongs to a capability that \
+is currently disabled. It may refer to user interface elements that are \
+not visible.<br><br>\
+To manually enable capabilities, use\
+ <a href='ACTIVITY_EDITOR'>Capabilities preference page.</a>
+
+TriggerPointAdvisor.proceedMulti = Enable the selected capabilities?
+TriggerPointAdvisor.proceedSingle = Enable the required capability?
+TriggerPointAdvisor.dontAsk = &Always enable capabilities and don't ask me again
+TriggerPointAdvisor.noDetails = Select a capability to view its description.
+
+search.Google.label = Google
+search.Google.desc = Performs a Google web search
+
+search.Eclipse.label = Eclipse.org
+search.Eclipse.desc = Searches mailing lists, news groups, articles and other documents on Eclipse.org
+
+CHEAT_SHEETS = Cheat Sheets
+CHEAT_SHEETS_MENU = &Cheat Sheets...
+
+productIntroTitle = Welcome to Eclipse 3.2.1
+productIntroBrandingText = Eclipse Project
+introDescription-overview = Eclipse is a kind of universal tool platform - an open extensible IDE for anything and nothing in particular. It provides a feature-rich development environment that allows the developer to efficiently create tools that integrate seamlessly into the Eclipse Platform.
+introDescription-tutorials = Learn how to be productive using Eclipse by completing end-to-end tutorials that will guide you along the way.
+introDescription-samples = Explore Eclipse by installing prefabricated samples (may require an Internet connection).
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/plugin.xml b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/plugin.xml
new file mode 100644
index 0000000..4bd5ed6
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/plugin.xml
@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension id="ide" point="org.eclipse.core.runtime.products">
+ <product name="%productName" application="org.eclipse.ui.ide.workbench" description="%productBlurb">
+ <property name="windowImages" value="eclipse.gif,eclipse32.gif,eclipse48.gif,eclipse.png,eclipse32.png,eclipse48.png"/>
+ <property name="aboutImage" value="eclipse_lg.gif"/>
+ <property name="aboutText" value="%productBlurb"/>
+ <property name="appName" value="Eclipse"/>
+ <property name="preferenceCustomization" value="plugin_customization.ini"/>
+ <property
+ name="startupForegroundColor"
+ value="C8D5EA"/>
+ <property
+ name="startupMessageRect"
+ value="7,220,441,20"/>
+ <property
+ name="startupProgressRect"
+ value="0,280,455,15"/>
+ <property
+ name="introTitle"
+ value="%productIntroTitle"/>
+ <property
+ name="introBrandingImage"
+ value="product:intro-eclipse.png"/>
+ <property
+ name="introBrandingImageText"
+ value="%productIntroBrandingText"/>
+ <property
+ name="introDescription-overview"
+ value="%introDescription-overview"/>
+ <property
+ name="introDescription-tutorials"
+ value="%introDescription-tutorials"/>
+ <property
+ name="introDescription-samples"
+ value="%introDescription-samples"/>
+ </product>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.intro">
+ <introProductBinding
+ introId="org.eclipse.ui.intro.universal"
+ productId="org.eclipse.sdk.ide">
+ </introProductBinding>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.activities">
+
+ <activity
+ name="%activity.java"
+ description="%activity.java.desc"
+ id="org.eclipse.javaDevelopment">
+ </activity>
+
+ <activity
+ name="%activity.plugin"
+ description="%activity.plugin.desc"
+ id="org.eclipse.plugInDevelopment">
+ </activity>
+
+ <activityRequirementBinding
+ activityId="org.eclipse.plugInDevelopment"
+ requiredActivityId="org.eclipse.javaDevelopment">
+ </activityRequirementBinding>
+
+ <activity
+ name="%activity.team.cvs"
+ description="%activity.team.cvs.desc"
+ id="org.eclipse.team.cvs">
+ </activity>
+
+ <activity
+ name="%activity.team"
+ description="%activity.team.desc"
+ id="org.eclipse.team">
+ </activity>
+
+ <activityRequirementBinding
+ activityId="org.eclipse.team.cvs"
+ requiredActivityId="org.eclipse.team">
+ </activityRequirementBinding>
+
+ <activityPatternBinding
+ activityId="org.eclipse.javaDevelopment"
+ pattern="org\.eclipse\.jdt\.debug/debugModel">
+ </activityPatternBinding>
+
+ <activityPatternBinding
+ activityId="org.eclipse.javaDevelopment"
+ pattern="org\.eclipse\.jdt\..*/.*">
+ </activityPatternBinding>
+
+ <activityPatternBinding
+ activityId="org.eclipse.javaDevelopment"
+ pattern="org\.eclipse\.jdt/.*">
+ </activityPatternBinding>
+
+ <activityPatternBinding
+ activityId="org.eclipse.javaDevelopment"
+ pattern="org\.eclipse\.jdt\.core/javanature">
+
+ </activityPatternBinding>
+
+ <activityPatternBinding
+ activityId="org.eclipse.plugInDevelopment"
+ pattern="org\.eclipse\.pde\..*/.*">
+ </activityPatternBinding>
+
+ <activityPatternBinding
+ activityId="org.eclipse.plugInDevelopment"
+ pattern="org\.eclipse\.pde/.*">
+ </activityPatternBinding>
+
+ <activityPatternBinding
+ activityId="org.eclipse.plugInDevelopment"
+ pattern="org\.eclipse\.pde/PluginNature">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.eclipse.team"
+ pattern="org\.eclipse\.team\.ui/org.*">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.eclipse.team"
+ pattern="org\.eclipse\.compare/compareWithPatch">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.eclipse.team.cvs"
+ pattern="org\.eclipse\.team\.cvs\.ui/.*">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.eclipse.team.cvs"
+ pattern="org\.eclipse\.team\.cvs\.core/.*cvsnature">
+ </activityPatternBinding>
+
+ <category
+ name="%activity.cat.development"
+ description="%activity.cat.development.desc"
+ id="org.eclipse.categories.developmentCategory">
+ </category>
+
+ <category
+ name="%activity.cat.team"
+ description="%activity.cat.team.desc"
+ id="org.eclipse.categories.teamCategory">
+
+ </category>
+
+ <categoryActivityBinding
+ activityId="org.eclipse.javaDevelopment"
+ categoryId="org.eclipse.categories.developmentCategory">
+ </categoryActivityBinding>
+
+ <categoryActivityBinding
+ activityId="org.eclipse.plugInDevelopment"
+ categoryId="org.eclipse.categories.developmentCategory">
+ </categoryActivityBinding>
+
+ <categoryActivityBinding
+ activityId="org.eclipse.team"
+ categoryId="org.eclipse.categories.teamCategory">
+ </categoryActivityBinding>
+
+ <categoryActivityBinding
+ activityId="org.eclipse.team.cvs"
+ categoryId="org.eclipse.categories.teamCategory">
+ </categoryActivityBinding>
+
+ <!-- bind all elements that start with "org" -->
+
+ <defaultEnablement
+ id="org.eclipse.javaDevelopment">
+ </defaultEnablement>
+
+ <defaultEnablement
+ id="org.eclipse.plugInDevelopment">
+ </defaultEnablement>
+
+ <defaultEnablement
+ id="org.eclipse.team">
+ </defaultEnablement>
+
+ <defaultEnablement
+ id="org.eclipse.team.cvs">
+ </defaultEnablement>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <primaryWizard
+ id="org.eclipse.jdt.ui.wizards.JavaProjectWizard">
+ </primaryWizard>
+ <primaryWizard
+ id="org.eclipse.pde.ui.NewProjectWizard">
+ </primaryWizard>
+ <primaryWizard
+ id="org.eclipse.jdt.ui.wizards.NewClassCreationWizard">
+ </primaryWizard>
+ <primaryWizard
+ id="org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard">
+ </primaryWizard>
+ <primaryWizard
+ id="org.eclipse.ant.ui.wizards.JavaProjectWizard">
+ </primaryWizard>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.ui.preferencePages.Workbench"
+ name="%PreferencePages.Capabilities"
+ id="org.eclipse.sdk.capabilities">
+ <class class="org.eclipse.ui.activities.ActivityCategoryPreferencePage">
+ <parameter name="allowAdvanced" value="true"/>
+ <parameter name="captionMessage" value="%PreferencePages.Capabilities.captionMessage" />
+ <parameter name="activityName" value="%PreferencePages.Capabilities.activityName" />
+ <parameter name="categoryName" value="%PreferencePages.Capabilities.categoryName" />
+ <parameter name="activityPromptButton" value="%PreferencePages.Capabilities.activityPromptButton"/>
+ <parameter name="activityPromptButtonTooltip" value="%PreferencePages.Capabilities.activityPromptButtonTooltip"/>
+ </class>
+ </page>
+ </extension>
+
+ <extension
+ point="org.eclipse.help.base.activitySupport">
+ <support productId="org.eclipse.sdk.ide">
+ <showAllMessage>
+ %helpActivitySupport.showAllMessage
+ </showAllMessage>
+ <documentMessage
+ class="org.eclipse.help.ui.internal.ShowCapabilitiesPreferenceAction"
+ pluginId="org.eclipse.help.ui">
+ %helpActivitySupport.documentMessage
+ </documentMessage>
+ </support>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.activitySupport">
+ <triggerPointAdvisor
+ id="org.eclipse.ui.ide.triggerPointAdvisor">
+ <class class="org.eclipse.ui.activities.WorkbenchTriggerPointAdvisor">
+ <parameter name="proceedMulti" value="%TriggerPointAdvisor.proceedMulti" />
+ <parameter name="proceedSingle" value="%TriggerPointAdvisor.proceedSingle" />
+ <parameter name="dontAsk" value="%TriggerPointAdvisor.dontAsk" />
+ <parameter name="noDetails" value="%TriggerPointAdvisor.noDetails" />
+ </class>
+ </triggerPointAdvisor>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.activitySupport">
+ <triggerPointAdvisorProductBinding
+ productId="org.eclipse.sdk.ide"
+ triggerPointAdvisorId="org.eclipse.ui.ide.triggerPointAdvisor"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.help.ui.searchEngine">
+ <engine
+ enabled="true"
+ engineTypeId="org.eclipse.help.ui.web"
+ id="org.eclipse.sdk.Google"
+ label="%search.Google.label">
+ <description>
+ %search.Google.desc
+ </description>
+ <param
+ name="url"
+ value="http://www.google.com/search?hl=en&q={expression}&btnG=Google+Search&meta=">
+ </param>
+ </engine>
+ <engine
+ enabled="true"
+ engineTypeId="org.eclipse.help.ui.web"
+ id="org.eclipse.sdk.Eclipse"
+ label="%search.Eclipse.label">
+ <description>
+ %search.Eclipse.desc
+ </description>
+ <param
+ name="url"
+ value="http://eclipse.org/search/search.cgi?q={expression}&ul=&ps=20&m=all">
+ </param>
+ </engine>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%CHEAT_SHEETS"
+ visible="true"
+ id="org.eclipse.ui.cheatsheets.actionSet">
+ <action
+ label="%CHEAT_SHEETS_MENU"
+ class="org.eclipse.ui.cheatsheets.CheatSheetExtensionFactory:helpMenuAction"
+ menubarPath="help/group.tutorials"
+ id="org.eclipse.ui.cheatsheets.actions.CheatSheetHelpMenuAction">
+ </action>
+ </actionSet>
+ </extension>
+
+</plugin>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/plugin_customization.ini b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/plugin_customization.ini
new file mode 100644
index 0000000..098fd7c
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/plugin_customization.ini
@@ -0,0 +1,34 @@
+# plugin_customization.ini
+# sets default values for plug-in-specific preferences
+# keys are qualified by plug-in id
+# e.g., com.example.acmeplugin/myproperty=myvalue
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in plugin_customization.properties
+# This file does not need to be translated.
+
+# Property "org.eclipse.ui/defaultPerspectiveId" controls the
+# perspective that the workbench opens initially
+org.eclipse.ui/defaultPerspectiveId=org.eclipse.jdt.ui.JavaPerspective
+
+# new-style tabs by default
+org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false
+
+# put the perspective switcher on the top right
+org.eclipse.ui/DOCK_PERSPECTIVE_BAR=topRight
+
+# show progress on startup
+org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP=true
+
+# use the window set by default
+org.eclipse.ui/USE_WINDOW_WORKING_SET_BY_DEFAULT=true
+
+# Intro-related preferences (since 3.2)
+
+# Welcome theme to use
+org.eclipse.ui.intro/INTRO_THEME = org.eclipse.ui.intro.universal.circles
+
+# Root page links to show in the Universal Welcome
+org.eclipse.ui.intro.universal/INTRO_ROOT_PAGES = overview,tutorials,samples,whatsnew
+
+# Initial page layout of the Universal Welcome
+org.eclipse.ui.intro.universal/INTRO_DATA = product:introData.xml
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/plugin_customization.properties b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/plugin_customization.properties
new file mode 100644
index 0000000..4943101
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.sdk_3.2.1.r321_v20060705/plugin_customization.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2000, 2005 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+# plugin_customization.properties
+# contains externalized strings for plugin_customization.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.search_3.2.1.r321_v20060726.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.search_3.2.1.r321_v20060726.jar
new file mode 100644
index 0000000..ec6dd65
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.search_3.2.1.r321_v20060726.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.search_3.2.1.r321_v20060726.plugin.xml b/dependencies/eclipse/3.2/plugins/org.eclipse.search_3.2.1.r321_v20060726.plugin.xml
new file mode 100644
index 0000000..f8597d3
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.search_3.2.1.r321_v20060726.plugin.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!-- ======================================================================= -->
+<!-- Search Plugin -->
+<!-- ======================================================================= -->
+<plugin>
+
+ <!-- Search extension point definitions -->
+
+ <extension-point name="%searchPages" id="searchPages" schema="schema/searchPages.exsd"/>
+ <extension-point name="%searchResultSorters" id="searchResultSorters" schema="schema/searchResultSorters.exsd"/>
+ <extension-point name="%searchResultViewPages" id="searchResultViewPages" schema="schema/searchResultViewPages.exsd"/>
+ <extension-point name="%textSearchEngine" id="textSearchEngine" schema="schema/textSearchEngine.exsd"/>
+ <extension-point name="%textSearchQueryProvider" id="textSearchQueryProvider" schema="schema/textSearchQueryProvider.exsd"/>
+
+
+ <!-- Extensions -->
+
+ <extension point="org.eclipse.ui.commands">
+ <category
+ name="%searchCategory.name"
+ description="%searchCategory.description"
+ id="org.eclipse.search.ui.category.search"
+ />
+
+ <command
+ categoryId="org.eclipse.search.ui.category.search"
+ id="org.eclipse.search.ui.openSearchDialog"
+ name= "%ActionDefinition.openSearchDialog.name"
+ description="%ActionDefinition.openSearchDialog.description"
+ />
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <!-- COMMAND+H is "Hide" on carbon, so don't overwrite it -->
+ <key
+ sequence="Ctrl+H"
+ commandId="org.eclipse.search.ui.openSearchDialog"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ />
+ </extension>
+
+ <extension point="org.eclipse.ui.actionSets">
+ <actionSet
+ id="org.eclipse.search.searchActionSet"
+ label="%search"
+ visible="true">
+
+ <action id="org.eclipse.search.OpenSearchDialog"
+ definitionId="org.eclipse.search.ui.openSearchDialog"
+ toolbarPath="Normal/Search"
+ menubarPath="org.eclipse.search.menu/internalDialogGroup"
+ label="%openSearchDialogAction.label"
+ tooltip="%openSearchDialogAction.tooltip"
+ icon="$nl$/icons/full/etool16/search.gif"
+ helpContextId="open_search_dialog_action_context"
+ class="org.eclipse.search.internal.ui.OpenSearchDialogAction"/>
+
+ </actionSet>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ label="%preferenceKeywords.general"
+ id="org.eclipse.search.ui"/>
+ </extension>
+
+</plugin>
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.swt_3.2.1.v3235e.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.swt_3.2.1.v3235e.jar
new file mode 100644
index 0000000..50fd703
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.swt_3.2.1.v3235e.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.text_3.2.0.v20060605-1400.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.text_3.2.0.v20060605-1400.jar
new file mode 100644
index 0000000..145dcc0
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.text_3.2.0.v20060605-1400.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/META-INF/MANIFEST.MF b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f4f22f5
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-Activator: org.eclipse.tomcat.internal.TomcatPlugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Export-Package: org.eclipse.tomcat.internal;x-internal:=true,org.eclip
+ se.tomcat.internal.extensions;x-internal:=true
+Bundle-Version: 4.1.130.v20060601
+Eclipse-LazyStart: true
+Bundle-Name: %pluginName
+Bundle-ClassPath: tomcatwrapper.jar,catalina.jar,bootstrap.jar,commons
+ -beanutils.jar,commons-collections.jar,commons-digester.jar,commons-l
+ ogging-api.jar,commons-modeler.jar,jakarta-regexp-1.3.jar,jasper-comp
+ iler.jar,jasper-runtime.jar,mx4j-jmx.jar,naming-common.jar,naming-fac
+ tory.jar,naming-resources.jar,servlet.jar,servlets-common.jar,servlet
+ s-default.jar,servlets-invoker.jar,servlets-manager.jar,tomcat-coyote
+ .jar,tomcat-http11.jar,tomcat-util.jar
+Bundle-ManifestVersion: 2
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.tomcat; singleton:=true
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.help.appserver;bundle-version="[3.1.0,4.0.
+ 0)",org.apache.ant;bundle-version="[1.6.5,1.7.0)";resolution:=optiona
+ l,org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)"
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/META-INF/eclipse.inf b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/META-INF/eclipse.inf
new file mode 100644
index 0000000..301526f
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/META-INF/eclipse.inf
@@ -0,0 +1,2 @@
+#Thu Sep 21 11:50:52 EDT 2006
+pack200.conditioned=true
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/about.html b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/about.html
new file mode 100644
index 0000000..a4bdd98
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/about.html
@@ -0,0 +1,171 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 11, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you
+did not receive this Content directly from the Eclipse Foundation, the following is provided
+for informational purposes only, and you should look to the Redistributor’s license for
+terms and conditions of use.</p>
+
+<p>The Content includes items that have been sourced from third parties as follows:</p>
+
+<h4>Tomcat 4.1.30</h4>
+<p>The plug-in is based on software developed by The Apache Software Foundation as part of the Jakarta project. Therefore:</p>
+
+<blockquote>
+This product includes software developed by the Apache Software Foundation (<a href="http://www.apache.org/">http://www.apache.org/</a>).
+</blockquote>
+
+<p>The following files contain Tomcat code and are included without modification:</p>
+
+<ul type="disc">
+ <li>bootstrap.jar</li>
+ <li>catalina.jar</li>
+ <li>commons-beanutils.jar</li>
+ <li>commons-collections.jar</li>
+ <li>commons-digester.jar</li>
+ <li>commons-logging.jar</li>
+ <li>commons-logging-api.jar</li>
+ <li>commons-modeler.jar</li>
+ <li>jakarta-regexp-1.3.jar</li>
+ <li>jasper-compiler.jar</li>
+ <li>jasper-runtime.jar</li>
+ <li>mx4j-jmx.jar</li>
+ <li>naming-common.jar</li>
+ <li>naming-factory.jar</li>
+ <li>naming-resources.jar</li>
+ <li>servlet.jar</li>
+ <li>servlets-common.jar</li>
+ <li>servlets-default.jar</li>
+ <li>servlets-invoker.jar</li>
+ <li>servlets-manager.jar</li>
+ <li>tomcat-coyote.jar</li>
+ <li>tomcat-http11.jar</li>
+ <li>tomcat-util.jar</li>
+ <li>conf/catalina.policy</li>
+ <li>conf/tomcat-users.xml</li>
+</ul>
+
+<p>The file conf/web.xml has been modified. The class EclipseErrorReportValve is based on the class ErrorReportValve.
+The binary code for EclipseErrorReportValve is located in tomcatwrapper.jar and the corresponding source code is located in
+tomcatwrappersrc.zip.</p>
+
+<p>Tomcat is:</p>
+
+<blockquote>Copyright (c) 1999, 2000 The Apache Software Foundation. All rights reserved.</blockquote>
+
+<p>Your use of the Tomcat code is subject to the terms and conditions of the Apache Software License 1.1 which is available at
+<a href="http://www.apache.org/licenses/LICENSE-1.1">http://www.apache.org/licenses/LICENSE-1.1</a>. More specifically:</p>
+<blockquote>
+ 1. Redistributions of source code must retain the above copyright notice, this list of<br>
+ conditions and the following disclaimer.<br>
+<br>
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of<br>
+ conditions and the following disclaimer in the documentation and/or other materials<br>
+ provided with the distribution.<br>
+<br>
+ 3. The end-user documentation included with the redistribution, if any, must include the<br>
+ following acknowledgment:<br>
+ <blockquote>
+ "This product includes software developed by the Apache Software Foundation<br>
+ (<a href="http://www.apache.org/">http://www.apache.org/</a>)."
+ </blockquote>
+ Alternately, this acknowledgment may appear in the software itself, if and wherever such<br>
+ third-party acknowledgments normally appear.<br>
+<br>
+ 4. The names "The Jakarta Project" "Tomcat" and "Apache Software Foundation"<br>
+ must not be used to endorse or promote products derived from this software without prior<br>
+ written permission. For written permission, please contact <a href="mailto:apache@apache.org">apache@apache.org</a>.<br>
+<br>
+ 5. Products derived from this software may not be called "Apache", nor may "Apache" appear<br>
+ in their name, without prior written permission of the Apache Software Foundation.<br>
+<br>
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<br>
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR<br>
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS<br>
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br>
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR<br>
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON<br>
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING<br>
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF<br>
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</blockquote>
+
+<p>Source code for Tomcat is available at <a href="http://jakarta.apache.org/tomcat/">http://jakarta.apache.org/tomcat/</a>.</p>
+
+<blockquote>
+
+<h4>MX4J 1.1.1</h4>
+
+<p>Tomcat 4.1.30 includes mx4j-jmx.jar from MX4J 1.1.1. MX4J is:</p>
+
+<blockquote>Copyright (c) 2001 MX4J. All rights reserved.</blockquote>
+
+<p>Your use of the MX4J code is subject to the terms and conditions of the MX4J License, Version 1.0, a copy of which is included
+with the Content in the file <a href="about_files/mx4j.license">mx4j.license</a>. More specifically: </p>
+
+<blockquote>
+ 1. Redistributions of source code must retain the above copyright notice, this list of<br>
+ conditions and the following disclaimer.<br>
+<br>
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of<br>
+ conditions and the following disclaimer in the documentation and/or other materials<br>
+ provided with the distribution.<br>
+<br>
+ 3. The end-user documentation included with the redistribution, if any, must include the<br>
+ following acknowledgment:<br>
+ <blockquote>
+ "This product includes software developed by the MX4J project<br>
+ (<a href="http://mx4j.sourceforge.net">http://mx4j.sourceforge.net</a>)."
+ </blockquote>
+ Alternately, this acknowledgment may appear in the software itself, if and wherever such<br>
+ third-party acknowledgments normally appear.<br>
+<br>
+ 4. The names "MX4J" and "mx4j"<br>
+ must not be used to endorse or promote products derived from this software without prior<br>
+ written permission. For written permission, please contact <a href="mailto:biorn_steedom@users.sourceforge.net">biorn_steedom@users.sourceforge.net</a>.<br>
+<br>
+ 5. Products derived from this software may not be called "MX4J", nor may "MX4J" appear<br>
+ in their name, without prior written permission of the Simone Bordet.<br>
+<br>
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<br>
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR<br>
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARLOS QUIROZ OR ITS<br>
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br>
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR<br>
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON<br>
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING<br>
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF<br>
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</blockquote>
+
+<p>Source code for MX4J is available at <a href="http://mx4j.sourceforge.net">http://mx4j.sourceforge.net</a>.</p>
+
+</blockquote>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/about_files/mx4j.license b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/about_files/mx4j.license
new file mode 100644
index 0000000..281ebef
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/about_files/mx4j.license
@@ -0,0 +1,51 @@
+/* ====================================================================
+ * The MX4J License, Version 1.0
+ *
+ * Copyright (c) 2001 MX4J. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * MX4J project (http://mx4j.sourceforge.net)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "MX4J" and "mx4j" must not be used to endorse or promote
+ * products derived from this software without prior written
+ * permission. For written permission, please contact biorn_steedom@users.sourceforge.net
+ *
+ * 5. Products derived from this software may not be called "MX4J",
+ * nor may "MX4J" appear in their name, without prior written
+ * permission of Simone Bordet.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL CARLOS QUIROZ OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of MX4J. For more information on
+ * MX4J, please see
+ * <http://mx4j.sourceforge.net>.
+ */
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/bootstrap.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/bootstrap.jar
new file mode 100644
index 0000000..4c56bd6
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/bootstrap.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/catalina.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/catalina.jar
new file mode 100644
index 0000000..9247a32
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/catalina.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-beanutils.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-beanutils.jar
new file mode 100644
index 0000000..6d29589
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-beanutils.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-collections.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-collections.jar
new file mode 100644
index 0000000..82bbc9b
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-collections.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-digester.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-digester.jar
new file mode 100644
index 0000000..18716c0
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-digester.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-logging-api.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-logging-api.jar
new file mode 100644
index 0000000..f806be7
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-logging-api.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-modeler.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-modeler.jar
new file mode 100644
index 0000000..addaddc
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/commons-modeler.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/conf/catalina.policy b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/conf/catalina.policy
new file mode 100644
index 0000000..3d31a30
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/conf/catalina.policy
@@ -0,0 +1,170 @@
+// ============================================================================
+// catalina.corepolicy - Security Policy Permissions for Tomcat 4.0
+//
+// This file contains a default set of security policies to be enforced (by the
+// JVM) when Catalina is executed with the "-security" option. In addition
+// to the permissions granted here, the following additional permissions are
+// granted to the codebase specific to each web application:
+//
+// * Read access to the document root directory
+//
+// $Id: catalina.policy,v 1.28 2002/09/30 19:59:47 glenn Exp $
+// ============================================================================
+
+
+// ========== SYSTEM CODE PERMISSIONS =========================================
+
+
+// These permissions apply to javac
+grant codeBase "file:${java.home}/lib/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions
+grant codeBase "file:${java.home}/jre/lib/ext/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/../lib/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions when
+// ${java.home} points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/lib/ext/-" {
+ permission java.security.AllPermission;
+};
+
+
+// ========== CATALINA CODE PERMISSIONS =======================================
+
+
+// These permissions apply to the server startup code
+grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the servlet API classes
+// and those that are shared across all class loaders
+// located in the "common" directory
+grant codeBase "file:${catalina.home}/common/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the container's core code, plus any additional
+// libraries installed in the "server" directory
+grant codeBase "file:${catalina.home}/server/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the jasper page compiler.
+grant codeBase "file:${catalina.home}/shared/lib/jasper-compiler.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the jasper JSP runtime
+grant codeBase "file:${catalina.home}/shared/lib/jasper-runtime.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the privileged admin and manager web applications
+grant codeBase "file:${catalina.home}/server/webapps/admin/WEB-INF/classes/-" {
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:${catalina.home}/server/webapps/admin/WEB-INF/lib/struts.jar" {
+ permission java.security.AllPermission;
+};
+
+// ========== WEB APPLICATION PERMISSIONS =====================================
+
+
+// These permissions are granted by default to all web applications
+// In addition, a web application will be given a read FilePermission
+// and JndiPermission for all files and directories in its document root.
+grant {
+ // Required for JNDI lookup of named JDBC DataSource's and
+ // javamail named MimePart DataSource used to send mail
+ permission java.util.PropertyPermission "java.home", "read";
+ permission java.util.PropertyPermission "java.naming.*", "read";
+ permission java.util.PropertyPermission "javax.sql.*", "read";
+
+ // OS Specific properties to allow read access
+ permission java.util.PropertyPermission "os.name", "read";
+ permission java.util.PropertyPermission "os.version", "read";
+ permission java.util.PropertyPermission "os.arch", "read";
+ permission java.util.PropertyPermission "file.separator", "read";
+ permission java.util.PropertyPermission "path.separator", "read";
+ permission java.util.PropertyPermission "line.separator", "read";
+
+ // JVM properties to allow read access
+ permission java.util.PropertyPermission "java.version", "read";
+ permission java.util.PropertyPermission "java.vendor", "read";
+ permission java.util.PropertyPermission "java.vendor.url", "read";
+ permission java.util.PropertyPermission "java.class.version", "read";
+ permission java.util.PropertyPermission "java.specification.version", "read";
+ permission java.util.PropertyPermission "java.specification.vendor", "read";
+ permission java.util.PropertyPermission "java.specification.name", "read";
+
+ permission java.util.PropertyPermission "java.vm.specification.version", "read";
+ permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
+ permission java.util.PropertyPermission "java.vm.specification.name", "read";
+ permission java.util.PropertyPermission "java.vm.version", "read";
+ permission java.util.PropertyPermission "java.vm.vendor", "read";
+ permission java.util.PropertyPermission "java.vm.name", "read";
+
+ // Required for getting BeanInfo
+ permission java.lang.RuntimePermission "accessClassInPackage.sun.beans";
+ permission java.lang.RuntimePermission "accessClassInPackage.sun.beans.*";
+
+ // Required for sevlets and JSP's
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util";
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util.*";
+ permission java.lang.RuntimePermission "defineClassInPackage.org.apache.catalina.util";
+ permission java.lang.RuntimePermission "defineClassInPackage.org.apache.catalina.util.*";
+
+ // Required for running servlets generated by JSPC
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*";
+
+ // Required for OpenJMX
+ permission java.lang.RuntimePermission "getAttribute";
+
+ // Allow read of JAXP compliant XML parser debug
+ permission java.util.PropertyPermission "jaxp.debug", "read";
+};
+
+
+// You can assign additional permissions to particular web applications by
+// adding additional "grant" entries here, based on the code base for that
+// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
+//
+// Different permissions can be granted to JSP pages, classes loaded from
+// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
+// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
+//
+// For instance, assume that the standard "examples" application
+// included a JDBC driver that needed to establish a network connection to the
+// corresponding database and used the scrape taglib to get the weather from
+// the NOAA web server. You might create a "grant" entries like this:
+//
+// The permissions granted to the context root directory apply to JSP pages.
+// grant codeBase "file:${catalina.home}/webapps/examples/-" {
+// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
+// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+//
+// The permissions granted to the context WEB-INF/classes directory
+// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
+// };
+//
+// The permission granted to your JDBC driver
+// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar" {
+// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
+// };
+// The permission granted to the scrape taglib
+// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar" {
+// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/conf/tomcat-users.xml b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/conf/tomcat-users.xml
new file mode 100644
index 0000000..388cfc9
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/conf/tomcat-users.xml
@@ -0,0 +1,10 @@
+<!--
+ NOTE: By default, no user is included in the "manager" role required
+ to operate the "/manager" web application. If you wish to use this app,
+ you must define such a user - the username and password are arbitrary.
+-->
+<tomcat-users>
+ <user name="tomcat" password="tomcat" roles="tomcat" />
+ <user name="role1" password="tomcat" roles="role1" />
+ <user name="both" password="tomcat" roles="tomcat,role1" />
+</tomcat-users>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/conf/web.xml b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/conf/web.xml
new file mode 100644
index 0000000..fc8eae7
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/conf/web.xml
@@ -0,0 +1,894 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+
+ <!-- ======================== Introduction ============================== -->
+ <!-- This document defines default values for *all* web applications -->
+ <!-- loaded into this instance of Tomcat. As each application is -->
+ <!-- deployed, this file is processed, followed by the -->
+ <!-- "/WEB-INF/web.xml" deployment descriptor from your own -->
+ <!-- applications. -->
+ <!-- -->
+ <!-- WARNING: Do not configure application-specific resources here! -->
+ <!-- They should go in the "/WEB-INF/web.xml" file in your application. -->
+
+
+ <!-- ================== Built In Servlet Definitions ==================== -->
+
+
+ <!-- The default servlet for all web applications, that serves static -->
+ <!-- resources. It processes all requests that are not mapped to other -->
+ <!-- servlets with servlet mappings (defined either here or in your own -->
+ <!-- web.xml file. This servlet supports the following initialization -->
+ <!-- parameters (default values are in square brackets): -->
+ <!-- -->
+ <!-- debug Debugging detail level for messages logged -->
+ <!-- by this servlet. [0] -->
+ <!-- -->
+ <!-- input Input buffer size (in bytes) when reading -->
+ <!-- resources to be served. [2048] -->
+ <!-- -->
+ <!-- listings Should directory listings be produced if there -->
+ <!-- is no welcome file in this directory? [true] -->
+ <!-- -->
+ <!-- output Output buffer size (in bytes) when writing -->
+ <!-- resources to be served. [2048] -->
+ <!-- -->
+ <!-- readonly Is this context "read only", so HTTP -->
+ <!-- commands like PUT and DELETE are -->
+ <!-- rejected? [true] -->
+ <!-- -->
+ <!-- encodeRedirects Call encodeRedirectURL() on welcomefile or -->
+ <!-- directory redirects. [false] -->
+
+ <servlet>
+ <servlet-name>default</servlet-name>
+ <servlet-class>
+ org.apache.catalina.servlets.DefaultServlet
+ </servlet-class>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ <init-param>
+ <param-name>listings</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+
+ <!-- The "invoker" servlet, which executes anonymous servlet classes -->
+ <!-- that have not been defined in a web.xml file. Traditionally, this -->
+ <!-- servlet is mapped to URL pattern "/servlet/*", but you can map it -->
+ <!-- to other patterns as well. The extra path info portion of such a -->
+ <!-- request must be the fully qualified class name of a Java class that -->
+ <!-- implements Servlet (or extends HttpServlet), or the servlet name -->
+ <!-- of an existing servlet definition. This servlet supports the -->
+ <!-- following initialization parameters (default values are in square -->
+ <!-- brackets): -->
+ <!-- -->
+ <!-- debug Debugging detail level for messages logged -->
+ <!-- by this servlet. [0] -->
+
+ <servlet>
+ <servlet-name>invoker</servlet-name>
+ <servlet-class>
+ org.apache.catalina.servlets.InvokerServlet
+ </servlet-class>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ <load-on-startup>2</load-on-startup>
+ </servlet>
+
+
+ <!-- The JSP page compiler and execution servlet, which is the mechanism -->
+ <!-- used by Tomcat to support JSP pages. Traditionally, this servlet -->
+ <!-- is mapped to URL patterh "*.jsp". This servlet supports the -->
+ <!-- following initialization parameters (default values are in square -->
+ <!-- brackets): -->
+ <!-- -->
+ <!-- checkInterval If development is false and reloading is true, -->
+ <!-- background compiles are enabled. checkInterval -->
+ <!-- is the time in seconds between checks to see -->
+ <!-- if a JSP page needs to be recompiled. [300] -->
+ <!-- -->
+ <!-- compiler Which compiler Ant should use to compile JSP -->
+ <!-- pages. See the Ant documenation for more -->
+ <!-- information. [javac] -->
+ <!-- -->
+ <!-- classdebuginfo Should the class file be compiled with -->
+ <!-- debugging information? [true] -->
+ <!-- -->
+ <!-- classpath What class path should I use while compiling -->
+ <!-- generated servlets? [Created dynamically -->
+ <!-- based on the current web application] -->
+ <!-- -->
+ <!-- development Is Jasper used in development mode (will check -->
+ <!-- for JSP modification on every access)? [true] -->
+ <!-- -->
+ <!-- enablePooling Determines whether tag handler pooling is -->
+ <!-- enabled [true] -->
+ <!-- -->
+ <!-- ieClassId The class-id value to be sent to Internet -->
+ <!-- Explorer when using <jsp:plugin> tags. -->
+ <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
+ <!-- -->
+ <!-- fork Tell Ant to fork compiles of JSP pages so that -->
+ <!-- a separate JVM is used for JSP page compiles -->
+ <!-- from the one Tomcat is running in. [true] -->
+ <!-- -->
+ <!-- javaEncoding Java file encoding to use for generating java -->
+ <!-- source files. [UTF8] -->
+ <!-- -->
+ <!-- keepgenerated Should we keep the generated Java source code -->
+ <!-- for each page instead of deleting it? [true] -->
+ <!-- -->
+ <!-- largefile Should we store the static content of JSP -->
+ <!-- pages in external data files, to reduce the -->
+ <!-- size of the generated servlets? [false] -->
+ <!-- -->
+ <!-- logVerbosityLevel The level of detailed messages to be produced -->
+ <!-- by this servlet. Increasing levels cause the -->
+ <!-- generation of more messages. Valid values are -->
+ <!-- FATAL, ERROR, WARNING, INFORMATION, and DEBUG. -->
+ <!-- [WARNING] -->
+ <!-- -->
+ <!-- mappedfile Should we generate static content with one -->
+ <!-- print statement per input line, to ease -->
+ <!-- debugging? [false] -->
+ <!-- -->
+ <!-- reloading Should Jasper check for modified JSPs? [true] -->
+ <!-- -->
+ <!-- scratchdir What scratch directory should we use when -->
+ <!-- compiling JSP pages? [default work directory -->
+ <!-- for the current web application] -->
+ <!-- -->
+ <!-- If you wish to use Jikes to compile JSP pages: -->
+ <!-- Set the init parameter "compiler" to "jikes". Define -->
+ <!-- the property "-Dbuild.compiler.emacs=true" when starting Tomcat -->
+ <!-- by adding the above to your CATALINA_OPTS environment variable. -->
+ <!-- If you get an error reporting that jikes can't use UTF8 encoding, -->
+ <!-- try setting the init parameter "javaEncoding" to "ISO-8859-1". -->
+
+ <servlet>
+ <servlet-name>jsp</servlet-name>
+ <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
+ <init-param>
+ <param-name>logVerbosityLevel</param-name>
+ <param-value>WARNING</param-value>
+ </init-param>
+ <init-param>
+ <param-name>fork</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <load-on-startup>3</load-on-startup>
+ </servlet>
+
+
+ <!-- Server Side Includes processing servlet, which processes SSI -->
+ <!-- directives in HTML pages consistent with similar support in web -->
+ <!-- servers like Apache. Traditionally, this servlet is mapped to -->
+ <!-- URL pattern "*.shtml". This servlet supports the following -->
+ <!-- initialization parameters (default values are in square brackets): -->
+ <!-- -->
+ <!-- buffered Should output from this servlet be buffered? -->
+ <!-- (0=false, 1=true) [0] -->
+ <!-- -->
+ <!-- debug Debugging detail level for messages logged -->
+ <!-- by this servlet. [0] -->
+ <!-- -->
+ <!-- expires The number of seconds before a page with SSI -->
+ <!-- directives will expire. [No default] -->
+ <!-- -->
+ <!-- isVirtualWebappRelative -->
+ <!-- Should "virtual" paths be interpreted as -->
+ <!-- relative to the context root, instead of -->
+ <!-- the server root? (0=false, 1=true) [0] -->
+ <!-- -->
+ <!-- -->
+ <!-- IMPORTANT: To use the SSI servlet, you also need to rename the -->
+ <!-- $CATALINA_HOME/server/lib/servlets-ssi.renametojar file -->
+ <!-- to $CATALINA_HOME/server/lib/servlets-ssi.jar -->
+
+<!--
+ <servlet>
+ <servlet-name>ssi</servlet-name>
+ <servlet-class>
+ org.apache.catalina.ssi.SSIServlet
+ </servlet-class>
+ <init-param>
+ <param-name>buffered</param-name>
+ <param-value>1</param-value>
+ </init-param>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ <init-param>
+ <param-name>expires</param-name>
+ <param-value>666</param-value>
+ </init-param>
+ <init-param>
+ <param-name>isVirtualWebappRelative</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ <load-on-startup>4</load-on-startup>
+ </servlet>
+-->
+
+
+ <!-- Common Gateway Includes (CGI) processing servlet, which supports -->
+ <!-- execution of external applications that conform to the CGI spec -->
+ <!-- requirements. Typically, this servlet is mapped to the URL pattern -->
+ <!-- "/cgi-bin/*", which means that any CGI applications that are -->
+ <!-- executed must be present within the web application. This servlet -->
+ <!-- supports the following initialization parameters (default values -->
+ <!-- are in square brackets): -->
+ <!-- -->
+ <!-- cgiPathPrefix The CGI search path will start at -->
+ <!-- webAppRootDir + File.separator + this prefix. -->
+ <!-- [WEB-INF/cgi] -->
+ <!-- -->
+ <!-- clientInputTimeout The time (in milliseconds) to wait for input -->
+ <!-- from the browser before assuming that there -->
+ <!-- is none. [100] -->
+ <!-- -->
+ <!-- debug Debugging detail level for messages logged -->
+ <!-- by this servlet. [0] -->
+ <!-- -->
+ <!-- executable Name of the exectuable used to run the script. -->
+ <!-- [perl] -->
+ <!-- -->
+ <!-- IMPORTANT: To use the CGI servlet, you also need to rename the -->
+ <!-- $CATALINA_HOME/server/lib/servlets-cgi.renametojar file -->
+ <!-- to $CATALINA_HOME/server/lib/servlets-cgi.jar -->
+
+<!--
+ <servlet>
+ <servlet-name>cgi</servlet-name>
+ <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
+ <init-param>
+ <param-name>clientInputTimeout</param-name>
+ <param-value>100</param-value>
+ </init-param>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>6</param-value>
+ </init-param>
+ <init-param>
+ <param-name>cgiPathPrefix</param-name>
+ <param-value>WEB-INF/cgi</param-value>
+ </init-param>
+ <load-on-startup>5</load-on-startup>
+ </servlet>
+-->
+
+
+ <!-- ================ Built In Servlet Mappings ========================= -->
+
+
+ <!-- The servlet mappings for the built in servlets defined above. Note -->
+ <!-- that, by default, the CGI and SSI servlets are *not* mapped. You -->
+ <!-- must uncomment these mappings (or add them to your application's own -->
+ <!-- web.xml deployment descriptor) to enable these services -->
+
+ <!-- The mapping for the default servlet -->
+ <servlet-mapping>
+ <servlet-name>default</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+
+ <!-- The mapping for the invoker servlet -->
+<!--
+ <servlet-mapping>
+ <servlet-name>invoker</servlet-name>
+ <url-pattern>/servlet/*</url-pattern>
+ </servlet-mapping>
+-->
+
+ <!-- The mapping for the JSP servlet -->
+ <servlet-mapping>
+ <servlet-name>jsp</servlet-name>
+ <url-pattern>*.jsp</url-pattern>
+ </servlet-mapping>
+
+ <!-- The mapping for the SSI servlet -->
+<!--
+ <servlet-mapping>
+ <servlet-name>ssi</servlet-name>
+ <url-pattern>*.shtml</url-pattern>
+ </servlet-mapping>
+-->
+
+ <!-- The mapping for the CGI Gateway servlet -->
+<!--
+ <servlet-mapping>
+ <servlet-name>cgi</servlet-name>
+ <url-pattern>/cgi-bin/*</url-pattern>
+ </servlet-mapping>
+-->
+
+
+ <!-- ==================== Default Session Configuration ================= -->
+ <!-- You can set the default session timeout (in minutes) for all newly -->
+ <!-- created sessions by modifying the value below. -->
+
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+
+
+ <!-- ===================== Default MIME Type Mappings =================== -->
+ <!-- When serving static resources, Tomcat will automatically generate -->
+ <!-- a "Content-Type" header based on the resource's filename extension, -->
+ <!-- based on these mappings. Additional mappings can be added here (to -->
+ <!-- apply to all web applications), or in your own application's web.xml -->
+ <!-- deployment descriptor. -->
+
+ <mime-mapping>
+ <extension>abs</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ai</extension>
+ <mime-type>application/postscript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>aif</extension>
+ <mime-type>audio/x-aiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>aifc</extension>
+ <mime-type>audio/x-aiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>aiff</extension>
+ <mime-type>audio/x-aiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>aim</extension>
+ <mime-type>application/x-aim</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>art</extension>
+ <mime-type>image/x-jg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>asf</extension>
+ <mime-type>video/x-ms-asf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>asx</extension>
+ <mime-type>video/x-ms-asf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>au</extension>
+ <mime-type>audio/basic</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>avi</extension>
+ <mime-type>video/x-msvideo</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>avx</extension>
+ <mime-type>video/x-rad-screenplay</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>bcpio</extension>
+ <mime-type>application/x-bcpio</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>bin</extension>
+ <mime-type>application/octet-stream</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>bmp</extension>
+ <mime-type>image/bmp</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>body</extension>
+ <mime-type>text/html</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>cdf</extension>
+ <mime-type>application/x-cdf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>cer</extension>
+ <mime-type>application/x-x509-ca-cert</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>class</extension>
+ <mime-type>application/java</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>cpio</extension>
+ <mime-type>application/x-cpio</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>csh</extension>
+ <mime-type>application/x-csh</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>css</extension>
+ <mime-type>text/css</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>dib</extension>
+ <mime-type>image/bmp</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>doc</extension>
+ <mime-type>application/msword</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>dtd</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>dv</extension>
+ <mime-type>video/x-dv</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>dvi</extension>
+ <mime-type>application/x-dvi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>eps</extension>
+ <mime-type>application/postscript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>etx</extension>
+ <mime-type>text/x-setext</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>exe</extension>
+ <mime-type>application/octet-stream</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>gif</extension>
+ <mime-type>image/gif</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>gtar</extension>
+ <mime-type>application/x-gtar</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>gz</extension>
+ <mime-type>application/x-gzip</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>hdf</extension>
+ <mime-type>application/x-hdf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>hqx</extension>
+ <mime-type>application/mac-binhex40</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>htc</extension>
+ <mime-type>text/x-component</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>htm</extension>
+ <mime-type>text/html</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>html</extension>
+ <mime-type>text/html</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>hqx</extension>
+ <mime-type>application/mac-binhex40</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ief</extension>
+ <mime-type>image/ief</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jad</extension>
+ <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jar</extension>
+ <mime-type>application/java-archive</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>java</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jnlp</extension>
+ <mime-type>application/x-java-jnlp-file</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jpe</extension>
+ <mime-type>image/jpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jpeg</extension>
+ <mime-type>image/jpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jpg</extension>
+ <mime-type>image/jpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>js</extension>
+ <mime-type>text/javascript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jsf</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jspf</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>kar</extension>
+ <mime-type>audio/x-midi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>latex</extension>
+ <mime-type>application/x-latex</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>m3u</extension>
+ <mime-type>audio/x-mpegurl</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mac</extension>
+ <mime-type>image/x-macpaint</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>man</extension>
+ <mime-type>application/x-troff-man</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>me</extension>
+ <mime-type>application/x-troff-me</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mid</extension>
+ <mime-type>audio/x-midi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>midi</extension>
+ <mime-type>audio/x-midi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mif</extension>
+ <mime-type>application/x-mif</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mov</extension>
+ <mime-type>video/quicktime</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>movie</extension>
+ <mime-type>video/x-sgi-movie</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mp1</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mp2</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mp3</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpa</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpe</extension>
+ <mime-type>video/mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpeg</extension>
+ <mime-type>video/mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpega</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpg</extension>
+ <mime-type>video/mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpv2</extension>
+ <mime-type>video/mpeg2</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ms</extension>
+ <mime-type>application/x-wais-source</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>nc</extension>
+ <mime-type>application/x-netcdf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>oda</extension>
+ <mime-type>application/oda</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pbm</extension>
+ <mime-type>image/x-portable-bitmap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pct</extension>
+ <mime-type>image/pict</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pdf</extension>
+ <mime-type>application/pdf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pgm</extension>
+ <mime-type>image/x-portable-graymap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pic</extension>
+ <mime-type>image/pict</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pict</extension>
+ <mime-type>image/pict</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pls</extension>
+ <mime-type>audio/x-scpls</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>png</extension>
+ <mime-type>image/png</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pnm</extension>
+ <mime-type>image/x-portable-anymap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pnt</extension>
+ <mime-type>image/x-macpaint</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ppm</extension>
+ <mime-type>image/x-portable-pixmap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ps</extension>
+ <mime-type>application/postscript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>psd</extension>
+ <mime-type>image/x-photoshop</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>qt</extension>
+ <mime-type>video/quicktime</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>qti</extension>
+ <mime-type>image/x-quicktime</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>qtif</extension>
+ <mime-type>image/x-quicktime</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ras</extension>
+ <mime-type>image/x-cmu-raster</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rgb</extension>
+ <mime-type>image/x-rgb</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rm</extension>
+ <mime-type>application/vnd.rn-realmedia</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>roff</extension>
+ <mime-type>application/x-troff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rtf</extension>
+ <mime-type>application/rtf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rtx</extension>
+ <mime-type>text/richtext</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>sh</extension>
+ <mime-type>application/x-sh</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>shar</extension>
+ <mime-type>application/x-shar</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>sit</extension>
+ <mime-type>application/x-stuffit</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>smf</extension>
+ <mime-type>audio/x-midi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>snd</extension>
+ <mime-type>audio/basic</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>src</extension>
+ <mime-type>application/x-wais-source</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>sv4cpio</extension>
+ <mime-type>application/x-sv4cpio</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>sv4crc</extension>
+ <mime-type>application/x-sv4crc</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>swf</extension>
+ <mime-type>application/x-shockwave-flash</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>t</extension>
+ <mime-type>application/x-troff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tar</extension>
+ <mime-type>application/x-tar</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tcl</extension>
+ <mime-type>application/x-tcl</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tex</extension>
+ <mime-type>application/x-tex</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>texi</extension>
+ <mime-type>application/x-texinfo</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>texinfo</extension>
+ <mime-type>application/x-texinfo</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tif</extension>
+ <mime-type>image/tiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tiff</extension>
+ <mime-type>image/tiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tr</extension>
+ <mime-type>application/x-troff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tsv</extension>
+ <mime-type>text/tab-separated-values</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>txt</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ulw</extension>
+ <mime-type>audio/basic</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ustar</extension>
+ <mime-type>application/x-ustar</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xbm</extension>
+ <mime-type>image/x-xbitmap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xml</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xpm</extension>
+ <mime-type>image/x-xpixmap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xsl</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xwd</extension>
+ <mime-type>image/x-xwindowdump</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>wav</extension>
+ <mime-type>audio/x-wav</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>svg</extension>
+ <mime-type>image/svg+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>svgz</extension>
+ <mime-type>image/svg+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- Wireless Bitmap -->
+ <extension>wbmp</extension>
+ <mime-type>image/vnd.wap.wbmp</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- WML Source -->
+ <extension>wml</extension>
+ <mime-type>text/vnd.wap.wml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- Compiled WML -->
+ <extension>wmlc</extension>
+ <mime-type>application/vnd.wap.wmlc</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- WML Script Source -->
+ <extension>wmls</extension>
+ <mime-type>text/vnd.wap.wmlscript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- Compiled WML Script -->
+ <extension>wmlscriptc</extension>
+ <mime-type>application/vnd.wap.wmlscriptc</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>wrl</extension>
+ <mime-type>x-world/x-vrml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>Z</extension>
+ <mime-type>application/x-compress</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>z</extension>
+ <mime-type>application/x-compress</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>zip</extension>
+ <mime-type>application/zip</mime-type>
+ </mime-mapping>
+
+
+ <!-- ==================== Default Welcome File List ===================== -->
+ <!-- When a request URI refers to a directory, the default servlet looks -->
+ <!-- for a "welcome file" within that directory and, if present, -->
+ <!-- to the corresponding resource URI for display. If no welcome file -->
+ <!-- is present, the default servlet either serves a directory listing, -->
+ <!-- or returns a 404 status, depending on how it is configured. -->
+ <!-- -->
+ <!-- If you define welcome files in your own application's web.xml -->
+ <!-- deployment descriptor, that list *replaces* the list configured -->
+ <!-- here, so be sure that you include any of the default values that -->
+ <!-- you wish to include. -->
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+</web-app>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/jakarta-regexp-1.3.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/jakarta-regexp-1.3.jar
new file mode 100644
index 0000000..8313b64
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/jakarta-regexp-1.3.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/jasper-compiler.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/jasper-compiler.jar
new file mode 100644
index 0000000..3bd8dd1
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/jasper-compiler.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/jasper-runtime.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/jasper-runtime.jar
new file mode 100644
index 0000000..94cfcd5
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/jasper-runtime.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/mx4j-jmx.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/mx4j-jmx.jar
new file mode 100644
index 0000000..df2d8c6
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/mx4j-jmx.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/naming-common.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/naming-common.jar
new file mode 100644
index 0000000..c78f7ce
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/naming-common.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/naming-factory.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/naming-factory.jar
new file mode 100644
index 0000000..23daa4f
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/naming-factory.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/naming-resources.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/naming-resources.jar
new file mode 100644
index 0000000..ac098a7
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/naming-resources.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/plugin.properties b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/plugin.properties
new file mode 100644
index 0000000..b156cb1
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/plugin.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2000, 2005 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+pluginName = Tomcat Wrapper
+providerName=Eclipse.org
+appserver = Tomcat Server
+realmfactory = Tomcat Realm Factory
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/plugin.xml b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/plugin.xml
new file mode 100644
index 0000000..05e1485
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/plugin.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension-point id="realmfactory" name="%realmfactory" schema="schema/org.eclipse.tomcat.realmfactory.exsd"/>
+
+ <extension
+ id="appserver"
+ name="%appserver"
+ point="org.eclipse.help.appserver.server">
+ <server
+ default="true"
+ class="org.eclipse.tomcat.internal.TomcatAppServer">
+ </server>
+ </extension>
+
+</plugin>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/preferences.ini b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/preferences.ini
new file mode 100644
index 0000000..a42b555
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/preferences.ini
@@ -0,0 +1,35 @@
+# Coyote HTTP/1.1 Connector attributes
+
+# The maximum queue length for incoming connection requests
+# when all possible request processing threads are in use.
+# Any requests received when the queue is full will be refused.
+acceptCount=100
+
+# The maximum number of request processing threads to be created by this Connector,
+# which therefore determines the maximum number of simultaneous requests
+# that can be handled.
+maxProcessors=75
+
+# The number of request processing threads that will be created when this Connector
+# is first started. This attribute should be set to a value smaller
+# than that set for maxProcessors.
+minProcessors=5
+
+# The port number to use for the SSL Connector
+# -1 to disable
+sslPort = -1
+
+# The protocol to use for the SSL Connector
+sslProtocol = TLS
+
+# The URL scheme associated with the SSL Connector
+sslScheme = https
+
+# Allows the user to specify the X509 algorithm to use
+#sslAlgorithm = IbmX509
+
+# Allows the user to specify a non-standard key store file
+# and keystore and certificate password
+#keyStoreFile =
+#keyStorePassword =
+
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlet.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlet.jar
new file mode 100644
index 0000000..92af203
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlet.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlets-common.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlets-common.jar
new file mode 100644
index 0000000..eb0ffd1
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlets-common.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlets-default.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlets-default.jar
new file mode 100644
index 0000000..15a6d48
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlets-default.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlets-invoker.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlets-invoker.jar
new file mode 100644
index 0000000..526bed6
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlets-invoker.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlets-manager.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlets-manager.jar
new file mode 100644
index 0000000..a92954f
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/servlets-manager.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/tomcat-coyote.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/tomcat-coyote.jar
new file mode 100644
index 0000000..87f135c
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/tomcat-coyote.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/tomcat-http11.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/tomcat-http11.jar
new file mode 100644
index 0000000..88f0442
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/tomcat-http11.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/tomcat-util.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/tomcat-util.jar
new file mode 100644
index 0000000..c0cd840
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/tomcat-util.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/tomcatwrapper.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/tomcatwrapper.jar
new file mode 100644
index 0000000..9987ad7
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/tomcatwrapper.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/webapps/ROOT/WEB-INF/web.xml b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/webapps/ROOT/WEB-INF/web.xml
new file mode 100644
index 0000000..68a1483
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/webapps/ROOT/WEB-INF/web.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
+ "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
+
+<web-app>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+</web-app>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/webapps/ROOT/index.html b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/webapps/ROOT/index.html
new file mode 100644
index 0000000..2d314ee
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.tomcat_4.1.130.v20060601/webapps/ROOT/index.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta HTTP-EQUIV="REFRESH" CONTENT="2;URL=help/">
+<title>Internal Application Server</title>
+</head>
+<body>
+Internal Application Server
+</body>
+</html>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.ui.editors_3.2.1.r321_v20060721.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.editors_3.2.1.r321_v20060721.jar
new file mode 100644
index 0000000..6c970c9
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.editors_3.2.1.r321_v20060721.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.ui.editors_3.2.1.r321_v20060721.plugin.xml b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.editors_3.2.1.r321_v20060721.plugin.xml
new file mode 100644
index 0000000..7cd0633
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.editors_3.2.1.r321_v20060721.plugin.xml
@@ -0,0 +1,836 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension-point id="documentProviders" name="%ExtPoint.documentProviders" schema="schema/documentProviders.exsd"/>
+ <extension-point id="markerUpdaters" name="%ExtPoint.markerUpdaters" schema="schema/markerUpdaters.exsd"/>
+ <extension-point id="markerAnnotationSpecification" name="%ExtPoint.markerAnnotationSpecification" schema="schema/markerAnnotationSpecification.exsd"/>
+ <extension-point id="annotationTypes" name="%ExtPoint.annotationTypes" schema="schema/annotationTypes.exsd"/>
+ <extension-point id="templates" name="%ExtPoint.editorTemplate" schema="schema/templates.exsd"/>
+
+ <extension point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.ui.internal.editors.text.EditorsPluginPreferenceInitializer"/>
+ </extension>
+
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ class="org.eclipse.ui.internal.editors.text.FileEditorInputAdapterFactory"
+ adaptableType="org.eclipse.core.resources.IFile">
+ <adapter type="org.eclipse.ui.editors.text.ILocationProvider"/>
+ </factory>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ name="%convertDelimiters.Windows.name"
+ description="%convertDelimiters.Windows.description"
+ categoryId="org.eclipse.ui.category.file"
+ id="org.eclipse.ui.edit.text.delimiter.windows">
+ </command>
+ <command
+ name="%convertDelimiters.Unix.name"
+ description="%convertDelimiters.Unix.description"
+ categoryId="org.eclipse.ui.category.file"
+ id="org.eclipse.ui.edit.text.delimiter.unix">
+ </command>
+ <command
+ name="%convertDelimiters.MacOS9.name"
+ description="%convertDelimiters.MacOS9.description"
+ categoryId="org.eclipse.ui.category.file"
+ id="org.eclipse.ui.edit.text.delimiter.macOS9">
+ </command>
+ <command
+ name="%removeTrailingWhitespace.name"
+ description="%removeTrailingWhitespace.description"
+ categoryId="org.eclipse.ui.category.file"
+ id="org.eclipse.ui.edit.text.removeTrailingWhitespace">
+ </command>
+ <command
+ name="%openExternalFile.name"
+ categoryId="org.eclipse.ui.category.file"
+ description="%openExternalFile.description"
+ id="org.eclipse.ui.edit.text.openExternalFile">
+ </command>
+ <command
+ name="%ActionDefinition.quickDiff.name"
+ categoryId="org.eclipse.ui.category.edit"
+ description="%ActionDefinition.quickDiff.description"
+ id="org.eclipse.quickdiff.toggle">
+ </command>
+ <command
+ name="%ActionDefinition.quickDiff.revert.name"
+ categoryId="org.eclipse.ui.category.textEditor"
+ description="%ActionDefinition.quickDiff.revert.description"
+ id="org.eclipse.ui.editors.quickdiff.revert">
+ </command>
+ <command
+ name="%ActionDefinition.quickDiff.revertLine.name"
+ categoryId="org.eclipse.ui.category.textEditor"
+ description="%ActionDefinition.quickDiff.revertLine.description"
+ id="org.eclipse.ui.editors.quickdiff.revertLine">
+ </command>
+ <command
+ name="%ActionDefinition.lineNumberToggle.name"
+ categoryId="org.eclipse.ui.category.textEditor"
+ description="%ActionDefinition.lineNumberToggle.description"
+ id="org.eclipse.ui.editors.lineNumberToggle">
+ </command>
+ <command
+ name="%command.folding.toggle.name"
+ description="%command.folding.toggle.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.folding.toggle">
+ </command>
+ <command
+ name="%command.folding.expandAll.name"
+ description="%command.folding.expandAll.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.folding.expand_all">
+ </command>
+ <command
+ name="%command.folding.collapseAll.name"
+ description="%command.folding.collapseAll.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.folding.collapse_all">
+ </command>
+ <command
+ name="%command.folding.restore.name"
+ description="%command.folding.restore.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.folding.restore">
+ </command>
+ <command
+ name="%command.folding.expand.name"
+ description="%command.folding.expand.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.folding.expand">
+ </command>
+ <command
+ name="%command.folding.collapse.name"
+ description="%command.folding.collapse.description"
+ categoryId="org.eclipse.ui.category.textEditor"
+ id="org.eclipse.ui.edit.text.folding.collapse">
+ </command>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ commandId="org.eclipse.ui.edit.text.removeTrailingWhitespace"
+ class="org.eclipse.ui.internal.editors.text.RemoveTrailingWhitespaceHandler">
+ </handler>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.bindings">
+ <!-- win32: M1=CTRL, M2=SHIFT, M3=ALT, M4=-
+ carbon: M1=COMMAND, M2=SHIFT, M3=ALT, M4=CTRL -->
+
+
+ <!-- COMMAND+SHIFT+Q is Logout on carbon, so don't overwrite it -->
+ <key
+ sequence="CTRL+SHIFT+Q"
+ contextId="org.eclipse.ui.textEditorScope"
+ commandId="org.eclipse.quickdiff.toggle"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+
+ <key
+ commandId="org.eclipse.ui.edit.text.folding.toggle"
+ contextId="org.eclipse.ui.textEditorScope"
+ sequence="M1+NUMPAD_DIVIDE"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ <key
+ commandId="org.eclipse.ui.edit.text.folding.expand_all"
+ contextId="org.eclipse.ui.textEditorScope"
+ sequence="M1+NUMPAD_MULTIPLY"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ <key
+ commandId="org.eclipse.ui.edit.text.folding.collapse_all"
+ contextId="org.eclipse.ui.textEditorScope"
+ sequence="M1+M2+NUMPAD_DIVIDE"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ <key
+ commandId="org.eclipse.ui.edit.text.folding.restore"
+ contextId="org.eclipse.ui.textEditorScope"
+ sequence="M1+M2+NUMPAD_MULTIPLY"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ <key
+ commandId="org.eclipse.ui.edit.text.folding.expand"
+ contextId="org.eclipse.ui.textEditorScope"
+ sequence="M1+NUMPAD_ADD"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ <key
+ commandId="org.eclipse.ui.edit.text.folding.collapse"
+ contextId="org.eclipse.ui.textEditorScope"
+ sequence="M1+NUMPAD_SUBTRACT"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ name="%Editors.DefaultTextEditor"
+ icon="$nl$/icons/full/obj16/file_obj.gif"
+ class="org.eclipse.ui.editors.text.TextEditor"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ id="org.eclipse.ui.DefaultTextEditor">
+ <contentTypeBinding
+ contentTypeId="org.eclipse.core.runtime.text"
+ />
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%PreferencePages.GeneralTextEditors"
+ category="org.eclipse.ui.preferencePages.Editors"
+ class="org.eclipse.ui.internal.editors.text.TextEditorDefaultsPreferencePage"
+ id="org.eclipse.ui.preferencePages.GeneralTextEditor">
+ <keywordReference id="org.eclipse.ui.editors.general"/>
+ </page>
+ <page
+ name="%PreferencePages.Annotations"
+ category="org.eclipse.ui.preferencePages.GeneralTextEditor"
+ class="org.eclipse.ui.internal.editors.text.AnnotationsPreferencePage"
+ id="org.eclipse.ui.editors.preferencePages.Annotations">
+ <keywordReference id="org.eclipse.ui.editors.annotations"/>
+ </page>
+ <page
+ name="%PreferencePages.QuickDiff"
+ category="org.eclipse.ui.preferencePages.GeneralTextEditor"
+ class="org.eclipse.ui.internal.editors.text.QuickDiffPreferencePage"
+ id="org.eclipse.ui.editors.preferencePages.QuickDiff">
+ <keywordReference id="org.eclipse.ui.editors.quickdiff"/>
+ </page>
+ <page
+ name="%PreferencePages.Accessibility"
+ category="org.eclipse.ui.preferencePages.GeneralTextEditor"
+ class="org.eclipse.ui.internal.editors.text.AccessibilityPreferencePage"
+ id="org.eclipse.ui.editors.preferencePages.Accessibility">
+ <keywordReference id="org.eclipse.ui.editors.accessibility"/>
+ </page>
+ <page
+ name="%PreferencePages.Spelling"
+ category="org.eclipse.ui.preferencePages.GeneralTextEditor"
+ class="org.eclipse.ui.internal.editors.text.SpellingPreferencePage"
+ id="org.eclipse.ui.editors.preferencePages.Spelling">
+ <keywordReference id="org.eclipse.ui.editors.spelling"/>
+ </page>
+ <page
+ name="%editorLinkedMode"
+ category="org.eclipse.ui.preferencePages.GeneralTextEditor"
+ class="org.eclipse.ui.internal.editors.text.LinkedModePreferencePage"
+ id="org.eclipse.ui.internal.editors.preferencePages.LinkedModePreferencePage">
+ <keywordReference id="org.eclipse.ui.editors.linkedmode"/>
+ </page>
+
+ </extension>
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ label="%preferenceKeywords.general"
+ id="org.eclipse.ui.editors.general"/>
+ <keyword
+ label="%preferenceKeywords.annotations"
+ id="org.eclipse.ui.editors.annotations"/>
+ <keyword
+ label="%preferenceKeywords.accessibility"
+ id="org.eclipse.ui.editors.accessibility"/>
+ <keyword
+ label="%preferenceKeywords.quickdiff"
+ id="org.eclipse.ui.editors.quickdiff"/>
+ <keyword
+ label="%preferenceKeywords.spelling"
+ id="org.eclipse.ui.editors.spelling"/>
+ <keyword
+ label="%preferenceKeywords.linkedmode"
+ id="org.eclipse.ui.editors.linkedmode"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors.documentProviders">
+ <provider
+ class="org.eclipse.ui.editors.text.TextFileDocumentProvider"
+ inputTypes="org.eclipse.ui.IStorageEditorInput"
+ id="org.eclipse.ui.editors.text.StorageDocumentProvider">
+ </provider>
+ <provider
+ class="org.eclipse.ui.editors.text.TextFileDocumentProvider"
+ inputTypes="org.eclipse.ui.internal.editors.text.JavaFileEditorInput"
+ id="org.eclipse.ui.editors.text.ExternalFileDocumentProvider">
+ </provider>
+ <provider
+ class="org.eclipse.ui.editors.text.TextFileDocumentProvider"
+ inputTypes="org.eclipse.ui.internal.editors.text.NonExistingFileEditorInput"
+ id="org.eclipse.ui.editors.text.NonExistingFileDocumentProvider">
+ </provider>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors.markerUpdaters">
+ <updater
+ class="org.eclipse.ui.texteditor.BasicMarkerUpdater"
+ id="org.eclipse.ui.texteditor.BasicMarkerUpdater">
+ </updater>
+ </extension>
+ <extension
+ point="org.eclipse.ui.workbench.texteditor.quickDiffReferenceProvider">
+ <referenceprovider
+ label="%lastSaveReferenceProvider.label"
+ class="org.eclipse.ui.internal.editors.quickdiff.LastSaveReferenceProvider"
+ id="org.eclipse.ui.internal.editors.quickdiff.LastSaveReferenceProvider">
+ </referenceprovider>
+ </extension>
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <viewerContribution
+ targetID="#TextRulerContext"
+ id="org.eclipse.ui.texteditor.ruler.context.actions">
+ <action
+ label="%AddTask.label"
+ helpContextId="org.eclipse.ui.AddTask_action_context"
+ class="org.eclipse.ui.texteditor.TaskRulerAction"
+ tooltip="%AddTask.tooltip"
+ menubarPath="additions"
+ id="org.eclipse.ui.texteditor.TaskRulerAction">
+ </action>
+ <action
+ label="%AddBookmark.label"
+ helpContextId="org.eclipse.ui.bookmark_action_context"
+ class="org.eclipse.ui.texteditor.BookmarkRulerAction"
+ tooltip="%AddBookmark.tooltip"
+ menubarPath="additions"
+ id="org.eclipse.ui.texteditor.BookmarkRulerAction">
+ </action>
+ </viewerContribution>
+ <viewerContribution
+ targetID="#RulerContext"
+ id="org.eclipse.ui.texteditor.ruler.context.actions">
+ <action
+ label="%AddTask.label"
+ helpContextId="org.eclipse.ui.AddTask_action_context"
+ class="org.eclipse.ui.texteditor.TaskRulerAction"
+ tooltip="%AddTask.tooltip"
+ menubarPath="additions"
+ id="org.eclipse.ui.texteditor.TaskRulerAction">
+ </action>
+ <action
+ label="%AddBookmark.label"
+ helpContextId="org.eclipse.ui.bookmark_action_context"
+ class="org.eclipse.ui.texteditor.BookmarkRulerAction"
+ tooltip="%AddBookmark.tooltip"
+ menubarPath="additions"
+ id="org.eclipse.ui.texteditor.BookmarkRulerAction">
+ </action>
+ </viewerContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editorActions">
+ <editorContribution
+ targetID="org.eclipse.ui.DefaultTextEditor"
+ id="org.eclipse.ui.texteditor.ruler.actions">
+ <action
+ label="%BookmarkRulerAction.label"
+ helpContextId="org.eclipse.ui.bookmark_action_context"
+ class="org.eclipse.ui.texteditor.BookmarkRulerAction"
+ actionID="RulerDoubleClick"
+ id="org.eclipse.ui.texteditor.BookmarkRulerAction">
+ </action>
+ <action
+ label="%SelectRulerAction.label"
+ class="org.eclipse.ui.texteditor.SelectRulerAction"
+ actionID="RulerClick"
+ id="org.eclipse.ui.texteditor.SelectRulerAction">
+ </action>
+ </editorContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.editors.markerAnnotationSpecification">
+ <specification
+ annotationType="org.eclipse.ui.workbench.texteditor.error"
+ textPreferenceKey="errorIndication"
+ presentationLayer="6"
+ highlightPreferenceValue="false"
+ showInNextPrevDropdownToolbarAction="true"
+ textPreferenceValue="true"
+ isGoToPreviousNavigationTargetKey="isErrorGoToPreviousNavigationTarget"
+ label="%errors.label"
+ colorPreferenceKey="errorIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showErrorInNextPrevDropdownToolbarAction"
+ symbolicIcon="error"
+ quickFixIcon="$nl$/icons/full/obj16/quick_fix_error_obj.gif"
+ isGoToNextNavigationTargetKey="isErrorGoToNextNavigationTarget"
+ isGoToNextNavigationTarget="true"
+ overviewRulerPreferenceKey="errorIndicationInOverviewRuler"
+ verticalRulerPreferenceValue="true"
+ highlightPreferenceKey="errorIndicationHighlighting"
+ isGoToPreviousNavigationTarget="true"
+ verticalRulerPreferenceKey="errorIndicationInVerticalRuler"
+ contributesToHeader="true"
+ colorPreferenceValue="255,0,128"
+ overviewRulerPreferenceValue="true">
+ </specification>
+ <specification
+ annotationType="org.eclipse.ui.workbench.texteditor.warning"
+ textPreferenceKey="warningIndication"
+ presentationLayer="5"
+ highlightPreferenceValue="false"
+ showInNextPrevDropdownToolbarAction="true"
+ textPreferenceValue="true"
+ isGoToPreviousNavigationTargetKey="isWarningGoToPreviousNavigationTarget"
+ label="%warnings.label"
+ colorPreferenceKey="warningIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showWarningInNextPrevDropdownToolbarAction"
+ symbolicIcon="warning"
+ quickFixIcon="$nl$/icons/full/obj16/quick_fix_warning_obj.gif"
+ isGoToNextNavigationTargetKey="isWarningGoToNextNavigationTarget"
+ isGoToNextNavigationTarget="true"
+ overviewRulerPreferenceKey="warningIndicationInOverviewRuler"
+ verticalRulerPreferenceValue="true"
+ highlightPreferenceKey="warningIndicationHighlighting"
+ isGoToPreviousNavigationTarget="true"
+ verticalRulerPreferenceKey="warningIndicationInVerticalRuler"
+ contributesToHeader="true"
+ colorPreferenceValue="244,200,45"
+ overviewRulerPreferenceValue="true">
+ </specification>
+ <specification
+ annotationType="org.eclipse.ui.workbench.texteditor.info"
+ textPreferenceKey="infoIndication"
+ presentationLayer="4"
+ highlightPreferenceValue="false"
+ showInNextPrevDropdownToolbarAction="true"
+ textPreferenceValue="false"
+ isGoToPreviousNavigationTargetKey="isInfoGoToPreviousNavigationTarget"
+ label="%infos.label"
+ colorPreferenceKey="infoIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showInfoInNextPrevDropdownToolbarAction"
+ symbolicIcon="info"
+ isGoToNextNavigationTargetKey="isInfoGoToNextNavigationTarget"
+ isGoToNextNavigationTarget="false"
+ overviewRulerPreferenceKey="infoIndicationInOverviewRuler"
+ verticalRulerPreferenceValue="true"
+ highlightPreferenceKey="infoIndicationHighlighting"
+ isGoToPreviousNavigationTarget="false"
+ verticalRulerPreferenceKey="infoIndicationInVerticalRuler"
+ contributesToHeader="false"
+ colorPreferenceValue="244,200,45"
+ overviewRulerPreferenceValue="true">
+ </specification>
+ <specification
+ annotationType="org.eclipse.ui.workbench.texteditor.task"
+ textPreferenceKey="taskIndication"
+ presentationLayer="2"
+ highlightPreferenceValue="false"
+ showInNextPrevDropdownToolbarAction="true"
+ textPreferenceValue="false"
+ isGoToPreviousNavigationTargetKey="isTaskGoToPreviousNavigationTarget"
+ label="%tasks.label"
+ colorPreferenceKey="taskIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showTaskInNextPrevDropdownToolbarAction"
+ symbolicIcon="task"
+ isGoToNextNavigationTargetKey="isTaskGoToNextNavigationTarget"
+ isGoToNextNavigationTarget="false"
+ overviewRulerPreferenceKey="taskIndicationInOverviewRuler"
+ verticalRulerPreferenceValue="true"
+ highlightPreferenceKey="taskIndicationHighlighting"
+ isGoToPreviousNavigationTarget="false"
+ verticalRulerPreferenceKey="taskIndicationInVerticalRuler"
+ contributesToHeader="false"
+ colorPreferenceValue="0,128,255"
+ overviewRulerPreferenceValue="true">
+ </specification>
+ <specification
+ annotationType="org.eclipse.ui.workbench.texteditor.bookmark"
+ textPreferenceKey="bookmarkIndication"
+ presentationLayer="1"
+ highlightPreferenceValue="false"
+ showInNextPrevDropdownToolbarAction="true"
+ textPreferenceValue="false"
+ isGoToPreviousNavigationTargetKey="isBookmarkGoToPreviousNavigationTarget"
+ label="%bookmarks.label"
+ colorPreferenceKey="bookmarkIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showBookmarkInNextPrevDropdownToolbarAction"
+ symbolicIcon="bookmark"
+ isGoToNextNavigationTargetKey="isBookmarkGoToNextNavigationTarget"
+ isGoToNextNavigationTarget="false"
+ overviewRulerPreferenceKey="bookmarkIndicationInOverviewRuler"
+ verticalRulerPreferenceValue="true"
+ highlightPreferenceKey="bookmarkIndicationHighlighting"
+ isGoToPreviousNavigationTarget="false"
+ verticalRulerPreferenceKey="bookmarkIndicationInVerticalRuler"
+ contributesToHeader="false"
+ colorPreferenceValue="34,164,99"
+ overviewRulerPreferenceValue="true">
+ </specification>
+ <specification
+ annotationType="org.eclipse.ui.workbench.texteditor.quickdiffChange"
+ colorPreferenceValue="204,163,205"
+ isGoToPreviousNavigationTarget="false"
+ isGoToPreviousNavigationTargetKey="isChangeGoToPreviousNavigationTarget"
+ showInNextPrevDropdownToolbarAction="true"
+ isGoToNextNavigationTarget="false"
+ isGoToNextNavigationTargetKey="isChangeGoToNextNavigationTarget"
+ colorPreferenceKey="changeIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showChangeInNextPrevDropdownToolbarAction"
+ contributesToHeader="false"
+ overviewRulerPreferenceValue="false"
+ presentationLayer="0"
+ label="%changes.label"
+ textPreferenceValue="false"
+ textPreferenceKey="changeIndication"
+ overviewRulerPreferenceKey="changeIndicationInOverviewRuler"
+ verticalRulerPreferenceKey="changeIndicationInVerticalRuler"
+ verticalRulerPreferenceValue="false"
+ includeOnPreferencePage="false">
+ </specification>
+ <specification
+ annotationType="org.eclipse.ui.workbench.texteditor.quickdiffAddition"
+ colorPreferenceValue="188,188,222"
+ isGoToPreviousNavigationTarget="false"
+ isGoToPreviousNavigationTargetKey="isAdditionGoToPreviousNavigationTarget"
+ showInNextPrevDropdownToolbarAction="true"
+ isGoToNextNavigationTarget="false"
+ isGoToNextNavigationTargetKey="isAdditionGoToNextNavigationTarget"
+ colorPreferenceKey="additionIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showAdditionInNextPrevDropdownToolbarAction"
+ contributesToHeader="false"
+ overviewRulerPreferenceValue="false"
+ presentationLayer="0"
+ label="%additions.label"
+ textPreferenceValue="false"
+ textPreferenceKey="additionIndication"
+ overviewRulerPreferenceKey="additionIndicationInOverviewRuler"
+ verticalRulerPreferenceKey="additionIndicationInVerticalRuler"
+ verticalRulerPreferenceValue="false"
+ includeOnPreferencePage="false">
+ </specification>
+ <specification
+ annotationType="org.eclipse.ui.workbench.texteditor.quickdiffDeletion"
+ colorPreferenceValue="0,0,0"
+ isGoToPreviousNavigationTarget="false"
+ isGoToPreviousNavigationTargetKey="isDeletionGoToPreviousNavigationTarget"
+ showInNextPrevDropdownToolbarAction="false"
+ isGoToNextNavigationTarget="false"
+ isGoToNextNavigationTargetKey="isDeletionGoToNextNavigationTarget"
+ colorPreferenceKey="deletionIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showDeletionInNextPrevDropdownToolbarAction"
+ contributesToHeader="false"
+ overviewRulerPreferenceValue="false"
+ presentationLayer="0"
+ label="%deletions.label"
+ textPreferenceValue="false"
+ textPreferenceKey="deletionIndication"
+ overviewRulerPreferenceKey="deletionIndicationInOverviewRuler"
+ verticalRulerPreferenceKey="deletionIndicationInVerticalRuler"
+ verticalRulerPreferenceValue="false"
+ includeOnPreferencePage="false">
+ </specification>
+
+ <!-- Hides the unchanged quick diff annotation -->
+ <specification
+ annotationType="org.eclipse.ui.workbench.texteditor.quickdiffUnchanged"
+ colorPreferenceValue="0,0,0"
+ isGoToPreviousNavigationTarget="false"
+ isGoToPreviousNavigationTargetKey="isUnchangedGoToPreviousNavigationTarget"
+ showInNextPrevDropdownToolbarAction="false"
+ isGoToNextNavigationTarget="false"
+ isGoToNextNavigationTargetKey="isUnchangedGoToNextNavigationTarget"
+ colorPreferenceKey="unchangedIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showUnchangedInNextPrevDropdownToolbarAction"
+ contributesToHeader="false"
+ overviewRulerPreferenceValue="false"
+ presentationLayer="0"
+ textPreferenceValue="false"
+ textPreferenceKey="unchangedIndication"
+ overviewRulerPreferenceKey="unchangedIndicationInOverviewRuler"
+ verticalRulerPreferenceKey="unchangedIndicationInVerticalRuler"
+ verticalRulerPreferenceValue="false"
+ includeOnPreferencePage="false">
+ </specification>
+
+ <specification
+ annotationType="org.eclipse.ui.workbench.texteditor.spelling"
+ label="%spelling.label"
+ symbolicIcon="warning"
+ quickFixIcon="$nl$/icons/full/obj16/quick_fix_warning_obj.gif"
+ presentationLayer="5"
+ contributesToHeader="true"
+ colorPreferenceKey="spellingIndicationColor"
+ colorPreferenceValue="255,128,64"
+ textPreferenceKey="spellingIndication"
+ textPreferenceValue="true"
+ overviewRulerPreferenceKey="spellingIndicationInOverviewRuler"
+ overviewRulerPreferenceValue="true"
+ verticalRulerPreferenceKey="spellingIndicationInVerticalRuler"
+ verticalRulerPreferenceValue="false"
+ isGoToPreviousNavigationTargetKey="isSpellingGoToPreviousNavigationTarget"
+ isGoToPreviousNavigationTarget="false"
+ isGoToNextNavigationTargetKey="isSpellingGoToNextNavigationTarget"
+ isGoToNextNavigationTarget="false"
+ showInNextPrevDropdownToolbarActionKey="showSpellingInNextPrevDropdownToolbarAction"
+ showInNextPrevDropdownToolbarAction="true"
+ highlightPreferenceKey="spellingIndicationHighlighting"
+ highlightPreferenceValue="false">
+ </specification>
+
+ <!-- revision annotations -->
+ <specification
+ annotationType="org.eclipse.ui.workbench.texteditor.revisionAnnotation"
+ colorPreferenceValue="88,88,22"
+ isGoToPreviousNavigationTarget="false"
+ isGoToPreviousNavigationTargetKey="isRevisionAnnotationGoToPreviousNavigationTarget"
+ showInNextPrevDropdownToolbarAction="false"
+ isGoToNextNavigationTarget="false"
+ isGoToNextNavigationTargetKey="isRevisionAnnotationGoToNextNavigationTarget"
+ colorPreferenceKey="revisionAnnotationIndicationColor"
+ showInNextPrevDropdownToolbarActionKey="showRevisionAnnotationInNextPrevDropdownToolbarAction"
+ contributesToHeader="false"
+ overviewRulerPreferenceValue="true"
+ presentationLayer="4"
+ label="%revisionInfo.label"
+ textPreferenceValue="false"
+ textPreferenceKey="revisionAnnotationIndication"
+ overviewRulerPreferenceKey="revisionAnnotationIndicationInOverviewRuler"
+ verticalRulerPreferenceKey="revisionAnnotationIndicationInVerticalRuler"
+ verticalRulerPreferenceValue="false"
+ includeOnPreferencePage="false"
+ highlightPreferenceKey="revisionAnnotationIndicationHighlighting"
+ highlightPreferenceValue="false">
+ </specification>
+
+ <!-- linked annotations -->
+ <specification
+ annotationType="org.eclipse.ui.internal.workbench.texteditor.link.master"
+ colorPreferenceValue="70,100,165"
+ colorPreferenceKey="linked.focus.color"
+ isGoToPreviousNavigationTarget="false"
+ isGoToPreviousNavigationTargetKey="linked.focus.navigation.previous"
+ showInNextPrevDropdownToolbarAction="false"
+ showInNextPrevDropdownToolbarActionKey="linked.focus.navigation.dropdown"
+ isGoToNextNavigationTarget="false"
+ isGoToNextNavigationTargetKey="linked.focus.navigation.next"
+ contributesToHeader="false"
+ overviewRulerPreferenceValue="false"
+ presentationLayer="4"
+ label="%linked.focus.label"
+ textPreferenceValue="true"
+ textPreferenceKey="linked.focus.text"
+ highlightPreferenceKey="linked.focus.highlight"
+ highlightPreferenceValue="false"
+ textStylePreferenceKey="linked.focus.text.style"
+ textStylePreferenceValue="BOX"
+ verticalRulerPreferenceKey="linked.focus.verticalruler"
+ verticalRulerPreferenceValue="false"
+ includeOnPreferencePage="false"
+ overviewRulerPreferenceKey="linked.focus.overviewruler">
+ </specification>
+ <specification
+ annotationType="org.eclipse.ui.internal.workbench.texteditor.link.slave"
+ colorPreferenceValue="180,215,255"
+ colorPreferenceKey="linked.slave.color"
+ isGoToPreviousNavigationTarget="false"
+ isGoToPreviousNavigationTargetKey="linked.slave.navigation.previous"
+ showInNextPrevDropdownToolbarAction="false"
+ showInNextPrevDropdownToolbarActionKey="linked.slave.navigation.dropdown"
+ isGoToNextNavigationTarget="false"
+ isGoToNextNavigationTargetKey="linked.slave.navigation.next"
+ contributesToHeader="false"
+ overviewRulerPreferenceValue="false"
+ presentationLayer="4"
+ label="%linked.slave.label"
+ textPreferenceValue="false"
+ textPreferenceKey="linked.slave.text"
+ highlightPreferenceKey="linked.slave.highlight"
+ highlightPreferenceValue="true"
+ textStylePreferenceKey="linked.slave.text.style"
+ textStylePreferenceValue="NONE"
+ verticalRulerPreferenceKey="linked.slave.verticalruler"
+ verticalRulerPreferenceValue="false"
+ includeOnPreferencePage="false"
+ overviewRulerPreferenceKey="linked.slave.overviewruler">
+ </specification>
+ <specification
+ annotationType="org.eclipse.ui.internal.workbench.texteditor.link.target"
+ colorPreferenceValue="70,100,165"
+ colorPreferenceKey="linked.target.color"
+ isGoToPreviousNavigationTarget="false"
+ isGoToPreviousNavigationTargetKey="linked.target.navigation.previous"
+ showInNextPrevDropdownToolbarAction="false"
+ showInNextPrevDropdownToolbarActionKey="linked.target.navigation.dropdown"
+ isGoToNextNavigationTarget="false"
+ isGoToNextNavigationTargetKey="linked.target.navigation.next"
+ contributesToHeader="false"
+ overviewRulerPreferenceValue="false"
+ presentationLayer="4"
+ label="%linked.target.label"
+ textPreferenceValue="true"
+ textPreferenceKey="linked.target.text"
+ highlightPreferenceKey="linked.target.highlight"
+ highlightPreferenceValue="false"
+ textStylePreferenceKey="linked.target.text.style"
+ textStylePreferenceValue="BOX"
+ verticalRulerPreferenceKey="linked.target.verticalruler"
+ verticalRulerPreferenceValue="false"
+ includeOnPreferencePage="false"
+ overviewRulerPreferenceKey="linked.target.overviewruler">
+ </specification>
+ <specification
+ annotationType="org.eclipse.ui.internal.workbench.texteditor.link.exit"
+ colorPreferenceValue="0,180,0"
+ colorPreferenceKey="linked.exit.color"
+ isGoToPreviousNavigationTarget="false"
+ isGoToPreviousNavigationTargetKey="linked.exit.navigation.previous"
+ showInNextPrevDropdownToolbarAction="false"
+ showInNextPrevDropdownToolbarActionKey="linked.exit.navigation.dropdown"
+ isGoToNextNavigationTarget="false"
+ isGoToNextNavigationTargetKey="linked.exit.navigation.next"
+ contributesToHeader="false"
+ overviewRulerPreferenceValue="false"
+ presentationLayer="4"
+ label="%linked.exit.label"
+ textPreferenceValue="true"
+ textPreferenceKey="linked.exit.text"
+ highlightPreferenceKey="linked.exit.highlight"
+ highlightPreferenceValue="false"
+ textStylePreferenceKey="linked.exit.text.style"
+ textStylePreferenceValue="IBEAM"
+ verticalRulerPreferenceKey="linked.exit.verticalruler"
+ verticalRulerPreferenceValue="false"
+ includeOnPreferencePage="false"
+ overviewRulerPreferenceKey="linked.exit.overviewruler">
+ </specification>
+
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.editors.annotationTypes">
+ <type
+ name="org.eclipse.ui.workbench.texteditor.error"
+ markerType="org.eclipse.core.resources.problemmarker"
+ markerSeverity="2">
+ </type>
+ <type
+ name="org.eclipse.ui.workbench.texteditor.warning"
+ markerType="org.eclipse.core.resources.problemmarker"
+ markerSeverity="1">
+ </type>
+ <type
+ name="org.eclipse.ui.workbench.texteditor.info"
+ markerType="org.eclipse.core.resources.problemmarker"
+ markerSeverity="0">
+ </type>
+ <type
+ name="org.eclipse.ui.workbench.texteditor.task"
+ markerType="org.eclipse.core.resources.taskmarker">
+ </type>
+ <type
+ name="org.eclipse.ui.workbench.texteditor.bookmark"
+ markerType="org.eclipse.core.resources.bookmark">
+ </type>
+ <type name="org.eclipse.ui.internal.workbench.texteditor.link.master"/>
+ <type name="org.eclipse.ui.internal.workbench.texteditor.link.slave"/>
+ <type name="org.eclipse.ui.internal.workbench.texteditor.link.target"/>
+ <type name="org.eclipse.ui.internal.workbench.texteditor.link.exit"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.filebuffers.annotationModelCreation">
+ <factory
+ extensions="*"
+ class="org.eclipse.ui.texteditor.ResourceMarkerAnnotationModelFactory">
+ </factory>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%textEditorAnnotationNavigationActionSet.label"
+ visible="true"
+ id="org.eclipse.ui.edit.text.actionSet.annotationNavigation">
+ <action
+ allowLabelUpdate="true"
+ style="pulldown"
+ id="org.eclipse.ui.edit.text.gotoPreviousAnnotation"
+ toolbarPath="org.eclipse.ui.workbench.navigate/history.group"
+ hoverIcon="$nl$/icons/full/ctool16/prev_nav.gif"
+ class="org.eclipse.ui.internal.editors.text.PreviousPulldownActionDelegate"
+ definitionId="org.eclipse.ui.navigate.previous"
+ disabledIcon="$nl$/icons/full/dtool16/prev_nav.gif"
+ icon="$nl$/icons/full/etool16/prev_nav.gif"
+ label="%goToPreviousAnnotation.label"
+ retarget="true"
+ tooltip="%goToPreviousAnnotation.tooltip">
+ </action>
+ <action
+ allowLabelUpdate="true"
+ style="pulldown"
+ id="org.eclipse.ui.edit.text.gotoNextAnnotation"
+ toolbarPath="org.eclipse.ui.workbench.navigate/history.group"
+ hoverIcon="$nl$/icons/full/ctool16/next_nav.gif"
+ class="org.eclipse.ui.internal.editors.text.NextPulldownActionDelegate"
+ definitionId="org.eclipse.ui.navigate.next"
+ disabledIcon="$nl$/icons/full/dtool16/next_nav.gif"
+ icon="$nl$/icons/full/etool16/next_nav.gif"
+ label="%goToNextAnnotation.label"
+ retarget="true"
+ tooltip="%goToNextAnnotation.tooltip">
+ </action>
+ </actionSet>
+ <actionSet
+ label="%textEditorNavigationActionSet.label"
+ visible="true"
+ id="org.eclipse.ui.edit.text.actionSet.navigation">
+ <action
+ toolbarPath="org.eclipse.ui.workbench.navigate/history.group"
+ id="org.eclipse.ui.edit.text.gotoLastEditPosition"
+ hoverIcon="$nl$/icons/full/ctool16/last_edit_pos.gif"
+ class="org.eclipse.ui.internal.texteditor.GotoLastEditPositionAction"
+ definitionId="org.eclipse.ui.edit.text.gotoLastEditPosition"
+ disabledIcon="$nl$/icons/full/dtool16/last_edit_pos.gif"
+ icon="$nl$/icons/full/etool16/last_edit_pos.gif"
+ helpContextId="goto_last_edit_position_action_context"
+ label="%goToLastEditPosition.label"
+ menubarPath="navigate/"
+ tooltip="%goToLastEditPosition.tooltip">
+ </action>
+ </actionSet>
+ <actionSet
+ label="%conversionActionSet.label"
+ visible="true"
+ id="org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo">
+ <menu
+ label="%conversionSubMenu.label"
+ path="file/save.ext"
+ id="converstLineDelimitersTo">
+ <separator name="lineDelimitersConversion"/>
+ <separator name="encoding"/>
+ </menu>
+ <action
+ definitionId="org.eclipse.ui.edit.text.delimiter.macOS9"
+ label="%convertDelimiters.MacOS9.label"
+ class="org.eclipse.ui.internal.editors.text.ConvertLineDelimitersToMacOS9"
+ tooltip="%convertDelimiters.MacOS9.description"
+ menubarPath="file/converstLineDelimitersTo/lineDelimitersConversion"
+ id="org.eclipse.ui.edit.text.delimiter.macOS9">
+ </action>
+ <action
+ definitionId="org.eclipse.ui.edit.text.delimiter.unix"
+ label="%convertDelimiters.Unix.label"
+ class="org.eclipse.ui.internal.editors.text.ConvertLineDelimitersToUnix"
+ tooltip="%convertDelimiters.Unix.description"
+ menubarPath="file/converstLineDelimitersTo/lineDelimitersConversion"
+ id="org.eclipse.ui.edit.text.delimiter.unix">
+ </action>
+ <action
+ definitionId="org.eclipse.ui.edit.text.delimiter.windows"
+ label="%convertDelimiters.Windows.label"
+ class="org.eclipse.ui.internal.editors.text.ConvertLineDelimitersToWindows"
+ tooltip="%convertDelimiters.Unix.description"
+ menubarPath="file/converstLineDelimitersTo/lineDelimitersConversion"
+ id="org.eclipse.ui.edit.text.delimiter.windows">
+ </action>
+ </actionSet>
+ </extension>
+
+</plugin>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.ui.forms_3.2.0.v20060602.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.forms_3.2.0.v20060602.jar
new file mode 100644
index 0000000..460585e
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.forms_3.2.0.v20060602.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.ui.ide_3.2.1.M20060915-1030.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.ide_3.2.1.M20060915-1030.jar
new file mode 100644
index 0000000..48df321
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.ide_3.2.1.M20060915-1030.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.ui.ide_3.2.1.M20060915-1030.plugin.xml b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.ide_3.2.1.M20060915-1030.plugin.xml
new file mode 100644
index 0000000..df8b594
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.ide_3.2.1.M20060915-1030.plugin.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+
+<!-- IDE extension points -->
+ <extension-point id="markerHelp" name="%ExtPoint.markerHelp" schema="schema/markerHelp.exsd"/>
+ <extension-point id="markerImageProviders" name="%ExtPoint.markerImageProviders" schema="schema/markerImageProviders.exsd"/>
+ <extension-point id="markerResolution" name="%ExtPoint.markerResolution" schema="schema/markerResolution.exsd"/>
+ <extension-point id="projectNatureImages" name="%ExtPoint.projectNatureImages" schema="schema/projectNatureImages.exsd"/>
+ <extension-point id="resourceFilters" name="%ExtPoint.resourceFilters" schema="schema/resourceFilters.exsd"/>
+ <extension-point id="markerSupport" name="%ExtPoint.markerSupport" schema="schema/markerSupport.exsd"/>
+ <extension-point id="filesystemSupport" name="%ExtPoint.fileSystemSupport" schema="schema/filesystemSupport.exsd"/>
+
+
+
+
+
+
+<!-- Update Actions -->
+<!-- End Update -->
+
+ <!-- Adaptor factory for IWorkingSet to IContributorResourceAdapter, IWorkbenchAdapter, ResourceMapping -->
+
+
+
+</plugin>
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.ui.intro_3.2.1.R321_v20060810.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.intro_3.2.1.R321_v20060810.jar
new file mode 100644
index 0000000..5052a07
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.intro_3.2.1.R321_v20060810.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.ui.views_3.2.1.M20060906-0800.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.views_3.2.1.M20060906-0800.jar
new file mode 100644
index 0000000..32ca95e
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.views_3.2.1.M20060906-0800.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.ui.workbench.texteditor_3.2.0.v20060605-1400.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.workbench.texteditor_3.2.0.v20060605-1400.jar
new file mode 100644
index 0000000..97ece54
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.workbench.texteditor_3.2.0.v20060605-1400.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.ui.workbench_3.2.1.M20060906-0800.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.workbench_3.2.1.M20060906-0800.jar
new file mode 100644
index 0000000..4a10e21
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.ui.workbench_3.2.1.M20060906-0800.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.ui_3.2.1.M20060913-0800.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.ui_3.2.1.M20060913-0800.jar
new file mode 100644
index 0000000..86d1382
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.ui_3.2.1.M20060913-0800.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.update.configurator_3.2.1.v20092006.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.update.configurator_3.2.1.v20092006.jar
new file mode 100644
index 0000000..db4e751
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.update.configurator_3.2.1.v20092006.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.update.core_3.2.1.v20092006.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.update.core_3.2.1.v20092006.jar
new file mode 100644
index 0000000..dcff78c
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.update.core_3.2.1.v20092006.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/plugins/org.eclipse.update.ui_3.2.1.v20092006.jar b/dependencies/eclipse/3.2/plugins/org.eclipse.update.ui_3.2.1.v20092006.jar
new file mode 100644
index 0000000..4c14332
--- /dev/null
+++ b/dependencies/eclipse/3.2/plugins/org.eclipse.update.ui_3.2.1.v20092006.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/win32/x86/org.eclipse.swt.win32.win32.x86_3.2.1.v3235.jar b/dependencies/eclipse/3.2/win32/x86/org.eclipse.swt.win32.win32.x86_3.2.1.v3235.jar
new file mode 100644
index 0000000..8764301
--- /dev/null
+++ b/dependencies/eclipse/3.2/win32/x86/org.eclipse.swt.win32.win32.x86_3.2.1.v3235.jar
Binary files differ
diff --git a/dependencies/eclipse/3.2/win32/x86/rcp/configuration/config.ini b/dependencies/eclipse/3.2/win32/x86/rcp/configuration/config.ini
new file mode 100644
index 0000000..af6151b
--- /dev/null
+++ b/dependencies/eclipse/3.2/win32/x86/rcp/configuration/config.ini
@@ -0,0 +1,9 @@
+#Product Runtime Configuration File
+
+osgi.splashPath=platform:/base/plugins/org.apache.directory.studio
+eclipse.product=org.apache.directory.studio.product
+osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
+osgi.bundles.defaultStartLevel=4
+
+# The workspace location
+osgi.instance.area.default=@user.home/.ApacheDirectoryStudio
diff --git a/dependencies/eclipse/3.2/win32/x86/rcp/eclipse.exe b/dependencies/eclipse/3.2/win32/x86/rcp/eclipse.exe
new file mode 100644
index 0000000..faf83b5
--- /dev/null
+++ b/dependencies/eclipse/3.2/win32/x86/rcp/eclipse.exe
Binary files differ
diff --git a/dependencies/eclipse/3.2/win32/x86/rcp/startup.jar b/dependencies/eclipse/3.2/win32/x86/rcp/startup.jar
new file mode 100644
index 0000000..dfd2f42
--- /dev/null
+++ b/dependencies/eclipse/3.2/win32/x86/rcp/startup.jar
Binary files differ
diff --git a/dependencies/externals/antlr/antlr/2.7.6/antlr-2.7.6.jar b/dependencies/externals/antlr/antlr/2.7.6/antlr-2.7.6.jar
new file mode 100755
index 0000000..3702b64
--- /dev/null
+++ b/dependencies/externals/antlr/antlr/2.7.6/antlr-2.7.6.jar
Binary files differ
diff --git a/dependencies/externals/antlr/antlr/2.7.6/ivy.xml b/dependencies/externals/antlr/antlr/2.7.6/ivy.xml
new file mode 100755
index 0000000..3daf821
--- /dev/null
+++ b/dependencies/externals/antlr/antlr/2.7.6/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="antlr"
+ module="antlr"
+ revision="2.7.6"
+ status="release"
+ publication="20060519182007"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="antlr" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/avalon-framework/avalon-framework-api/4.2.0/avalon-framework-api-4.2.0.jar b/dependencies/externals/avalon-framework/avalon-framework-api/4.2.0/avalon-framework-api-4.2.0.jar
new file mode 100644
index 0000000..e3aa26a
--- /dev/null
+++ b/dependencies/externals/avalon-framework/avalon-framework-api/4.2.0/avalon-framework-api-4.2.0.jar
Binary files differ
diff --git a/dependencies/externals/avalon-framework/avalon-framework-api/4.2.0/ivy.xml b/dependencies/externals/avalon-framework/avalon-framework-api/4.2.0/ivy.xml
new file mode 100755
index 0000000..1ee77dd
--- /dev/null
+++ b/dependencies/externals/avalon-framework/avalon-framework-api/4.2.0/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="avalon-framework"
+ module="avalon-framework-api"
+ revision="4.2.0"
+ status="release"
+ publication="20060519182007"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="avalon-framework-api" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/avalon-framework/avalon-framework-impl/4.2.0/avalon-framework-impl-4.2.0.jar b/dependencies/externals/avalon-framework/avalon-framework-impl/4.2.0/avalon-framework-impl-4.2.0.jar
new file mode 100644
index 0000000..ca61697
--- /dev/null
+++ b/dependencies/externals/avalon-framework/avalon-framework-impl/4.2.0/avalon-framework-impl-4.2.0.jar
Binary files differ
diff --git a/dependencies/externals/avalon-framework/avalon-framework-impl/4.2.0/ivy.xml b/dependencies/externals/avalon-framework/avalon-framework-impl/4.2.0/ivy.xml
new file mode 100755
index 0000000..4c79484
--- /dev/null
+++ b/dependencies/externals/avalon-framework/avalon-framework-impl/4.2.0/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="avalon-framework"
+ module="avalon-framework-impl"
+ revision="4.2.0"
+ status="release"
+ publication="20060519182007"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="avalon-framework-impl" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/checkstyle/checkstyle/2.2/checkstyle-2.2.jar b/dependencies/externals/checkstyle/checkstyle/2.2/checkstyle-2.2.jar
new file mode 100644
index 0000000..3601074
--- /dev/null
+++ b/dependencies/externals/checkstyle/checkstyle/2.2/checkstyle-2.2.jar
Binary files differ
diff --git a/dependencies/externals/checkstyle/checkstyle/2.2/ivy.xml b/dependencies/externals/checkstyle/checkstyle/2.2/ivy.xml
new file mode 100644
index 0000000..48aa6d7
--- /dev/null
+++ b/dependencies/externals/checkstyle/checkstyle/2.2/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="checkstyle"
+ module="checkstyle"
+ revision="2.2"
+ status="release"
+ publication="20070329102238"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="checkstyle" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/commons-codec/commons-codec/1.3/commons-codec-1.3.jar b/dependencies/externals/commons-codec/commons-codec/1.3/commons-codec-1.3.jar
new file mode 100644
index 0000000..957b675
--- /dev/null
+++ b/dependencies/externals/commons-codec/commons-codec/1.3/commons-codec-1.3.jar
Binary files differ
diff --git a/dependencies/externals/commons-codec/commons-codec/1.3/ivy.xml b/dependencies/externals/commons-codec/commons-codec/1.3/ivy.xml
new file mode 100755
index 0000000..72831a8
--- /dev/null
+++ b/dependencies/externals/commons-codec/commons-codec/1.3/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="commons-codec"
+ module="commons-codec"
+ revision="1.3"
+ status="release"
+ publication="20060519182007"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="commons-codec" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/commons-collections/commons-collections/3.1/commons-collections-3.1-sources.jar b/dependencies/externals/commons-collections/commons-collections/3.1/commons-collections-3.1-sources.jar
new file mode 100755
index 0000000..463fa30
--- /dev/null
+++ b/dependencies/externals/commons-collections/commons-collections/3.1/commons-collections-3.1-sources.jar
Binary files differ
diff --git a/dependencies/externals/commons-collections/commons-collections/3.1/commons-collections-3.1.jar b/dependencies/externals/commons-collections/commons-collections/3.1/commons-collections-3.1.jar
new file mode 100755
index 0000000..41e230f
--- /dev/null
+++ b/dependencies/externals/commons-collections/commons-collections/3.1/commons-collections-3.1.jar
Binary files differ
diff --git a/dependencies/externals/commons-collections/commons-collections/3.1/ivy.xml b/dependencies/externals/commons-collections/commons-collections/3.1/ivy.xml
new file mode 100755
index 0000000..68f1c96
--- /dev/null
+++ b/dependencies/externals/commons-collections/commons-collections/3.1/ivy.xml
@@ -0,0 +1,15 @@
+<ivy-module version="1.0">
+ <info organisation="commons-collections"
+ module="commons-collections"
+ revision="3.1"
+ status="release"
+ publication="20060519013012"
+ default="true"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="commons-collections" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/commons-collections/commons-collections/3.2/commons-collections-3.2.jar b/dependencies/externals/commons-collections/commons-collections/3.2/commons-collections-3.2.jar
new file mode 100644
index 0000000..75580be
--- /dev/null
+++ b/dependencies/externals/commons-collections/commons-collections/3.2/commons-collections-3.2.jar
Binary files differ
diff --git a/dependencies/externals/commons-collections/commons-collections/3.2/ivy.xml b/dependencies/externals/commons-collections/commons-collections/3.2/ivy.xml
new file mode 100755
index 0000000..cf31d40
--- /dev/null
+++ b/dependencies/externals/commons-collections/commons-collections/3.2/ivy.xml
@@ -0,0 +1,15 @@
+<ivy-module version="1.0">
+ <info organisation="commons-collections"
+ module="commons-collections"
+ revision="3.2"
+ status="release"
+ publication="20060514103854"
+ default="true"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="commons-collections" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/commons-configuration/commons-configuration/1.2/commons-configuration-1.2.jar b/dependencies/externals/commons-configuration/commons-configuration/1.2/commons-configuration-1.2.jar
new file mode 100644
index 0000000..574d0ac
--- /dev/null
+++ b/dependencies/externals/commons-configuration/commons-configuration/1.2/commons-configuration-1.2.jar
Binary files differ
diff --git a/dependencies/externals/commons-configuration/commons-configuration/1.2/ivy.xml b/dependencies/externals/commons-configuration/commons-configuration/1.2/ivy.xml
new file mode 100755
index 0000000..b38122b
--- /dev/null
+++ b/dependencies/externals/commons-configuration/commons-configuration/1.2/ivy.xml
@@ -0,0 +1,21 @@
+<ivy-module version="1.0">
+ <info organisation="commons-configuration"
+ module="commons-configuration"
+ revision="1.2"
+ status="release"
+ publication="20060519013012"
+ default="true"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="commons-configuration" type="jar" ext="jar" conf="default"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="commons-lang" name="commons-lang" rev="2.1" conf="default"/>
+ <dependency org="commons-logging" name="commons-logging" rev="1.1" conf="default"/>
+ <dependency org="commons-collections" name="commons-collections" rev="3.2" conf="default"/>
+ </dependencies>
+</ivy-module>
diff --git a/dependencies/externals/commons-io/commons-io/1.3.1/commons-io-1.3.1.jar b/dependencies/externals/commons-io/commons-io/1.3.1/commons-io-1.3.1.jar
new file mode 100644
index 0000000..7affdef
--- /dev/null
+++ b/dependencies/externals/commons-io/commons-io/1.3.1/commons-io-1.3.1.jar
Binary files differ
diff --git a/dependencies/externals/commons-io/commons-io/1.3.1/ivy.xml b/dependencies/externals/commons-io/commons-io/1.3.1/ivy.xml
new file mode 100755
index 0000000..362c800
--- /dev/null
+++ b/dependencies/externals/commons-io/commons-io/1.3.1/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="commons-io"
+ module="commons-io"
+ revision="1.3.1"
+ status="release"
+ publication="20060519182007"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="commons-io" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/commons-lang/commons-lang/2.1/commons-lang-2.1.jar b/dependencies/externals/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
new file mode 100755
index 0000000..87b80ab
--- /dev/null
+++ b/dependencies/externals/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
Binary files differ
diff --git a/dependencies/externals/commons-lang/commons-lang/2.1/ivy.xml b/dependencies/externals/commons-lang/commons-lang/2.1/ivy.xml
new file mode 100755
index 0000000..a8e40af
--- /dev/null
+++ b/dependencies/externals/commons-lang/commons-lang/2.1/ivy.xml
@@ -0,0 +1,19 @@
+<ivy-module version="1.0">
+ <info organisation="commons-lang"
+ module="commons-lang"
+ revision="2.1"
+ status="release"
+ publication="20060518222652"
+ >
+ <license url="http://jakarta.apache.org/commons/license.html" name="ASL2"/>
+ <description homepage="http://jakarta.apache.org/commons/lang/">
+The Lang Component provides a host of helper utilities for the java.lang API, notably String manipulation methods, basic numerical methods, object reflection, creation and serialization, and System properties. Additionally it contains an inheritable enum type, an exception structure that supports multiple types of nested-Exceptions, basic enhancements to java.util.Date and a series of utlities dedicated to help with building methods, such as hashCode, toString and equals.
+ </description>
+ </info>
+ <configurations>
+ <conf name="default"/>
+ </configurations>
+ <publications>
+ <artifact name="commons-lang" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar b/dependencies/externals/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
new file mode 100755
index 0000000..d1abcbb
--- /dev/null
+++ b/dependencies/externals/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
Binary files differ
diff --git a/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-1.1-src.zip b/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-1.1-src.zip
new file mode 100755
index 0000000..e3ee6dd
--- /dev/null
+++ b/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-1.1-src.zip
Binary files differ
diff --git a/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-1.1.jar b/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-1.1.jar
new file mode 100755
index 0000000..2ff9bbd
--- /dev/null
+++ b/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-1.1.jar
Binary files differ
diff --git a/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-1.1.zip b/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-1.1.zip
new file mode 100755
index 0000000..e7db258
--- /dev/null
+++ b/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-1.1.zip
Binary files differ
diff --git a/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-adapters-1.1.jar b/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-adapters-1.1.jar
new file mode 100755
index 0000000..6eec9a5
--- /dev/null
+++ b/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-adapters-1.1.jar
Binary files differ
diff --git a/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-api-1.1.jar b/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-api-1.1.jar
new file mode 100755
index 0000000..d1abcbb
--- /dev/null
+++ b/dependencies/externals/commons-logging/commons-logging/1.1/commons-logging-api-1.1.jar
Binary files differ
diff --git a/dependencies/externals/commons-logging/commons-logging/1.1/ivy.xml b/dependencies/externals/commons-logging/commons-logging/1.1/ivy.xml
new file mode 100755
index 0000000..d5fbc69
--- /dev/null
+++ b/dependencies/externals/commons-logging/commons-logging/1.1/ivy.xml
@@ -0,0 +1,23 @@
+<ivy-module version="1.0">
+ <info organisation="commons-logging"
+ module="commons-logging"
+ revision="1.1"
+ status="release"
+ publication="20060518223745"
+ />
+ <configurations>
+ <conf name="default"/>
+ <conf name="api"/>
+ <conf name="log4j" extends="default"/>
+ </configurations>
+
+ <publications>
+ <artifact name="commons-logging" type="jar" ext="jar" conf="default"/>
+ <artifact name="commons-logging-api" type="jar" ext="jar" conf="api"/>
+ <artifact name="commons-logging-adapters" type="jar" ext="jar" conf="adapters"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="log4j" name="log4j" rev="1.2.13" conf="log4j->default"/>
+ </dependencies>
+</ivy-module>
diff --git a/dependencies/externals/docbook/docbook-xml/4.5/docbook-xml-4.5.zip b/dependencies/externals/docbook/docbook-xml/4.5/docbook-xml-4.5.zip
new file mode 100644
index 0000000..cb510f6
--- /dev/null
+++ b/dependencies/externals/docbook/docbook-xml/4.5/docbook-xml-4.5.zip
Binary files differ
diff --git a/dependencies/externals/docbook/docbook-xml/4.5/ivy.xml b/dependencies/externals/docbook/docbook-xml/4.5/ivy.xml
new file mode 100755
index 0000000..41cfa42
--- /dev/null
+++ b/dependencies/externals/docbook/docbook-xml/4.5/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="docbook"
+ module="docbook-xml"
+ revision="4.5"
+ status="release"
+ publication="20061026131700"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="docbook-xml" type="zip" ext="zip" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/docbook/docbook-xsl/1.71.1/docbook-xsl-1.71.1.zip b/dependencies/externals/docbook/docbook-xsl/1.71.1/docbook-xsl-1.71.1.zip
new file mode 100644
index 0000000..73fe101
--- /dev/null
+++ b/dependencies/externals/docbook/docbook-xsl/1.71.1/docbook-xsl-1.71.1.zip
Binary files differ
diff --git a/dependencies/externals/docbook/docbook-xsl/1.71.1/ivy.xml b/dependencies/externals/docbook/docbook-xsl/1.71.1/ivy.xml
new file mode 100755
index 0000000..037caeb
--- /dev/null
+++ b/dependencies/externals/docbook/docbook-xsl/1.71.1/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="docbook"
+ module="docbook-xsl"
+ revision="1.71.1"
+ status="release"
+ publication="20061019132300"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="docbook-xsl" type="zip" ext="zip" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/junit/junit/3.8.2/ivy.xml b/dependencies/externals/junit/junit/3.8.2/ivy.xml
new file mode 100755
index 0000000..7d289d4
--- /dev/null
+++ b/dependencies/externals/junit/junit/3.8.2/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="junit"
+ module="junit"
+ revision="3.8.2"
+ status="release"
+ publication="20060518223533"
+ />
+ <configurations>
+ <conf name="default"/>
+ </configurations>
+ <publications>
+ <artifact name="junit" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/junit/junit/3.8.2/junit-3.8.2.jar b/dependencies/externals/junit/junit/3.8.2/junit-3.8.2.jar
new file mode 100755
index 0000000..c8f711d
--- /dev/null
+++ b/dependencies/externals/junit/junit/3.8.2/junit-3.8.2.jar
Binary files differ
diff --git a/dependencies/externals/log4j/log4j/1.2.13/ivy.xml b/dependencies/externals/log4j/log4j/1.2.13/ivy.xml
new file mode 100755
index 0000000..a78e3bc
--- /dev/null
+++ b/dependencies/externals/log4j/log4j/1.2.13/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="log4j"
+ module="log4j"
+ revision="1.2.13"
+ status="release"
+ publication="20060518222045"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="log4j" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/log4j/log4j/1.2.13/log4j-1.2.13.jar b/dependencies/externals/log4j/log4j/1.2.13/log4j-1.2.13.jar
new file mode 100755
index 0000000..dde9972
--- /dev/null
+++ b/dependencies/externals/log4j/log4j/1.2.13/log4j-1.2.13.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/directory/ldapstudio/studio-dsml-parser/0.3/ivy.xml b/dependencies/externals/org/apache/directory/ldapstudio/studio-dsml-parser/0.3/ivy.xml
new file mode 100755
index 0000000..b105726
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/ldapstudio/studio-dsml-parser/0.3/ivy.xml
@@ -0,0 +1,22 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.ldapstudio"
+ module="studio-dsml-parser"
+ revision="0.3"
+ status="release"
+ publication="20070116134400"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="studio-dsml-parser" type="jar" ext="jar" conf="default"/>
+ </publications>
+ <dependencies>
+ <dependency org="commons-collections" name="commons-collections" rev="3.2"/>
+ <dependency org="org.dom4j" name="dom4j" rev="1.6.1"/>
+ <dependency org="org.slf4j" name="nlog4j" rev="1.2.25"/>
+ <dependency org="org.apache.directory.shared" name="shared-asn1" rev="0.9.7-SNAPSHOT"/>
+ <dependency org="org.apache.directory.shared" name="shared-ldap" rev="0.9.7-SNAPSHOT"/>
+ <dependency org="org.xmlpull" name="xpp3" rev="1.1.3_8"/>
+ </dependencies>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/directory/ldapstudio/studio-dsml-parser/0.3/studio-dsml-parser-0.3.jar b/dependencies/externals/org/apache/directory/ldapstudio/studio-dsml-parser/0.3/studio-dsml-parser-0.3.jar
new file mode 100644
index 0000000..682e8bc
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/ldapstudio/studio-dsml-parser/0.3/studio-dsml-parser-0.3.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/directory/server/apacheds-core-plugin/1.5.0-SNAPSHOT/apacheds-core-plugin-1.5.0-SNAPSHOT.jar b/dependencies/externals/org/apache/directory/server/apacheds-core-plugin/1.5.0-SNAPSHOT/apacheds-core-plugin-1.5.0-SNAPSHOT.jar
new file mode 100644
index 0000000..1a4527e
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/server/apacheds-core-plugin/1.5.0-SNAPSHOT/apacheds-core-plugin-1.5.0-SNAPSHOT.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/directory/server/apacheds-core-plugin/1.5.0-SNAPSHOT/ivy.xml b/dependencies/externals/org/apache/directory/server/apacheds-core-plugin/1.5.0-SNAPSHOT/ivy.xml
new file mode 100755
index 0000000..2e4e4d9
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/server/apacheds-core-plugin/1.5.0-SNAPSHOT/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.server"
+ module="apacheds-core-plugin"
+ revision="1.5.0-SNAPSHOT"
+ status="release"
+ publication="20070305113205"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="apacheds-core-plugin" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/directory/server/apacheds-core-plugin/1.5.1-SNAPSHOT/apacheds-core-plugin-1.5.1-SNAPSHOT.jar b/dependencies/externals/org/apache/directory/server/apacheds-core-plugin/1.5.1-SNAPSHOT/apacheds-core-plugin-1.5.1-SNAPSHOT.jar
new file mode 100644
index 0000000..1ce394d
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/server/apacheds-core-plugin/1.5.1-SNAPSHOT/apacheds-core-plugin-1.5.1-SNAPSHOT.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/directory/server/apacheds-core-plugin/1.5.1-SNAPSHOT/ivy.xml b/dependencies/externals/org/apache/directory/server/apacheds-core-plugin/1.5.1-SNAPSHOT/ivy.xml
new file mode 100755
index 0000000..3dfac71
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/server/apacheds-core-plugin/1.5.1-SNAPSHOT/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.server"
+ module="apacheds-core-plugin"
+ revision="1.5.1-SNAPSHOT"
+ status="release"
+ publication="20070830140800"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="apacheds-core-plugin" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/directory/server/apacheds-core-shared/1.5.0-SNAPSHOT/apacheds-core-shared-1.5.0-SNAPSHOT.jar b/dependencies/externals/org/apache/directory/server/apacheds-core-shared/1.5.0-SNAPSHOT/apacheds-core-shared-1.5.0-SNAPSHOT.jar
new file mode 100644
index 0000000..9f5af28
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/server/apacheds-core-shared/1.5.0-SNAPSHOT/apacheds-core-shared-1.5.0-SNAPSHOT.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/directory/server/apacheds-core-shared/1.5.0-SNAPSHOT/ivy.xml b/dependencies/externals/org/apache/directory/server/apacheds-core-shared/1.5.0-SNAPSHOT/ivy.xml
new file mode 100755
index 0000000..e1486da
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/server/apacheds-core-shared/1.5.0-SNAPSHOT/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.server"
+ module="apacheds-core-shared"
+ revision="1.5.0-SNAPSHOT"
+ status="release"
+ publication="20070305113004"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="apacheds-core-shared" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/directory/shared/shared-asn1/0.9.6-SNAPSHOT/ivy.xml b/dependencies/externals/org/apache/directory/shared/shared-asn1/0.9.6-SNAPSHOT/ivy.xml
new file mode 100755
index 0000000..e2e14e8
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/shared/shared-asn1/0.9.6-SNAPSHOT/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.shared"
+ module="shared-asn1"
+ revision="0.9.6-SNAPSHOT"
+ status="release"
+ publication="20070321151228"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="shared-asn1" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/directory/shared/shared-asn1/0.9.6-SNAPSHOT/shared-asn1-0.9.6-SNAPSHOT.jar b/dependencies/externals/org/apache/directory/shared/shared-asn1/0.9.6-SNAPSHOT/shared-asn1-0.9.6-SNAPSHOT.jar
new file mode 100644
index 0000000..4fc1281
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/shared/shared-asn1/0.9.6-SNAPSHOT/shared-asn1-0.9.6-SNAPSHOT.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/directory/shared/shared-asn1/0.9.7-SNAPSHOT/ivy.xml b/dependencies/externals/org/apache/directory/shared/shared-asn1/0.9.7-SNAPSHOT/ivy.xml
new file mode 100755
index 0000000..204c7c6
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/shared/shared-asn1/0.9.7-SNAPSHOT/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.shared"
+ module="shared-asn1"
+ revision="0.9.7-SNAPSHOT"
+ status="release"
+ publication="20070830140800"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="shared-asn1" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/directory/shared/shared-asn1/0.9.7-SNAPSHOT/shared-asn1-0.9.7-SNAPSHOT.jar b/dependencies/externals/org/apache/directory/shared/shared-asn1/0.9.7-SNAPSHOT/shared-asn1-0.9.7-SNAPSHOT.jar
new file mode 100644
index 0000000..5b8b61e
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/shared/shared-asn1/0.9.7-SNAPSHOT/shared-asn1-0.9.7-SNAPSHOT.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/directory/shared/shared-converter/0.9.7-SNAPSHOT/ivy.xml b/dependencies/externals/org/apache/directory/shared/shared-converter/0.9.7-SNAPSHOT/ivy.xml
new file mode 100755
index 0000000..47d364a
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/shared/shared-converter/0.9.7-SNAPSHOT/ivy.xml
@@ -0,0 +1,22 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.shared"
+ module="shared-converter"
+ revision="0.9.7-SNAPSHOT"
+ status="release"
+ publication="20070830140800"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="shared-converter" type="jar" ext="jar" conf="default"/>
+ </publications>
+ <dependencies>
+ <dependency org="org.slf4j" name="nlog4j" rev="1.2.25" conf="default"/>
+ <dependency org="commons-collections" name="commons-collections" rev="3.2" conf="default"/>
+ <dependency org="antlr" name="antlr" rev="2.7.6" conf="default"/>
+ <dependency org="checkstyle" name="checkstyle" rev="2.2" conf="default"/>
+ <dependency org="commons-lang" name="commons-lang" rev="2.1" conf="default"/>
+ <dependency org="xerces" name="xercesImpl" rev="2.0.2" conf="default"/>
+ </dependencies>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/directory/shared/shared-converter/0.9.7-SNAPSHOT/shared-converter-0.9.7-SNAPSHOT.jar b/dependencies/externals/org/apache/directory/shared/shared-converter/0.9.7-SNAPSHOT/shared-converter-0.9.7-SNAPSHOT.jar
new file mode 100644
index 0000000..2c06fec
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/shared/shared-converter/0.9.7-SNAPSHOT/shared-converter-0.9.7-SNAPSHOT.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/directory/shared/shared-ldap/0.9.6-SNAPSHOT/ivy.xml b/dependencies/externals/org/apache/directory/shared/shared-ldap/0.9.6-SNAPSHOT/ivy.xml
new file mode 100755
index 0000000..26e39da
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/shared/shared-ldap/0.9.6-SNAPSHOT/ivy.xml
@@ -0,0 +1,20 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.shared"
+ module="shared-ldap"
+ revision="0.9.6-SNAPSHOT"
+ status="release"
+ publication="20070329141304"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="shared-ldap" type="jar" ext="jar" conf="default"/>
+ </publications>
+ <dependencies>
+ <dependency org="org.apache.directory.shared" name="shared-asn1" rev="0.9.6-SNAPSHOT" conf="default"/>
+ <dependency org="org.slf4j" name="nlog4j" rev="1.2.25" conf="default"/>
+ <dependency org="commons-collections" name="commons-collections" rev="3.1" conf="default"/>
+ <dependency org="antlr" name="antlr" rev="2.7.6" conf="default"/>
+ </dependencies>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/directory/shared/shared-ldap/0.9.6-SNAPSHOT/shared-ldap-0.9.6-SNAPSHOT.jar b/dependencies/externals/org/apache/directory/shared/shared-ldap/0.9.6-SNAPSHOT/shared-ldap-0.9.6-SNAPSHOT.jar
new file mode 100644
index 0000000..e74c68d
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/shared/shared-ldap/0.9.6-SNAPSHOT/shared-ldap-0.9.6-SNAPSHOT.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/directory/shared/shared-ldap/0.9.7-SNAPSHOT/ivy.xml b/dependencies/externals/org/apache/directory/shared/shared-ldap/0.9.7-SNAPSHOT/ivy.xml
new file mode 100755
index 0000000..4f36d34
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/shared/shared-ldap/0.9.7-SNAPSHOT/ivy.xml
@@ -0,0 +1,20 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.shared"
+ module="shared-ldap"
+ revision="0.9.7-SNAPSHOT"
+ status="release"
+ publication="20070830140800"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="shared-ldap" type="jar" ext="jar" conf="default"/>
+ </publications>
+ <dependencies>
+ <dependency org="org.apache.directory.shared" name="shared-asn1" rev="0.9.7-SNAPSHOT" conf="default"/>
+ <dependency org="org.slf4j" name="nlog4j" rev="1.2.25" conf="default"/>
+ <dependency org="commons-collections" name="commons-collections" rev="3.2" conf="default"/>
+ <dependency org="antlr" name="antlr" rev="2.7.6" conf="default"/>
+ </dependencies>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/directory/shared/shared-ldap/0.9.7-SNAPSHOT/shared-ldap-0.9.7-SNAPSHOT.jar b/dependencies/externals/org/apache/directory/shared/shared-ldap/0.9.7-SNAPSHOT/shared-ldap-0.9.7-SNAPSHOT.jar
new file mode 100644
index 0000000..06d7ba3
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/shared/shared-ldap/0.9.7-SNAPSHOT/shared-ldap-0.9.7-SNAPSHOT.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/directory/studio/studio-dsml-parser/0.4/ivy.xml b/dependencies/externals/org/apache/directory/studio/studio-dsml-parser/0.4/ivy.xml
new file mode 100755
index 0000000..2b4099f
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/studio/studio-dsml-parser/0.4/ivy.xml
@@ -0,0 +1,22 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.studio"
+ module="studio-dsml-parser"
+ revision="0.4"
+ status="release"
+ publication="20070116134400"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="studio-dsml-parser" type="jar" ext="jar" conf="default"/>
+ </publications>
+ <dependencies>
+ <dependency org="commons-collections" name="commons-collections" rev="3.2"/>
+ <dependency org="org.dom4j" name="dom4j" rev="1.6.1"/>
+ <dependency org="org.slf4j" name="nlog4j" rev="1.2.25"/>
+ <dependency org="org.apache.directory.shared" name="shared-asn1" rev="0.9.7-SNAPSHOT"/>
+ <dependency org="org.apache.directory.shared" name="shared-ldap" rev="0.9.7-SNAPSHOT"/>
+ <dependency org="org.xmlpull" name="xpp3" rev="1.1.3_8"/>
+ </dependencies>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/directory/studio/studio-dsml-parser/0.4/studio-dsml-parser-0.4.jar b/dependencies/externals/org/apache/directory/studio/studio-dsml-parser/0.4/studio-dsml-parser-0.4.jar
new file mode 100644
index 0000000..74fbb6d
--- /dev/null
+++ b/dependencies/externals/org/apache/directory/studio/studio-dsml-parser/0.4/studio-dsml-parser-0.4.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/poi/poi/2.5.1-final-20040804/ivy.xml b/dependencies/externals/org/apache/poi/poi/2.5.1-final-20040804/ivy.xml
new file mode 100755
index 0000000..457943a
--- /dev/null
+++ b/dependencies/externals/org/apache/poi/poi/2.5.1-final-20040804/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.poi"
+ module="poi"
+ revision="2.5.1-final-20040804"
+ status="release"
+ publication="20060519182007"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="poi" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar b/dependencies/externals/org/apache/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar
new file mode 100644
index 0000000..149b801
--- /dev/null
+++ b/dependencies/externals/org/apache/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/xalan/xalan/2.7.0/ivy.xml b/dependencies/externals/org/apache/xalan/xalan/2.7.0/ivy.xml
new file mode 100755
index 0000000..d7f070c
--- /dev/null
+++ b/dependencies/externals/org/apache/xalan/xalan/2.7.0/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.xalan"
+ module="xalan"
+ revision="2.7.0"
+ status="release"
+ publication="20061122132700"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="xalan" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/xalan/xalan/2.7.0/xalan-2.7.0.jar b/dependencies/externals/org/apache/xalan/xalan/2.7.0/xalan-2.7.0.jar
new file mode 100644
index 0000000..007be39
--- /dev/null
+++ b/dependencies/externals/org/apache/xalan/xalan/2.7.0/xalan-2.7.0.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/xmlgraphics/batik/1.6/batik-all-1.6.jar b/dependencies/externals/org/apache/xmlgraphics/batik/1.6/batik-all-1.6.jar
new file mode 100644
index 0000000..7b59021
--- /dev/null
+++ b/dependencies/externals/org/apache/xmlgraphics/batik/1.6/batik-all-1.6.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/xmlgraphics/batik/1.6/ivy.xml b/dependencies/externals/org/apache/xmlgraphics/batik/1.6/ivy.xml
new file mode 100755
index 0000000..be97ba9
--- /dev/null
+++ b/dependencies/externals/org/apache/xmlgraphics/batik/1.6/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.xmlgraphics"
+ module="batik"
+ revision="1.6"
+ status="release"
+ publication="20060519182007"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="batik-all" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/xmlgraphics/commons/1.1/ivy.xml b/dependencies/externals/org/apache/xmlgraphics/commons/1.1/ivy.xml
new file mode 100755
index 0000000..030169e
--- /dev/null
+++ b/dependencies/externals/org/apache/xmlgraphics/commons/1.1/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.xmlgraphics"
+ module="commons"
+ revision="1.1"
+ status="release"
+ publication="20060519182007"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="xmlgraphics-commons" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/apache/xmlgraphics/commons/1.1/xmlgraphics-commons-1.1.jar b/dependencies/externals/org/apache/xmlgraphics/commons/1.1/xmlgraphics-commons-1.1.jar
new file mode 100644
index 0000000..7fd9648
--- /dev/null
+++ b/dependencies/externals/org/apache/xmlgraphics/commons/1.1/xmlgraphics-commons-1.1.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/xmlgraphics/fop/0.9.3/fop-0.9.3.jar b/dependencies/externals/org/apache/xmlgraphics/fop/0.9.3/fop-0.9.3.jar
new file mode 100644
index 0000000..adcf0d3
--- /dev/null
+++ b/dependencies/externals/org/apache/xmlgraphics/fop/0.9.3/fop-0.9.3.jar
Binary files differ
diff --git a/dependencies/externals/org/apache/xmlgraphics/fop/0.9.3/ivy.xml b/dependencies/externals/org/apache/xmlgraphics/fop/0.9.3/ivy.xml
new file mode 100755
index 0000000..9451aa6
--- /dev/null
+++ b/dependencies/externals/org/apache/xmlgraphics/fop/0.9.3/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="org.apache.xmlgraphics"
+ module="fop"
+ revision="0.9.3"
+ status="release"
+ publication="20060519182007"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="fop" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar b/dependencies/externals/org/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
new file mode 100644
index 0000000..c8c4dbb
--- /dev/null
+++ b/dependencies/externals/org/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
Binary files differ
diff --git a/dependencies/externals/org/dom4j/dom4j/1.6.1/ivy.xml b/dependencies/externals/org/dom4j/dom4j/1.6.1/ivy.xml
new file mode 100755
index 0000000..0854ad0
--- /dev/null
+++ b/dependencies/externals/org/dom4j/dom4j/1.6.1/ivy.xml
@@ -0,0 +1,15 @@
+<ivy-module version="1.0">
+ <info organisation="org.dom4j"
+ module="dom4j"
+ revision="1.6.1"
+ status="release"
+ publication="20060910013012"
+ default="true"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="dom4j" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/slf4j/nlog4j/1.2.24/ivy.xml b/dependencies/externals/org/slf4j/nlog4j/1.2.24/ivy.xml
new file mode 100755
index 0000000..5a28665
--- /dev/null
+++ b/dependencies/externals/org/slf4j/nlog4j/1.2.24/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="org.slf4j"
+ module="nlog4j"
+ revision="1.2.24"
+ status="release"
+ publication="20060105024201"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="nlog4j" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/slf4j/nlog4j/1.2.24/nlog4j-1.2.24.jar b/dependencies/externals/org/slf4j/nlog4j/1.2.24/nlog4j-1.2.24.jar
new file mode 100644
index 0000000..00d1a58
--- /dev/null
+++ b/dependencies/externals/org/slf4j/nlog4j/1.2.24/nlog4j-1.2.24.jar
Binary files differ
diff --git a/dependencies/externals/org/slf4j/nlog4j/1.2.25/ivy.xml b/dependencies/externals/org/slf4j/nlog4j/1.2.25/ivy.xml
new file mode 100755
index 0000000..aa573a4
--- /dev/null
+++ b/dependencies/externals/org/slf4j/nlog4j/1.2.25/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="org.slf4j"
+ module="nlog4j"
+ revision="1.2.25"
+ status="release"
+ publication="20060910024201"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="nlog4j" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/slf4j/nlog4j/1.2.25/nlog4j-1.2.25.jar b/dependencies/externals/org/slf4j/nlog4j/1.2.25/nlog4j-1.2.25.jar
new file mode 100644
index 0000000..e398699
--- /dev/null
+++ b/dependencies/externals/org/slf4j/nlog4j/1.2.25/nlog4j-1.2.25.jar
Binary files differ
diff --git a/dependencies/externals/org/xmlpull/xpp3/1.1.3_8/ivy.xml b/dependencies/externals/org/xmlpull/xpp3/1.1.3_8/ivy.xml
new file mode 100755
index 0000000..db19f1e
--- /dev/null
+++ b/dependencies/externals/org/xmlpull/xpp3/1.1.3_8/ivy.xml
@@ -0,0 +1,15 @@
+<ivy-module version="1.0">
+ <info organisation="org.xmlpull"
+ module="xpp3"
+ revision="1.1.3_8"
+ status="release"
+ publication="20060910013012"
+ default="true"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="xpp3" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/org/xmlpull/xpp3/1.1.3_8/xpp3-1.1.3_8.jar b/dependencies/externals/org/xmlpull/xpp3/1.1.3_8/xpp3-1.1.3_8.jar
new file mode 100644
index 0000000..c9822e6
--- /dev/null
+++ b/dependencies/externals/org/xmlpull/xpp3/1.1.3_8/xpp3-1.1.3_8.jar
Binary files differ
diff --git a/dependencies/externals/velocity/velocity-dep/1.4/ivy.xml b/dependencies/externals/velocity/velocity-dep/1.4/ivy.xml
new file mode 100755
index 0000000..25ea0ca
--- /dev/null
+++ b/dependencies/externals/velocity/velocity-dep/1.4/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="velocity"
+ module="velocity-dep"
+ revision="1.4"
+ status="release"
+ publication="20060519182007"
+ />
+ <configurations>
+ <conf name="default" visibility="public" />
+ </configurations>
+ <publications>
+ <artifact name="velocity-dep" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/velocity/velocity-dep/1.4/velocity-dep-1.4.jar b/dependencies/externals/velocity/velocity-dep/1.4/velocity-dep-1.4.jar
new file mode 100755
index 0000000..375712b
--- /dev/null
+++ b/dependencies/externals/velocity/velocity-dep/1.4/velocity-dep-1.4.jar
Binary files differ
diff --git a/dependencies/externals/xerces/xercesImpl/2.0.2/ivy.xml b/dependencies/externals/xerces/xercesImpl/2.0.2/ivy.xml
new file mode 100644
index 0000000..237985a
--- /dev/null
+++ b/dependencies/externals/xerces/xercesImpl/2.0.2/ivy.xml
@@ -0,0 +1,14 @@
+<ivy-module version="1.0">
+ <info organisation="xerces"
+ module="xercesImpl"
+ revision="2.0.2"
+ status="release"
+ publication="20070329102238"
+ />
+ <configurations>
+ <conf name="default" visibility="public"/>
+ </configurations>
+ <publications>
+ <artifact name="xercesImpl" type="jar" ext="jar" conf="default"/>
+ </publications>
+</ivy-module>
diff --git a/dependencies/externals/xerces/xercesImpl/2.0.2/xercesImpl-2.0.2.jar b/dependencies/externals/xerces/xercesImpl/2.0.2/xercesImpl-2.0.2.jar
new file mode 100644
index 0000000..a9c247e
--- /dev/null
+++ b/dependencies/externals/xerces/xercesImpl/2.0.2/xercesImpl-2.0.2.jar
Binary files differ
diff --git a/doap_dirstudio.rdf b/doap_dirstudio.rdf
new file mode 100644
index 0000000..b7a93ac
--- /dev/null
+++ b/doap_dirstudio.rdf
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl"?>
+<rdf:RDF xml:lang="en"
+ xmlns="http://usefulinc.com/ns/doap#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:asfext="http://projects.apache.org/ns/asfext#"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/">
+<!--
+ =======================================================================
+
+ Copyright (c) 2006 The Apache Software Foundation.
+ All rights reserved.
+
+ =======================================================================
+-->
+ <Project rdf:about="http://directory.apache.org/studio/">
+ <created>2007-05-04</created>
+ <license rdf:resource="http://usefulinc.com/doap/licenses/asl20" />
+ <name>Apache Directory Studio</name>
+ <homepage rdf:resource="http://directory.apache.org/studio/" />
+ <asfext:pmc rdf:resource="http://directory.apache.org" />
+ <shortdesc>Apache Directory Studio is a complete LDAP tooling platform intended to be used with any LDAP server however it is particularly designed for use with the Apache Directory Server.</shortdesc>
+ <description>Apache Directory Studio is a complete LDAP tooling platform intended to be used with any LDAP server however it is particularly designed for use with the Apache Directory Server. Developed as a sub-project of the Directory Top Level Project, Apache Directory Studio is an Eclipse RCP application that takes full advantage of the benefits inherent in the Eclipse platform. Composed of several Eclipse (OSGi) plugins, Apache Directory Studio can be easily upgraded with additional plugins. Apache Directory Studio plugins can even run within a full installation of Eclipse itself.</description>
+ <bug-database rdf:resource="http://issues.apache.org/jira/browse/DIRSTUDIO" />
+ <mailing-list rdf:resource="http://directory.apache.org/studio/mailing-lists.html" />
+ <download-page rdf:resource="http://directory.apache.org/studio/downloads.html" />
+ <programming-language>Java</programming-language>
+ <category rdf:resource="http://projects.apache.org/category/network-client" />
+ <release>
+ <Version>
+ <name>Stable release</name>
+ <created>2007-05-02</created>
+ <revision>0.8.0</revision>
+ </Version>
+ </release>
+ <repository>
+ <SVNRepository>
+ <location rdf:resource="http://svn.apache.org/repos/asf/directory/studio/"/>
+ <browse rdf:resource="http://svn.apache.org/viewvc/directory/studio/"/>
+ </SVNRepository>
+ </repository>
+ <maintainer>
+ <foaf:Person>
+ <foaf:name>Pierre-Arnaud Marcelot</foaf:name>
+ <foaf:mbox rdf:resource="mailto:pamarcelot@apache.org"/>
+ </foaf:Person>
+ </maintainer>
+ <asfext:implements><asfext:Standard>
+ <asfext:title>Lightweight Directory Access Protocol (LDAP): The Protocol</asfext:title>
+ <asfext:body>IETF</asfext:body>
+ <asfext:id>RFC 4511</asfext:id>
+ <asfext:url rdf:resource="http://www.ietf.org/rfc/rfc4511.txt"/>
+ </asfext:Standard></asfext:implements>
+ </Project>
+</rdf:RDF>
diff --git a/docs/LICENSE.txt b/docs/LICENSE.txt
new file mode 100644
index 0000000..ca801be
--- /dev/null
+++ b/docs/LICENSE.txt
@@ -0,0 +1,403 @@
+
+ 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.
+
+--------------------------------------------------------------------------------
+
+ IVY License
+
+Copyright (c) 1998, Regents of the University of California
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the University of California, Berkeley nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+--------------------------------------------------------------------------------
+
+ NLOG4J License
+
+Copyright (c) 2004-2006 SLF4J.ORG
+Copyright (c) 2004-2006 QOS.ch
+
+All rights reserved.
+
+Permissqion is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+--------------------------------------------------------------------------------
+
+ DOM4J License
+
+ Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain copyright statements and notices. Redistributions must also contain a copy of this document.
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ 3. The name "DOM4J" must not be used to endorse or promote products derived from this Software without prior written permission of MetaStuff, Ltd. For written permission, please contact dom4j-info@metastuff.com.
+ 4. Products derived from this Software may not be called "DOM4J" nor may "DOM4J" appear in their names without prior written permission of MetaStuff, Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.
+ 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org
+
+THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
+
+--------------------------------------------------------------------------------
+
+ XMLPullParser 3 License
+
+Indiana University Extreme! Lab Software License
+
+Version 1.1.1
+
+Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+3. The end-user documentation included with the redistribution, if any,
+ must include the following acknowledgment:
+
+ "This product includes software developed by the Indiana University
+ Extreme! Lab (http://www.extreme.indiana.edu/)."
+
+Alternately, this acknowledgment may appear in the software itself,
+if and wherever such third-party acknowledgments normally appear.
+
+4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
+must not be used to endorse or promote products derived from this
+software without prior written permission. For written permission,
+please contact http://www.extreme.indiana.edu/.
+
+5. Products derived from this software may not use "Indiana Univeristy"
+name nor may "Indiana Univeristy" appear in their name, without prior
+written permission of the Indiana University.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHORS, COPYRIGHT HOLDERS OR ITS CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+--------------------------------------------------------------------------------
+
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENTÕS ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+ a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+ b) in the case of each subsequent Contributor:
+
+ i)changes to the Program, and
+
+ ii)additions to the Program;
+
+ where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such ContributorÕs behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is RecipientÕs responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+ a) it complies with the terms and conditions of this Agreement; and
+
+ b) its license agreement:
+
+ i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+ iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+ iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+ a) it must be made available under this Agreement; and
+
+ b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial ContributorÕs responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such RecipientÕs patent(s), then such RecipientÕs rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All RecipientÕs rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all RecipientÕs rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, RecipientÕs obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
diff --git a/docs/NOTICE.txt b/docs/NOTICE.txt
new file mode 100644
index 0000000..202e0b8
--- /dev/null
+++ b/docs/NOTICE.txt
Binary files differ
diff --git a/docs/Release Notes.txt b/docs/Release Notes.txt
new file mode 100644
index 0000000..b766c45
--- /dev/null
+++ b/docs/Release Notes.txt
Binary files differ
diff --git a/docs/images/Apache Directory Server/server-icon_128x128.psd b/docs/images/Apache Directory Server/server-icon_128x128.psd
new file mode 100644
index 0000000..2b0613e
--- /dev/null
+++ b/docs/images/Apache Directory Server/server-icon_128x128.psd
Binary files differ
diff --git a/docs/images/Apache Directory Server/server-icon_16x16.psd b/docs/images/Apache Directory Server/server-icon_16x16.psd
new file mode 100644
index 0000000..359cc6e
--- /dev/null
+++ b/docs/images/Apache Directory Server/server-icon_16x16.psd
Binary files differ
diff --git a/docs/images/Apache Directory Server/server-icon_24x24.psd b/docs/images/Apache Directory Server/server-icon_24x24.psd
new file mode 100644
index 0000000..922e556
--- /dev/null
+++ b/docs/images/Apache Directory Server/server-icon_24x24.psd
Binary files differ
diff --git a/docs/images/Apache Directory Server/server-icon_32x32.psd b/docs/images/Apache Directory Server/server-icon_32x32.psd
new file mode 100644
index 0000000..d78f88a
--- /dev/null
+++ b/docs/images/Apache Directory Server/server-icon_32x32.psd
Binary files differ
diff --git a/docs/images/Apache Directory Server/server-icon_48x48.psd b/docs/images/Apache Directory Server/server-icon_48x48.psd
new file mode 100644
index 0000000..c993ca8
--- /dev/null
+++ b/docs/images/Apache Directory Server/server-icon_48x48.psd
Binary files differ
diff --git a/docs/images/Apache Directory Server/server-icon_64x64.psd b/docs/images/Apache Directory Server/server-icon_64x64.psd
new file mode 100644
index 0000000..a57196c
--- /dev/null
+++ b/docs/images/Apache Directory Server/server-icon_64x64.psd
Binary files differ
diff --git a/docs/images/Apache Directory Studio/studio-icon.icns b/docs/images/Apache Directory Studio/studio-icon.icns
new file mode 100644
index 0000000..54913c2
--- /dev/null
+++ b/docs/images/Apache Directory Studio/studio-icon.icns
Binary files differ
diff --git a/docs/images/Apache Directory Studio/studio-icon.ico b/docs/images/Apache Directory Studio/studio-icon.ico
new file mode 100755
index 0000000..0e86e92
--- /dev/null
+++ b/docs/images/Apache Directory Studio/studio-icon.ico
Binary files differ
diff --git a/docs/images/Apache Directory Studio/studio-icon.xpm b/docs/images/Apache Directory Studio/studio-icon.xpm
new file mode 100644
index 0000000..400a037
--- /dev/null
+++ b/docs/images/Apache Directory Studio/studio-icon.xpm
@@ -0,0 +1,1590 @@
+/* XPM */
+static char * test2_xpm[] = {
+"48 48 1539 2",
+" c None",
+". c #E5F4FB",
+"+ c #EFF8FC",
+"@ c #EEF8FC",
+"# c #EDF7FC",
+"$ c #ECF7FC",
+"% c #EAF6FC",
+"& c #E8F5FB",
+"* c #E7F4FB",
+"= c #E5F3FA",
+"- c #E2F1F9",
+"; c #E0F0F8",
+"> c #DDEEF7",
+", c #DAECF5",
+"' c #D6E9F4",
+") c #D3E8F4",
+"! c #CEE4F0",
+"~ c #CBE2F0",
+"{ c #C8E1F0",
+"] c #C3DEEE",
+"^ c #BFDBEC",
+"/ c #BAD8EB",
+"( c #B6D4E8",
+"_ c #B1D1E5",
+": c #ACCDE3",
+"< c #A7C9E0",
+"[ c #A2C5DE",
+"} c #9DC1DB",
+"| c #97BDD8",
+"1 c #92B8D6",
+"2 c #8DB4D2",
+"3 c #88B0CF",
+"4 c #82ABCC",
+"5 c #7DA7C9",
+"6 c #77A2C6",
+"7 c #729DC3",
+"8 c #6D99BF",
+"9 c #6894BC",
+"0 c #628EB8",
+"a c #5F8BB6",
+"b c #F2FAFD",
+"c c #EFF8FD",
+"d c #E6F5FB",
+"e c #E4F3FA",
+"f c #E3F3FA",
+"g c #E2F2FA",
+"h c #E0F1F9",
+"i c #DEF0F9",
+"j c #DBEEF8",
+"k c #D9EDF7",
+"l c #D8EDF8",
+"m c #D4EAF5",
+"n c #C9DBE5",
+"o c #C9D9E2",
+"p c #C7DBE6",
+"q c #BBCDD8",
+"r c #BDD3DF",
+"s c #BEDBEC",
+"t c #B9D8EC",
+"u c #B7D5E8",
+"v c #ADD1E6",
+"w c #A8CDE5",
+"x c #A3C8E1",
+"y c #9EC4DD",
+"z c #9AC0DB",
+"A c #95BCD9",
+"B c #90B8D6",
+"C c #8BB4D3",
+"D c #85AFCF",
+"E c #81ABCD",
+"F c #7BA7CA",
+"G c #76A2C6",
+"H c #729EC3",
+"I c #6C99C0",
+"J c #6794BC",
+"K c #6290B9",
+"L c #5D8BB6",
+"M c #5F8BB5",
+"N c #F3FAFE",
+"O c #E8F5FC",
+"P c #E7F5FB",
+"Q c #E6F4FB",
+"R c #E5F4FA",
+"S c #E1F2FA",
+"T c #E0F0F9",
+"U c #DEF0F8",
+"V c #DCEFF9",
+"W c #DAEFFA",
+"X c #CDE1ED",
+"Y c #D1DBE1",
+"Z c #C8D4DB",
+"` c #C3D2DA",
+" . c #B9C7CF",
+".. c #BCCAD3",
+"+. c #B6CAD6",
+"@. c #B0C8D7",
+"#. c #B6CCDB",
+"$. c #ACC4D2",
+"%. c #A7C8DD",
+"&. c #A3C6DE",
+"*. c #9FC3DB",
+"=. c #9DC4DF",
+"-. c #96BEDA",
+";. c #92BAD7",
+">. c #8DB7D5",
+",. c #88B2D1",
+"'. c #83AECF",
+"). c #7EA9CC",
+"!. c #79A4C8",
+"~. c #74A0C6",
+"{. c #6F9CC3",
+"]. c #6A98BF",
+"^. c #6693BB",
+"/. c #608FB8",
+"(. c #5C8AB5",
+"_. c #5D89B5",
+":. c #F2F9FD",
+"<. c #E4F4FB",
+"[. c #E1F1FA",
+"}. c #DFF1FA",
+"|. c #DDF0FA",
+"1. c #D9ECF4",
+"2. c #D3E7F2",
+"3. c #D0E1EB",
+"4. c #CBDAE3",
+"5. c #C9D7DE",
+"6. c #C8D7E0",
+"7. c #BED1DB",
+"8. c #C7CED2",
+"9. c #BAC7CE",
+"0. c #BBCCD5",
+"a. c #BBC9D0",
+"b. c #ACC3D1",
+"c. c #AFC0CB",
+"d. c #A1BBCB",
+"e. c #A5C0D1",
+"f. c #9BBCD3",
+"g. c #98C2E0",
+"h. c #94BDDB",
+"i. c #8FBAD9",
+"j. c #89B5D4",
+"k. c #84B1D1",
+"l. c #81ACCE",
+"m. c #7BA8CA",
+"n. c #76A3C7",
+"o. c #719FC4",
+"p. c #6C9AC1",
+"q. c #6796BE",
+"r. c #6391BB",
+"s. c #5F8DB7",
+"t. c #5A88B4",
+"u. c #5A87B3",
+"v. c #E3F4FC",
+"w. c #E1F3FC",
+"x. c #DFF0F9",
+"y. c #DAE9F1",
+"z. c #CEDFE7",
+"A. c #D2DEE5",
+"B. c #CFD9DF",
+"C. c #CAD5DB",
+"D. c #C0D2DC",
+"E. c #BDD0DB",
+"F. c #D1DFE6",
+"G. c #C5D3DB",
+"H. c #BBC9D2",
+"I. c #C1D2DC",
+"J. c #B2C7D4",
+"K. c #C1CDD5",
+"L. c #B2C5D1",
+"M. c #9BB5C6",
+"N. c #9FBACC",
+"O. c #94B7CF",
+"P. c #8FB8D6",
+"Q. c #8CB3D0",
+"R. c #86B1D1",
+"S. c #81ADCF",
+"T. c #7BA9CD",
+"U. c #79A6CA",
+"V. c #72A0C5",
+"W. c #6F9DC3",
+"X. c #6A98C0",
+"Y. c #6594BC",
+"Z. c #608FBA",
+"`. c #5C8BB6",
+" + c #5886B3",
+".+ c #5685B1",
+"++ c #E3F2F9",
+"@+ c #DEEEF5",
+"#+ c #DDEFF8",
+"$+ c #D9EAF2",
+"%+ c #D4DEE3",
+"&+ c #C7D5DD",
+"*+ c #DCE6EB",
+"=+ c #DBDEE0",
+"-+ c #BDD0D9",
+";+ c #D5DFE5",
+">+ c #BCCCD5",
+",+ c #BFD4E1",
+"'+ c #BED2DE",
+")+ c #C6D8E2",
+"!+ c #C2CFD8",
+"~+ c #BACCD7",
+"{+ c #A6BBC9",
+"]+ c #BCCFDA",
+"^+ c #B8C9D4",
+"/+ c #8FB0C6",
+"(+ c #92B1C5",
+"_+ c #9BB1C0",
+":+ c #91AFC4",
+"<+ c #83A4BC",
+"[+ c #7DA5C3",
+"}+ c #7CA4C3",
+"|+ c #83A8C4",
+"1+ c #739FC1",
+"2+ c #70A0C6",
+"3+ c #6C9BC2",
+"4+ c #6192BB",
+"5+ c #5D8DB8",
+"6+ c #5989B5",
+"7+ c #5586B1",
+"8+ c #5181AE",
+"9+ c #E4F3FB",
+"0+ c #E3F3FB",
+"a+ c #E1F3FB",
+"b+ c #DCE7EC",
+"c+ c #D3DFE6",
+"d+ c #D3E0E7",
+"e+ c #D0DFE6",
+"f+ c #D1DDE4",
+"g+ c #D0DFE7",
+"h+ c #CFD5D9",
+"i+ c #CEE1EA",
+"j+ c #C4CED3",
+"k+ c #AFC7D5",
+"l+ c #C2D4DD",
+"m+ c #C6D6E0",
+"n+ c #C3CFD5",
+"o+ c #B5BFC4",
+"p+ c #9CB5C6",
+"q+ c #B2C9D8",
+"r+ c #A9BCC9",
+"s+ c #94B7CD",
+"t+ c #94BDDA",
+"u+ c #A3B7C5",
+"v+ c #90A5B5",
+"w+ c #82A4BC",
+"x+ c #8FAFC6",
+"y+ c #96ADBE",
+"z+ c #829BAE",
+"A+ c #6D96B6",
+"B+ c #6C9EC6",
+"C+ c #6898C0",
+"D+ c #6393BC",
+"E+ c #5F8EBA",
+"F+ c #5A8AB7",
+"G+ c #5587B3",
+"H+ c #5485B1",
+"I+ c #4C7CAC",
+"J+ c #E3F2FA",
+"K+ c #DEF1FA",
+"L+ c #D6E2E9",
+"M+ c #EBEBEC",
+"N+ c #D6E4EB",
+"O+ c #CADCE5",
+"P+ c #DFEAEF",
+"Q+ c #D7E3E8",
+"R+ c #B9CFDB",
+"S+ c #D5DBDD",
+"T+ c #C2D9E5",
+"U+ c #C6D7E1",
+"V+ c #CAD3D8",
+"W+ c #C7D3DA",
+"X+ c #C4D3DB",
+"Y+ c #B2C3CD",
+"Z+ c #B6C0C7",
+"`+ c #B1C7D4",
+" @ c #A0BED1",
+".@ c #A6BAC7",
+"+@ c #93B3C7",
+"@@ c #9CBED5",
+"#@ c #92AEC1",
+"$@ c #ABBBC6",
+"%@ c #82A3BC",
+"&@ c #92B7D1",
+"*@ c #B0B8BE",
+"=@ c #728EA4",
+"-@ c #6595BC",
+";@ c #699BC5",
+">@ c #6595BE",
+",@ c #6092BB",
+"'@ c #5B8DB8",
+")@ c #5789B5",
+"!@ c #5384B2",
+"~@ c #5282B0",
+"{@ c #4477A8",
+"]@ c #EAF6FB",
+"^@ c #E1F2F9",
+"/@ c #DAE9F0",
+"(@ c #D0E2EB",
+"_@ c #ECF0F0",
+":@ c #ECF0F2",
+"<@ c #C9DCE5",
+"[@ c #D1E1E9",
+"}@ c #D4E0E6",
+"|@ c #CCDCE3",
+"1@ c #D3DADE",
+"2@ c #C5D5DF",
+"3@ c #C3DCEA",
+"4@ c #D6DBDD",
+"5@ c #BDC8CF",
+"6@ c #D0D8DD",
+"7@ c #CBD4D9",
+"8@ c #ABC1CF",
+"9@ c #9DBED4",
+"0@ c #B7C2C9",
+"a@ c #97B1C2",
+"b@ c #8AAAC1",
+"c@ c #91B3CB",
+"d@ c #9DB4C4",
+"e@ c #5F8DAF",
+"f@ c #ABC6D9",
+"g@ c #BABDC0",
+"h@ c #5A84A4",
+"i@ c #6E9CC2",
+"j@ c #6C95B7",
+"k@ c #5E8FB8",
+"l@ c #598EBB",
+"m@ c #598BB7",
+"n@ c #5486B3",
+"o@ c #5182B0",
+"p@ c #4D7FAD",
+"q@ c #3B70A3",
+"r@ c #DDF1FB",
+"s@ c #D7E6EE",
+"t@ c #D6E0E6",
+"u@ c #CADFEA",
+"v@ c #DCE3E7",
+"w@ c #DBE0E4",
+"x@ c #C0D6E3",
+"y@ c #CCDFE9",
+"z@ c #CFDADF",
+"A@ c #E5EBEE",
+"B@ c #DBE0E3",
+"C@ c #C1D5E0",
+"D@ c #A9C0CD",
+"E@ c #E0EDF3",
+"F@ c #E4E6E7",
+"G@ c #A5B4BE",
+"H@ c #98B6C9",
+"I@ c #B0CFE2",
+"J@ c #BFC5C9",
+"K@ c #95ADBE",
+"L@ c #8DADC4",
+"M@ c #86ADC9",
+"N@ c #92ACC0",
+"O@ c #759FBE",
+"P@ c #A6B7C4",
+"Q@ c #718CA1",
+"R@ c #759EBE",
+"S@ c #9EAFBC",
+"T@ c #537DA0",
+"U@ c #4E86B5",
+"V@ c #6A93B6",
+"W@ c #5685AF",
+"X@ c #5184B3",
+"Y@ c #4678AA",
+"Z@ c #31689F",
+"`@ c #DEEFF9",
+" # c #DCEFF8",
+".# c #DAEEF9",
+"+# c #D6EBF7",
+"@# c #CEDAE0",
+"## c #D7DFE4",
+"$# c #CBE2EF",
+"%# c #DDE4E8",
+"&# c #BCD8E7",
+"*# c #C0D1DB",
+"=# c #C7D4DC",
+"-# c #BDC9D0",
+";# c #D7DDE0",
+"># c #D2D7DB",
+",# c #9DBDD1",
+"'# c #BDDBED",
+")# c #BFCAD1",
+"!# c #B2C1CB",
+"~# c #A0BDCF",
+"{# c #C7CCCF",
+"]# c #9FB1BC",
+"^# c #77A1BF",
+"/# c #93BBD7",
+"(# c #9CAFBC",
+"_# c #85A6BF",
+":# c #89A3B6",
+"<# c #5A89AD",
+"[# c #7E9DB6",
+"}# c #547C9D",
+"|# c #749DBE",
+"1# c #AABCCB",
+"2# c #5C7E9B",
+"3# c #4D80AD",
+"4# c #4E83B2",
+"5# c #4E80AF",
+"6# c #3A70A4",
+"7# c #2C659C",
+"8# c #DAEEF7",
+"9# c #D9EEF8",
+"0# c #D7ECF8",
+"a# c #CAE1ED",
+"b# c #CEDCE3",
+"c# c #CAD9E1",
+"d# c #DEE4E8",
+"e# c #C3D6E1",
+"f# c #B5CDDA",
+"g# c #C6D0D6",
+"h# c #AEC6D6",
+"i# c #B5CCDA",
+"j# c #EEE9E6",
+"k# c #B6CDDA",
+"l# c #93C2E0",
+"m# c #B8CAD6",
+"n# c #CBD0D2",
+"o# c #8CAFC6",
+"p# c #A4C8DF",
+"q# c #CBCDCE",
+"r# c #96ABB9",
+"s# c #609AC2",
+"t# c #B2CBDD",
+"u# c #94A9B8",
+"v# c #81A0B8",
+"w# c #7397B4",
+"x# c #779CBA",
+"y# c #6C91AE",
+"z# c #6E96B7",
+"A# c #AAB8C4",
+"B# c #939EA7",
+"C# c #3D709C",
+"D# c #4E84B5",
+"E# c #4F81B1",
+"F# c #477BAC",
+"G# c #2E679E",
+"H# c #2E659C",
+"I# c #D8EDF7",
+"J# c #D7EBF6",
+"K# c #D3E7F1",
+"L# c #D3ECF8",
+"M# c #CFE4ED",
+"N# c #CFDAE0",
+"O# c #C6E1EF",
+"P# c #BFD5E0",
+"Q# c #C4D9E4",
+"R# c #C4D8E3",
+"S# c #B7CDD9",
+"T# c #BDD5E3",
+"U# c #D3E1E7",
+"V# c #D6E1E8",
+"W# c #8ABBD8",
+"X# c #CADDE8",
+"Y# c #E0E3E5",
+"Z# c #79AECE",
+"`# c #C2DBEA",
+" $ c #C7CBCD",
+".$ c #6DA0C2",
+"+$ c #AACCE3",
+"@$ c #F4EEEA",
+"#$ c #82A4BD",
+"$$ c #76ACD2",
+"%$ c #8DA8BC",
+"&$ c #799AB3",
+"*$ c #7499B5",
+"=$ c #6594B8",
+"-$ c #88A5BC",
+";$ c #9AB1C2",
+">$ c #C6C8CA",
+",$ c #7E909F",
+"'$ c #30638F",
+")$ c #5088BA",
+"!$ c #5685B0",
+"~$ c #5F83A5",
+"{$ c #326BA0",
+"]$ c #29639C",
+"^$ c #2D649B",
+"/$ c #DFEFF8",
+"($ c #D6EBF6",
+"_$ c #D5EBF6",
+":$ c #D3E8F5",
+"<$ c #CDDEE7",
+"[$ c #CBDFEA",
+"}$ c #CAE7F5",
+"|$ c #C9DBE4",
+"1$ c #C8D9E2",
+"2$ c #BCD3E0",
+"3$ c #B8D0DD",
+"4$ c #D4E0E7",
+"5$ c #CCDCE4",
+"6$ c #C5D7E2",
+"7$ c #C6D3DB",
+"8$ c #CDD8DE",
+"9$ c #B6D3E4",
+"0$ c #8EC1DF",
+"a$ c #D2DCE1",
+"b$ c #ACC1CE",
+"c$ c #B4CDDC",
+"d$ c #B0C0CB",
+"e$ c #669EC3",
+"f$ c #BCD9EC",
+"g$ c #FFFDF8",
+"h$ c #88A5B9",
+"i$ c #87ABC5",
+"j$ c #7B9AB1",
+"k$ c #6E95B2",
+"l$ c #6A9ABF",
+"m$ c #9BB4C7",
+"n$ c #92A4B4",
+"o$ c #B4BDC3",
+"p$ c #919EA8",
+"q$ c #4B779C",
+"r$ c #7498B7",
+"s$ c #3971A2",
+"t$ c #6890B4",
+"u$ c #587A9A",
+"v$ c #1E5C98",
+"w$ c #2A649D",
+"x$ c #2A629A",
+"y$ c #DCEDF7",
+"z$ c #D3E9F5",
+"A$ c #D1E9F5",
+"B$ c #CFE8F5",
+"C$ c #C9DEE9",
+"D$ c #C9D5DA",
+"E$ c #BEDBEB",
+"F$ c #BFD1DB",
+"G$ c #D5DADD",
+"H$ c #B4D1E1",
+"I$ c #B1D0E1",
+"J$ c #DFE4E7",
+"K$ c #ADC1CC",
+"L$ c #A8C0CF",
+"M$ c #CBD5DC",
+"N$ c #C4D0D8",
+"O$ c #86B9D9",
+"P$ c #ABCBDF",
+"Q$ c #EDE7E4",
+"R$ c #B9C9D4",
+"S$ c #649CC1",
+"T$ c #BDD6E7",
+"U$ c #FFFFFF",
+"V$ c #A0B0BC",
+"W$ c #799AB1",
+"X$ c #869EB0",
+"Y$ c #98B7CF",
+"Z$ c #829AAC",
+"`$ c #5F809B",
+" % c #CBD0D3",
+".% c #91A4B4",
+"+% c #40749E",
+"@% c #7C96AC",
+"#% c #7494B0",
+"$% c #8EA3B5",
+"%% c #3F6385",
+"&% c #2A639A",
+"*% c #29639D",
+"=% c #2A6199",
+"-% c #D9EBF6",
+";% c #D0E7F4",
+">% c #CDE7F4",
+",% c #CDE8F8",
+"'% c #C7E1EE",
+")% c #C1D1DA",
+"!% c #D5DBDF",
+"~% c #C3D5DE",
+"{% c #AFCAD7",
+"]% c #CED8DE",
+"^% c #E0E8EC",
+"/% c #ABCDDF",
+"(% c #ABC5D3",
+"_% c #D4D9DA",
+":% c #97C0D8",
+"<% c #A0C1D5",
+"[% c #BBD3E2",
+"}% c #72AACE",
+"|% c #ECEFF2",
+"1% c #C7D0D6",
+"2% c #8BA8BC",
+"3% c #6AA0C5",
+"4% c #DBE9F4",
+"5% c #C5C8CB",
+"6% c #7794A8",
+"7% c #91ADC1",
+"8% c #7C9BB1",
+"9% c #8EABC2",
+"0% c #8CA3B6",
+"a% c #4478A1",
+"b% c #A6BAC9",
+"c% c #F3F1EE",
+"d% c #7D93A7",
+"e% c #6F8EA8",
+"f% c #61809B",
+"g% c #7B94AB",
+"h% c #7F8F9C",
+"i% c #4A6580",
+"j% c #41688F",
+"k% c #225C96",
+"l% c #296099",
+"m% c #D5EAF5",
+"n% c #CBE4F2",
+"o% c #CCE4F1",
+"p% c #C8E1EE",
+"q% c #C5E0F0",
+"r% c #BFDCEC",
+"s% c #BACDD8",
+"t% c #D7D9DB",
+"u% c #BED4E0",
+"v% c #AECADA",
+"w% c #CED3D6",
+"x% c #CCD7DE",
+"y% c #A9C9DB",
+"z% c #D5DDE3",
+"A% c #BED1DE",
+"B% c #76B3D8",
+"C% c #BAD3E3",
+"D% c #E6E6E6",
+"E% c #76A9CA",
+"F% c #B0CEE1",
+"G% c #C3CBD0",
+"H% c #84A4B9",
+"I% c #83B1D2",
+"J% c #BCC7CF",
+"K% c #69879B",
+"L% c #80A4BE",
+"M% c #8FAABE",
+"N% c #98B0C2",
+"O% c #93A8B8",
+"P% c #44769D",
+"Q% c #99B6CD",
+"R% c #E2E2E1",
+"S% c #4D6B84",
+"T% c #6B8CA7",
+"U% c #2C6496",
+"V% c #809FBC",
+"W% c #7F8A95",
+"X% c #204F7B",
+"Y% c #255A8E",
+"Z% c #265F97",
+"`% c #275E98",
+" & c #D1E7F3",
+".& c #C3DDEC",
+"+& c #C7D6DF",
+"@& c #C8D5DC",
+"#& c #BAD1DF",
+"$& c #BDD6E4",
+"%& c #B5D4E7",
+"&& c #BDD4E1",
+"*& c #D9E0E5",
+"=& c #ABCDE2",
+"-& c #BDCFDA",
+";& c #B6C7D1",
+">& c #C3D4DE",
+",& c #A4C2D5",
+"'& c #CBD8E0",
+")& c #B9D2E1",
+"!& c #99BCD3",
+"~& c #E8E9E8",
+"{& c #AFC9DA",
+"]& c #88B7D6",
+"^& c #DCDEE0",
+"/& c #85A2B5",
+"(& c #92BAD6",
+"_& c #A5B5C0",
+":& c #9EB1BF",
+"<& c #769BB5",
+"[& c #92AFC5",
+"}& c #B8C0C5",
+"|& c #5881A1",
+"1& c #74A1C4",
+"2& c #FFFCF8",
+"3& c #9AA4AD",
+"4& c #3B6B93",
+"5& c #3072AB",
+"6& c #6595BF",
+"7& c #818F9C",
+"8& c #10416E",
+"9& c #165A9A",
+"0& c #1F5F9F",
+"a& c #296299",
+"b& c #275D95",
+"c& c #CDE5F3",
+"d& c #C2DDEC",
+"e& c #CBD5DB",
+"f& c #AFCCDC",
+"g& c #B9CEDA",
+"h& c #ABC8D8",
+"i& c #C8D1D6",
+"j& c #CEDBE3",
+"k& c #A8CBE0",
+"l& c #ABC6D6",
+"m& c #98BFD6",
+"n& c #B4CAD7",
+"o& c #C3D5E0",
+"p& c #C6CCD1",
+"q& c #8FAABC",
+"r& c #C2CED5",
+"s& c #D9DFE3",
+"t& c #98B8CF",
+"u& c #FFFDF9",
+"v& c #94ACBD",
+"w& c #81A8C5",
+"x& c #EEEEED",
+"y& c #A3B1BC",
+"z& c #9AB6CA",
+"A& c #D4D7D9",
+"B& c #5B7D98",
+"C& c #6693B8",
+"D& c #C9D4DD",
+"E& c #C3C5C8",
+"F& c #6C7D8B",
+"G& c #567996",
+"H& c #2567A1",
+"I& c #4079AC",
+"J& c #65819B",
+"K& c #134573",
+"L& c #135798",
+"M& c #4377A9",
+"N& c #4B739B",
+"O& c #225990",
+"P& c #255C96",
+"Q& c #C9E2F1",
+"R& c #C0DDEE",
+"S& c #B6D5E5",
+"T& c #AEC6D5",
+"U& c #CAD6DD",
+"V& c #B6D3E5",
+"W& c #B8CDD9",
+"X& c #98BFD5",
+"Y& c #B5C9D5",
+"Z& c #BDD3E0",
+"`& c #ACC6D5",
+" * c #99BBD1",
+".* c #99C0D9",
+"+* c #A7BDCA",
+"@* c #F2F0EE",
+"#* c #A9C7DC",
+"$* c #5492BA",
+"%* c #AFC3D0",
+"&* c #EDECED",
+"** c #FFFFFE",
+"=* c #94ADBF",
+"-* c #88ACC5",
+";* c #B9C1C8",
+">* c #B6BDC3",
+",* c #708CA2",
+"'* c #779DBB",
+")* c #86A0B6",
+"!* c #849CB0",
+"~* c #718BA1",
+"{* c #457095",
+"]* c #7597B7",
+"^* c #A2B9CE",
+"/* c #8293A3",
+"(* c #446686",
+"_* c #6587A6",
+":* c #5C7A97",
+"<* c #5E7994",
+"[* c #486684",
+"}* c #1C5289",
+"|* c #C5E0EF",
+"1* c #B7D3E4",
+"2* c #C1D4DF",
+"3* c #BCCED9",
+"4* c #D3DDE2",
+"5* c #A7C5D8",
+"6* c #B3C7D4",
+"7* c #ADCADC",
+"8* c #9BBED3",
+"9* c #ABC0CC",
+"0* c #C5D2DA",
+"a* c #C7D1D8",
+"b* c #9CBBD0",
+"c* c #7EB0D0",
+"d* c #B1C6D3",
+"e* c #EFEBE8",
+"f* c #83B3D4",
+"g* c #6AA1C7",
+"h* c #F8F8F7",
+"i* c #8EA8BB",
+"j* c #A7C2D6",
+"k* c #6A859A",
+"l* c #849FB5",
+"m* c #CFD8DF",
+"n* c #8098AA",
+"o* c #3D709B",
+"p* c #90A9BD",
+"q* c #417098",
+"r* c #9BB6CE",
+"s* c #9EA7AF",
+"t* c #778593",
+"u* c #416382",
+"v* c #436A8F",
+"w* c #456B8F",
+"x* c #3C6288",
+"y* c #33577C",
+"z* c #1D4D7F",
+"A* c #245A94",
+"B* c #C0DCED",
+"C* c #B3D2E4",
+"D* c #B3C8D4",
+"E* c #B0C6D3",
+"F* c #A1C1D4",
+"G* c #BDCDD6",
+"H* c #CFDCE3",
+"I* c #C3D8E4",
+"J* c #B4C8D5",
+"K* c #9ABED4",
+"L* c #95B6CC",
+"M* c #B0C2CE",
+"N* c #C7D2D9",
+"O* c #A8BAC6",
+"P* c #8EB5CF",
+"Q* c #5E9EC9",
+"R* c #A4BCCD",
+"S* c #D3D8DC",
+"T* c #5F98C1",
+"U* c #CBDCE8",
+"V* c #94AABB",
+"W* c #CAD8E3",
+"X* c #BBC1C5",
+"Y* c #396E98",
+"Z* c #F5FCFF",
+"`* c #BEBEC0",
+" = c #7696B0",
+".= c #B8D1E5",
+"+= c #567B9B",
+"@= c #3974A7",
+"#= c #9BA8B4",
+"$= c #15426B",
+"%= c #003D7F",
+"&= c #12599C",
+"*= c #145898",
+"== c #105190",
+"-= c #165695",
+";= c #265D96",
+">= c #245992",
+",= c #245993",
+"'= c #BBD9EA",
+")= c #B1D4E9",
+"!= c #A9C5D6",
+"~= c #A8C5D6",
+"{= c #AECBDC",
+"]= c #9BB8CA",
+"^= c #ACBDC7",
+"/= c #C6CFD4",
+"(= c #B1BFC8",
+"_= c #C6D2DA",
+":= c #B6D1E2",
+"<= c #8BB0C8",
+"[= c #98B2C3",
+"}= c #DCE1E5",
+"|= c #BCCCD7",
+"1= c #8DBAD8",
+"2= c #5E9ECB",
+"3= c #C6D1DA",
+"4= c #A2B9CA",
+"5= c #A6C1D5",
+"6= c #A8B6C1",
+"7= c #DBDDDE",
+"8= c #6C8DA7",
+"9= c #AFCBE0",
+"0= c #C5C4C4",
+"a= c #919EA9",
+"b= c #D4D6D7",
+"c= c #AEAFB1",
+"d= c #244F74",
+"e= c #95ACC0",
+"f= c #7D8D9B",
+"g= c #245785",
+"h= c #6B90B3",
+"i= c #406B95",
+"j= c #3F6B96",
+"k= c #6986A3",
+"l= c #466F97",
+"m= c #416489",
+"n= c #396088",
+"o= c #24578E",
+"p= c #225793",
+"q= c #B6D5E9",
+"r= c #ADD2E9",
+"s= c #A6C7DC",
+"t= c #A4BCCB",
+"u= c #9FBCCE",
+"v= c #93B8D0",
+"w= c #85AFCA",
+"x= c #94B3C8",
+"y= c #B6C4CD",
+"z= c #9DBFD5",
+"A= c #BCD0DD",
+"B= c #CBCDD0",
+"C= c #DEDEDE",
+"D= c #70A7CE",
+"E= c #337DB3",
+"F= c #ACBBC7",
+"G= c #C8D2D9",
+"H= c #E8EAEC",
+"I= c #8A9FB1",
+"J= c #ADB3B9",
+"K= c #B9C0C5",
+"L= c #EAE6E2",
+"M= c #2F4D66",
+"N= c #002E66",
+"O= c #27659A",
+"P= c #A4B3BF",
+"Q= c #51728F",
+"R= c #225D93",
+"S= c #2B5A87",
+"T= c #2B5781",
+"U= c #426282",
+"V= c #576F86",
+"W= c #4A6A89",
+"X= c #28507B",
+"Y= c #456180",
+"Z= c #255384",
+"`= c #205693",
+" - c #B1D1E6",
+".- c #A7CCE5",
+"+- c #A6CAE0",
+"@- c #9DC3DC",
+"#- c #92B9D3",
+"$- c #9EC4DB",
+"%- c #97C4E1",
+"&- c #90BBD7",
+"*- c #8ABBDC",
+"=- c #85BADE",
+"-- c #7CADCC",
+";- c #98B4C8",
+">- c #C9D4DA",
+",- c #89A3B5",
+"'- c #3D6C8F",
+")- c #B1BEC7",
+"!- c #1568A6",
+"~- c #4984AF",
+"{- c #FFFFFB",
+"]- c #EBEEF1",
+"^- c #B2B6B9",
+"/- c #47657D",
+"(- c #D9DCDD",
+"_- c #3F5C76",
+":- c #1E5A8F",
+"<- c #729BBE",
+"[- c #C2D0DC",
+"}- c #B3B8BC",
+"|- c #4B6683",
+"1- c #5B80A4",
+"2- c #6086AA",
+"3- c #53799F",
+"4- c #476D93",
+"5- c #6A839D",
+"6- c #395D82",
+"7- c #336293",
+"8- c #355D8B",
+"9- c #22548B",
+"0- c #215691",
+"a- c #ACCEE4",
+"b- c #A3C9E2",
+"c- c #9CC2DC",
+"d- c #A2C2D6",
+"e- c #ACC1D0",
+"f- c #A5B7C2",
+"g- c #A2B9C7",
+"h- c #B4C8D6",
+"i- c #8CBBDB",
+"j- c #62A3CE",
+"k- c #3788BF",
+"l- c #186CA7",
+"m- c #719AB8",
+"n- c #2C72A4",
+"o- c #3E76A0",
+"p- c #A1B4C0",
+"q- c #1B659C",
+"r- c #CDDBE5",
+"s- c #FFFFFC",
+"t- c #335772",
+"u- c #3D73A0",
+"v- c #6F8598",
+"w- c #3E6A8F",
+"x- c #7D99B1",
+"y- c #738696",
+"z- c #A5A8AB",
+"A- c #1E466A",
+"B- c #1D5287",
+"C- c #3A648B",
+"D- c #547493",
+"E- c #496887",
+"F- c #45678A",
+"G- c #667C93",
+"H- c #37597E",
+"I- c #4F6D8E",
+"J- c #315984",
+"K- c #205289",
+"L- c #215490",
+"M- c #A7CAE1",
+"N- c #9EC4DE",
+"O- c #99C3DF",
+"P- c #98BAD2",
+"Q- c #97B3C6",
+"R- c #88ADC6",
+"S- c #8EAEC3",
+"T- c #98B4C7",
+"U- c #97AFC1",
+"V- c #AFC2D0",
+"W- c #98BDD6",
+"X- c #91B6CF",
+"Y- c #7EA3BE",
+"Z- c #386C91",
+"`- c #9FAFB9",
+" ; c #D0D9DF",
+".; c #004E92",
+"+; c #6795B7",
+"@; c #7594AB",
+"#; c #9CB6CA",
+"$; c #A7ACB0",
+"%; c #001454",
+"&; c #76A6CE",
+"*; c #D2D1D1",
+"=; c #49637F",
+"-; c #2B567F",
+";; c #C8D0D8",
+">; c #597186",
+",; c #084C8B",
+"'; c #296FB0",
+"); c #11579A",
+"!; c #094D8F",
+"~; c #175492",
+"{; c #1A5591",
+"]; c #0E4783",
+"^; c #1A518A",
+"/; c #2B5685",
+"(; c #275382",
+"_; c #1E518B",
+":; c #21548F",
+"<; c #A1C5DE",
+"[; c #98C0DC",
+"}; c #91BDDB",
+"|; c #8CBBDA",
+"1; c #8DBCDC",
+"2; c #8BBBDD",
+"3; c #6BA0C6",
+"4; c #7BA2BE",
+"5; c #8B98A1",
+"6; c #718696",
+"7; c #8E9EAB",
+"8; c #7B8C98",
+"9; c #7390A4",
+"0; c #547994",
+"a; c #CDCBCA",
+"b; c #BFD0DC",
+"c; c #5884A5",
+"d; c #DDDEDE",
+"e; c #F1F2F3",
+"f; c #365C7A",
+"g; c #3B6EA1",
+"h; c #FEFFFF",
+"i; c #4C667C",
+"j; c #265587",
+"k; c #D8E4EE",
+"l; c #A8A8AA",
+"m; c #506B82",
+"n; c #5D80A1",
+"o; c #5E7E9D",
+"p; c #6887A4",
+"q; c #5D81A5",
+"r; c #406993",
+"s; c #1B528B",
+"t; c #245E9B",
+"u; c #255C9A",
+"v; c #1C5696",
+"w; c #1F5693",
+"x; c #235690",
+"y; c #21528D",
+"z; c #93BCD9",
+"A; c #90BAD7",
+"B; c #8DB8D6",
+"C; c #89B6D6",
+"D; c #7BA4C2",
+"E; c #7695AB",
+"F; c #728999",
+"G; c #1B5885",
+"H; c #025B9A",
+"I; c #1D6CA6",
+"J; c #3C79A6",
+"K; c #B9C3C9",
+"L; c #627E93",
+"M; c #265F8A",
+"N; c #E9E4DF",
+"O; c #57748C",
+"P; c #86A3BA",
+"Q; c #F7F7F7",
+"R; c #859BAD",
+"S; c #BFCCD3",
+"T; c #CDCECF",
+"U; c #4F7291",
+"V; c #F3FAFC",
+"W; c #C0B8B1",
+"X; c #0C3B68",
+"Y; c #1D578D",
+"Z; c #2F5E89",
+"`; c #325C86",
+" > c #516F8E",
+".> c #6A7D91",
+"+> c #82909F",
+"@> c #617A93",
+"#> c #194E86",
+"$> c #21528A",
+"%> c #2F5B8B",
+"&> c #27588F",
+"*> c #20538E",
+"=> c #21528C",
+"-> c #97BDD9",
+";> c #8EB8D6",
+">> c #8BB6D5",
+",> c #88B4D3",
+"'> c #8EB8D7",
+")> c #72A6CA",
+"!> c #497DA1",
+"~> c #477291",
+"{> c #1E6497",
+"]> c #68A7D5",
+"^> c #8CAFC8",
+"/> c #487799",
+"(> c #C1D2DE",
+"_> c #657D8F",
+":> c #034E87",
+"<> c #1067AA",
+"[> c #608DAF",
+"}> c #C2CFD9",
+"|> c #8AA5BB",
+"1> c #F8F9FA",
+"2> c #E9E5E2",
+"3> c #929EA8",
+"4> c #DFE4E9",
+"5> c #ECE5DF",
+"6> c #334C63",
+"7> c #315A7F",
+"8> c #88A3BD",
+"9> c #1B5C9D",
+"0> c #2162A0",
+"a> c #1E5D9A",
+"b> c #0A4C90",
+"c> c #134A83",
+"d> c #476586",
+"e> c #496582",
+"f> c #395C82",
+"g> c #365C86",
+"h> c #29527F",
+"i> c #2A5281",
+"j> c #205089",
+"k> c #20518C",
+"l> c #91B9D6",
+"m> c #89B4D3",
+"n> c #86B2D2",
+"o> c #8BB5D4",
+"p> c #76A7CC",
+"q> c #4689BB",
+"r> c #367FB4",
+"s> c #3A7FB4",
+"t> c #6F99B7",
+"u> c #AEB4B7",
+"v> c #52728A",
+"w> c #5380A4",
+"x> c #9FA3A6",
+"y> c #1E547F",
+"z> c #347FBC",
+"A> c #2772AE",
+"B> c #004B90",
+"C> c #C3D3DF",
+"D> c #FEFEFE",
+"E> c #E6E7E8",
+"F> c #3E5B75",
+"G> c #EFF6FC",
+"H> c #2B4760",
+"I> c #003E7B",
+"J> c #08549B",
+"K> c #889EB2",
+"L> c #7C94AC",
+"M> c #0E4F91",
+"N> c #3A70A7",
+"O> c #4172A5",
+"P> c #295F99",
+"Q> c #1B528D",
+"R> c #154C8A",
+"S> c #2F5B8A",
+"T> c #2F5681",
+"U> c #194D89",
+"V> c #1E508A",
+"W> c #1F508B",
+"X> c #8CB5D4",
+"Y> c #83AFD0",
+"Z> c #87B1D1",
+"`> c #7BAACC",
+" , c #4C8BBB",
+"., c #4084B8",
+"+, c #4681AF",
+"@, c #7291A8",
+"#, c #5A7C96",
+"$, c #366080",
+"%, c #3F7097",
+"&, c #92A8BB",
+"*, c #426580",
+"=, c #216BA4",
+"-, c #1D6AA8",
+";, c #4684B4",
+">, c #648CAD",
+",, c #778597",
+"', c #DDE0E2",
+"), c #E9EFF4",
+"!, c #CCC5BF",
+"~, c #285885",
+"{, c #185FA3",
+"], c #1F609F",
+"^, c #35618C",
+"/, c #969FA7",
+"(, c #8296AB",
+"_, c #3C6086",
+":, c #7A8B9D",
+"<, c #315983",
+"[, c #1B5593",
+"}, c #255A94",
+"|, c #1F5591",
+"1, c #1C508D",
+"2, c #22538D",
+"3, c #21538E",
+"4, c #20508B",
+"5, c #1F4F8A",
+"6, c #87B1D0",
+"7, c #80ACCE",
+"8, c #5691BD",
+"9, c #4383B5",
+"0, c #4587B9",
+"a, c #477EA9",
+"b, c #3A6B8F",
+"c, c #2D6997",
+"d, c #4578A1",
+"e, c #6587A3",
+"f, c #537088",
+"g, c #155C96",
+"h, c #2571AD",
+"i, c #93B2CB",
+"j, c #B2B7BA",
+"k, c #3A5F7D",
+"l, c #00336E",
+"m, c #688AA7",
+"n, c #E5E9EC",
+"o, c #E4E8ED",
+"p, c #A9B0B7",
+"q, c #35536F",
+"r, c #CFD6DC",
+"s, c #306294",
+"t, c #044E96",
+"u, c #5C7FA4",
+"v, c #597694",
+"w, c #8A9AA9",
+"x, c #57708B",
+"y, c #0D3E72",
+"z, c #215389",
+"A, c #235893",
+"B, c #22548F",
+"C, c #21548E",
+"D, c #20518B",
+"E, c #1F4F89",
+"F, c #1F4D88",
+"G, c #81ACCD",
+"H, c #6599C2",
+"I, c #4483B5",
+"J, c #4885B6",
+"K, c #4383B4",
+"L, c #3E7EAF",
+"M, c #397DB2",
+"N, c #3B7BAE",
+"O, c #1E66A1",
+"P, c #5E88A9",
+"Q, c #517897",
+"R, c #216BA7",
+"S, c #3D78A9",
+"T, c #98A4AE",
+"U, c #3D5D77",
+"V, c #0F5794",
+"W, c #1A69AC",
+"X, c #3A71A2",
+"Y, c #F8F6F5",
+"Z, c #5B7288",
+"`, c #003779",
+" ' c #57748E",
+".' c #657A8F",
+"+' c #316497",
+"@' c #446F9B",
+"#' c #687D94",
+"$' c #3E6894",
+"%' c #778A9E",
+"&' c #2E5682",
+"*' c #295A90",
+"=' c #205590",
+"-' c #22558F",
+";' c #21538D",
+">' c #21518C",
+",' c #20508A",
+"'' c #1F4E89",
+")' c #1E4C87",
+"!' c #7DA8CB",
+"~' c #72A1C6",
+"{' c #4D88B7",
+"]' c #4683B4",
+"^' c #4280B1",
+"/' c #3E7DB0",
+"(' c #3B7BB0",
+"_' c #3679AF",
+":' c #3E78A7",
+"<' c #456D8F",
+"[' c #2C628F",
+"}' c #386F9C",
+"|' c #567A99",
+"1' c #436581",
+"2' c #185B92",
+"3' c #3274AE",
+"4' c #1B609E",
+"5' c #3A6F9E",
+"6' c #F0F0F0",
+"7' c #F2EEE9",
+"8' c #2B4F73",
+"9' c #0F569B",
+"0' c #2E5D8C",
+"a' c #3C6287",
+"b' c #3A638C",
+"c' c #164D86",
+"d' c #345D88",
+"e' c #325A86",
+"f' c #245182",
+"g' c #245388",
+"h' c #20528C",
+"i' c #204F8A",
+"j' c #1F4D87",
+"k' c #1E4C86",
+"l' c #5D91BC",
+"m' c #4480B2",
+"n' c #4882B2",
+"o' c #447FB1",
+"p' c #407DAF",
+"q' c #3C7AAD",
+"r' c #3978AD",
+"s' c #3776AB",
+"t' c #376D9B",
+"u' c #2C6596",
+"v' c #306FA4",
+"w' c #2B699E",
+"x' c #2C6291",
+"y' c #255D8D",
+"z' c #2C6DA6",
+"A' c #2C6AA2",
+"B' c #1A5E9C",
+"C' c #3B6E9D",
+"D' c #F1F1F1",
+"E' c #CACBCD",
+"F' c #11406F",
+"G' c #1F61A1",
+"H' c #316498",
+"I' c #3E648B",
+"J' c #19528D",
+"K' c #255C95",
+"L' c #1D5895",
+"M' c #245487",
+"N' c #1E5189",
+"O' c #1E538E",
+"P' c #215491",
+"Q' c #1E4D88",
+"R' c #1D4C87",
+"S' c #1E4A86",
+"T' c #6F9CC2",
+"U' c #4E85B4",
+"V' c #4680B1",
+"W' c #457FB0",
+"X' c #427CAF",
+"Y' c #3E7AAD",
+"Z' c #3B78AC",
+"`' c #3875AA",
+" ) c #3573A8",
+".) c #3270A7",
+"+) c #306EA5",
+"@) c #2E6EA6",
+"#) c #2F6FA6",
+"$) c #2B69A2",
+"%) c #2A69A2",
+"&) c #2D6AA2",
+"*) c #2B679F",
+"=) c #185A99",
+"-) c #3E709E",
+";) c #F6F4F3",
+">) c #ABB3BA",
+",) c #073C72",
+"') c #26619E",
+")) c #235D98",
+"!) c #24568A",
+"~) c #26598F",
+"{) c #245B96",
+"]) c #215792",
+"^) c #225690",
+"/) c #235590",
+"() c #22548E",
+"_) c #20538C",
+":) c #1D4A85",
+"<) c #467FB0",
+"[) c #477FB0",
+"}) c #447DAE",
+"|) c #407BAD",
+"1) c #3D78AB",
+"2) c #3A75A9",
+"3) c #3773A8",
+"4) c #3370A6",
+"5) c #326FA6",
+"6) c #306EA4",
+"7) c #2D6BA2",
+"8) c #2D6AA1",
+"9) c #2D69A2",
+"0) c #2B68A0",
+"a) c #2B669E",
+"b) c #2A669D",
+"c) c #125493",
+"d) c #4676A4",
+"e) c #FEFDFB",
+"f) c #98A3AF",
+"g) c #003871",
+"h) c #26609C",
+"i) c #255C94",
+"j) c #235B96",
+"k) c #235892",
+"l) c #235691",
+"m) c #1F508A",
+"n) c #1E4B86",
+"o) c #1E4A85",
+"p) c #1D4984",
+"q) c #5688B5",
+"r) c #447CAE",
+"s) c #457DAE",
+"t) c #427AAC",
+"u) c #3E77AB",
+"v) c #3C75A9",
+"w) c #3873A7",
+"x) c #3571A5",
+"y) c #326FA4",
+"z) c #316DA3",
+"A) c #2F6BA1",
+"B) c #2D69A1",
+"C) c #2D689F",
+"D) c #2C669E",
+"E) c #2A659D",
+"F) c #2A659C",
+"G) c #074B8D",
+"H) c #5B83AB",
+"I) c #A5B0BB",
+"J) c #003671",
+"K) c #255E9A",
+"L) c #245A93",
+"M) c #235792",
+"N) c #22568F",
+"O) c #1D4985",
+"P) c #1C4984",
+"Q) c #1C4883",
+"R) c #4D81AF",
+"S) c #457AAC",
+"T) c #4379AB",
+"U) c #4077AA",
+"V) c #3D75A8",
+"W) c #3A73A7",
+"X) c #3770A5",
+"Y) c #346EA4",
+"Z) c #326DA2",
+"`) c #306AA1",
+" ! c #2E69A0",
+".! c #2D679F",
+"+! c #2A649B",
+"@! c #29639B",
+"#! c #25609A",
+"$! c #084786",
+"%! c #C2D0DF",
+"&! c #355E8B",
+"*! c #134D8E",
+"=! c #235790",
+"-! c #21508B",
+";! c #1E4B87",
+">! c #1D4B86",
+",! c #1C4884",
+"'! c #1C4782",
+")! c #497CAC",
+"!! c #4478AA",
+"~! c #4176A9",
+"{! c #3E75A7",
+"]! c #3B73A6",
+"^! c #3970A5",
+"/! c #366FA3",
+"(! c #346DA2",
+"_! c #316AA1",
+":! c #2F689F",
+"<! c #2D689E",
+"[! c #2B659D",
+"}! c #2B639B",
+"|! c #286299",
+"1! c #286199",
+"2! c #245B93",
+"3! c #8A9BAC",
+"4! c #949DA7",
+"5! c #949EAA",
+"6! c #949EA9",
+"7! c #9DA3AA",
+"8! c #4F6A88",
+"9! c #114988",
+"0! c #22558E",
+"a! c #1F4E88",
+"b! c #1D4883",
+"c! c #1B4782",
+"d! c #477AAB",
+"e! c #4579A9",
+"f! c #4276A8",
+"g! c #3F74A6",
+"h! c #3D72A5",
+"i! c #396FA3",
+"j! c #376DA2",
+"k! c #346BA1",
+"l! c #31699F",
+"m! c #30679D",
+"n! c #2D659D",
+"o! c #2B649B",
+"p! c #296199",
+"q! c #275F97",
+"r! c #275E96",
+"s! c #285F97",
+"t! c #073E77",
+"u! c #002F66",
+"v! c #003068",
+"w! c #002F67",
+"x! c #18487E",
+"y! c #275992",
+"z! c #225590",
+"A! c #1E4D87",
+"B! c #1C4683",
+" ",
+" ",
+" ",
+" . . + @ # $ % & * = - ; > , ' ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 6 7 8 9 0 a ",
+" b b c d . e f g h i j k l m n o p q r s t u _ v w x y z A B C D E F G H I J K L M ",
+" + N O P P Q R f S T U V W m X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._. ",
+" + :.P & P Q <.g [.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u. ",
+" + Q P P * . e v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.b.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+ ",
+" + . Q Q . e ++@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+q.4+5+6+7+8+ ",
+" # R = 9+e 0+a+b+c+d+e+f+g+h+` i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+ ",
+" $ f f J+g S K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@ ",
+" ]@^@S [.h }./@(@_@:@<@[@}@|@1@2@3@4@5@6@Z 7@8@9@0@a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@ ",
+" & h x.x.i r@s@t@u@v@w@x@y@z@A@B@C@B.D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@X@o@Y@Z@ ",
+" * `@#+ #j .#+#@###$#%#v@&#*#=#-#;#>#,#'#)#!#~#: {#]#^#/#(#_#:#<#[#}#|#1#2#3#4#5#6#7# ",
+" e j 8#k 9#0#2.a#b#c#] d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#A#B#C#D#E#F#G#H# ",
+" - I#I#J#K#L#M#N#O#P#Q#R#S#T#U#V#W#X#Y#Z#`# $.$+$@$#$$$%$&$*$=$-$;$>$,$'$)$!$~${$]$^$ ",
+" /$($_$:$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$f$g$h$i$j$k$l$m$n$o$p$q$r$s$t$u$v$w$x$ ",
+" y$z$A$B$C$D$y@E$F$G$H$I$J$K$L$M$N$O$P$Q$R$p+S$T$U$V$W$X$A+Y$Z$`$ %.%+%@%#%$%%%&%*%=% ",
+" -%;%>%,%'%)%!%~%{%]%^%/%(%_%:%<%@$[%}%|%1%2%3%4%5%6%7%8%9%0%a%b%c%d%e%f%g%h%i%j%k%l% ",
+" m%n%o%p%q%r%s%t%u%v%w%x%y%z%A%B%C%D%E%F%G%H%I%J%K%L%M%N%O%P%Q%U$R%S%T%U%V%W%X%Y%Z%`% ",
+" &.&+&@&#&$&%&&&*&=&-&;&>&,&'&)&!&~&{&]&^&/&(&_&:&<&[&}&|&1&U$2&3&4&5&6&7&8&9&0&a&b& ",
+" c&d&R+e&T#f&g&h&i&j&k&l&m&n&o&p&q&r&s&t&u&v&w&x&y&z&A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P& ",
+" Q&R&S&T&U&V&+.W&X&Y&Z&`& *.*+*@*#*$*%*&***=*-*U$;*>*,*'*)*!*~*{*]*^*/*(*_*:*<*[*}*P& ",
+" |*1*2*k#3*4*5*6*7*8*9*0*a*b*c*d*e*f*g*h*U$i*j*u&k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z*P&A* ",
+" B*C*D*E*F*G*H*I*J*K*L*M*N*O*P*Q*R*S*T*U*U$V*W*X*Y*Z*`* =.=+=@=#=$=%=&=*===-=;=>=A*,= ",
+" '=)=!=~={=]=^=/=(=_=:=<=[=}=|=1=2=3=4=5=U$6=7=8=9=0=a=b=c=d=e=f=g=h=i=j=k=l=m=n=o=p= ",
+" q=r=s=t=L$u=v=w=w=x=y=N*z=A=B=C=D=E=F=G=U$H=J@I=J=K=L=M=N=O=P=Q=R=S=T=U=V=W=X=Y=Z=`= ",
+" -.-+-@-#-$-%-&-*-=---;-_+>-,-'-)-!-~-{-U$U$]-^-/-(-_-:-<-[-}-|-1-2-3-4-5-6-7-8-9-0- ",
+" a-b-c-d-e-f-^+g-h-i-j-k-l-m-u&n-o-p-q-r-U$U$s-t-u-v-w-x-y-z-A-B-C-D-E-F-G-H-I-J-K-L- ",
+" M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-`- ;.;+;@;#;U$U$$;%;&;*;=;-;;;>;,;';);!;~;{;];^;/;(;_;:; ",
+" <;[;-.};|;1;2;3;4;5;6;7;8;9;0;a;b;c;d;e;U$**f;g;h;i;j;k;l;m;n;o;p;q;r;s;t;u;v;w;x;y; ",
+" c-z;A;B;C;B;D;E;F;G;H;I;J;K;L;M;N;O;P;U$U$Q;R;S;T;U;V;W;X;Y;Z;`; >.>+>@>#>$>%>&>*>=> ",
+" ->;>>>,>'>)>!>~>{>]>^>/>(>_>:><>[>}>|>U$U$1>2>3>4>5>6>7>8>9>0>a>b>c>d>e>f>g>h>i>j>k> ",
+" l>m>n>o>p>q>r>s>t>u>v>w>x>y>z>A>B>C>U$D>U$E>F>G>U$H>I>J>K>L>M>N>O>P>Q>R>S>T>U>V>j>W> ",
+" X>Y>Z>`> ,.,+,@,#,$,%,&,*,=,-,;,>,,,D%U$U$',7>),!,~,{,],^,/,(,_,:,<,[,},|,1,2,3,4,5, ",
+" 6,l.7,8,9,0,a,b,c,d,e,f,g,h,i,j,k,l,m,U$U$n,o,p,q,r,s,t,u,v,w,x,y,z,A,x;B,C,=>D,E,F, ",
+" G,E H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,U$U$U$Z,`, '.'+'@'#'$'%'&'*'='-';'>'4,,''')' ",
+" !'~'{']']'^'/'('_':'<'['}'|'1'2'3'4'5'6'U$U$7'8'9'0'a'b'c'd'e'f'&'g'3,C,h'4,i'''j'k' ",
+" !.l'm'n'o'p'q'r's't'u'v'w'x'y'z'A'B'C'D'U$U$E'F'G'H'I'J'K'L'M'N'O'P'2,=>D,5,''Q'R'S' ",
+" T'U'V'W'X'Y'Z'`' ).)+)@)#)$)%)&)*)=)-);)U$U$>),)')))!)~){)A,])^)/)()_)4,i'''Q'k'S':) ",
+" 4+<)[)})|)1)2)3)4)5)6)7)8)9)0)a)b)c)d)e)U$U$f)g)h)i)j),=k)l)^)-';'=>D,m)''F,)'n)o)p) ",
+" q)r)s)t)u)v)w)x)y)z)A)B)C)D)E)F)F)G)H)U$U$U$I)J)K)L)>=M)^)N)C,;'h'4,,'''F,)'n)O)P)Q) ",
+" R)S)T)U)V)W)X)Y)Z)`) !.!D)w$+!@!#!$!%!U$U$U$U$&!*!k)=!x;B,;'y;=>-!E,''F,;!>!:)p),!'! ",
+" )!!!~!{!]!^!/!(!_!:!<![!}!@!|!1!))2!3!4!5!6!7!8!9!M)-'0!2,y;k>4,5,a!Q')'n):)P)b!c! ",
+" d!e!f!g!h!i!j!k!l!m!n!o!x$p!q!r!s!l%t!u!v!w!N=x!y!z!();'k>4,,'''F,A!k':):)p)Q)B! ",
+" ",
+" ",
+" "};
diff --git a/docs/images/Apache Directory Studio/studio-icon_128x128.psd b/docs/images/Apache Directory Studio/studio-icon_128x128.psd
new file mode 100644
index 0000000..163c765
--- /dev/null
+++ b/docs/images/Apache Directory Studio/studio-icon_128x128.psd
Binary files differ
diff --git a/docs/images/Apache Directory Studio/studio-icon_16x16.psd b/docs/images/Apache Directory Studio/studio-icon_16x16.psd
new file mode 100644
index 0000000..c13b83f
--- /dev/null
+++ b/docs/images/Apache Directory Studio/studio-icon_16x16.psd
Binary files differ
diff --git a/docs/images/Apache Directory Studio/studio-icon_24x24.psd b/docs/images/Apache Directory Studio/studio-icon_24x24.psd
new file mode 100644
index 0000000..8f9db10
--- /dev/null
+++ b/docs/images/Apache Directory Studio/studio-icon_24x24.psd
Binary files differ
diff --git a/docs/images/Apache Directory Studio/studio-icon_32x32.psd b/docs/images/Apache Directory Studio/studio-icon_32x32.psd
new file mode 100644
index 0000000..b919b03
--- /dev/null
+++ b/docs/images/Apache Directory Studio/studio-icon_32x32.psd
Binary files differ
diff --git a/docs/images/Apache Directory Studio/studio-icon_48x48.psd b/docs/images/Apache Directory Studio/studio-icon_48x48.psd
new file mode 100644
index 0000000..90726d7
--- /dev/null
+++ b/docs/images/Apache Directory Studio/studio-icon_48x48.psd
Binary files differ
diff --git a/docs/images/Apache Directory Studio/studio-icon_64x64.psd b/docs/images/Apache Directory Studio/studio-icon_64x64.psd
new file mode 100644
index 0000000..543f721
--- /dev/null
+++ b/docs/images/Apache Directory Studio/studio-icon_64x64.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_16x16.ico b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_16x16.ico
new file mode 100644
index 0000000..667fb21
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_16x16.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_16x16_8.ico b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_16x16_8.ico
new file mode 100644
index 0000000..3175532
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_16x16_8.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_24x24.ico b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_24x24.ico
new file mode 100644
index 0000000..c4b6136
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_24x24.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_24x24_8.ico b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_24x24_8.ico
new file mode 100644
index 0000000..91bcd8a
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_24x24_8.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_32x32.ico b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_32x32.ico
new file mode 100644
index 0000000..ab2218c
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_32x32.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_32x32_8.ico b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_32x32_8.ico
new file mode 100644
index 0000000..547dc08
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_32x32_8.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_48x48.ico b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_48x48.ico
new file mode 100644
index 0000000..abbc126
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_48x48.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_48x48_8.ico b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_48x48_8.ico
new file mode 100644
index 0000000..d7b6f26
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/ICO/server-installer_48x48_8.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/PSD/server-installer_16x16.psd b/docs/images/Installers/Apache Directory Server Installer/PSD/server-installer_16x16.psd
new file mode 100644
index 0000000..99678ca
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/PSD/server-installer_16x16.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/PSD/server-installer_24x24.psd b/docs/images/Installers/Apache Directory Server Installer/PSD/server-installer_24x24.psd
new file mode 100644
index 0000000..a7e717a
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/PSD/server-installer_24x24.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/PSD/server-installer_32x32.psd b/docs/images/Installers/Apache Directory Server Installer/PSD/server-installer_32x32.psd
new file mode 100644
index 0000000..cf6625d
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/PSD/server-installer_32x32.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/PSD/server-installer_48x48.psd b/docs/images/Installers/Apache Directory Server Installer/PSD/server-installer_48x48.psd
new file mode 100644
index 0000000..2aea8f8
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/PSD/server-installer_48x48.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Server Installer/server-installer.ico b/docs/images/Installers/Apache Directory Server Installer/server-installer.ico
new file mode 100644
index 0000000..ddddd63
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Server Installer/server-installer.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_16x16.ico b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_16x16.ico
new file mode 100644
index 0000000..84e0143
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_16x16.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_16x16_8.ico b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_16x16_8.ico
new file mode 100644
index 0000000..298c227
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_16x16_8.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_24x24.ico b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_24x24.ico
new file mode 100644
index 0000000..15e9a37
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_24x24.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_24x24_8.ico b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_24x24_8.ico
new file mode 100644
index 0000000..9b69d1e
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_24x24_8.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_32x32.ico b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_32x32.ico
new file mode 100644
index 0000000..b42d363
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_32x32.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_32x32_8.ico b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_32x32_8.ico
new file mode 100644
index 0000000..e3cb1eb
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_32x32_8.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_48x48.ico b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_48x48.ico
new file mode 100644
index 0000000..a226926
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_48x48.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_48x48_8.ico b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_48x48_8.ico
new file mode 100644
index 0000000..8322fc9
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/ICO/studio-installer_48x48_8.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/PSD/studio-installer_16x16.psd b/docs/images/Installers/Apache Directory Studio Installer/PSD/studio-installer_16x16.psd
new file mode 100644
index 0000000..986be3d
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/PSD/studio-installer_16x16.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/PSD/studio-installer_24x24.psd b/docs/images/Installers/Apache Directory Studio Installer/PSD/studio-installer_24x24.psd
new file mode 100644
index 0000000..e688849
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/PSD/studio-installer_24x24.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/PSD/studio-installer_32x32.psd b/docs/images/Installers/Apache Directory Studio Installer/PSD/studio-installer_32x32.psd
new file mode 100644
index 0000000..d6916e2
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/PSD/studio-installer_32x32.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/PSD/studio-installer_48x48.psd b/docs/images/Installers/Apache Directory Studio Installer/PSD/studio-installer_48x48.psd
new file mode 100644
index 0000000..89d2cfa
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/PSD/studio-installer_48x48.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Studio Installer/studio-installer.ico b/docs/images/Installers/Apache Directory Studio Installer/studio-installer.ico
new file mode 100644
index 0000000..4258a76
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Studio Installer/studio-installer.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_16x16.ico b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_16x16.ico
new file mode 100644
index 0000000..1c740c3
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_16x16.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_16x16_8.ico b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_16x16_8.ico
new file mode 100644
index 0000000..983878a
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_16x16_8.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_24x24.ico b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_24x24.ico
new file mode 100644
index 0000000..f09bfc1
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_24x24.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_24x24_8.ico b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_24x24_8.ico
new file mode 100644
index 0000000..541d9bb
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_24x24_8.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_32x32.ico b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_32x32.ico
new file mode 100644
index 0000000..a4641d5
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_32x32.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_32x32_8.ico b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_32x32_8.ico
new file mode 100644
index 0000000..289dca9
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_32x32_8.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_48x48.ico b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_48x48.ico
new file mode 100644
index 0000000..1480413
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_48x48.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_48x48_8.ico b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_48x48_8.ico
new file mode 100644
index 0000000..acee254
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/ICO/suite-installe_48x48_8.ico
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/PSD/suite-installer_16x16.psd b/docs/images/Installers/Apache Directory Suite Installer/PSD/suite-installer_16x16.psd
new file mode 100644
index 0000000..dc4bf32
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/PSD/suite-installer_16x16.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/PSD/suite-installer_24x24.psd b/docs/images/Installers/Apache Directory Suite Installer/PSD/suite-installer_24x24.psd
new file mode 100644
index 0000000..b37b0c1
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/PSD/suite-installer_24x24.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/PSD/suite-installer_32x32.psd b/docs/images/Installers/Apache Directory Suite Installer/PSD/suite-installer_32x32.psd
new file mode 100644
index 0000000..4ce6782
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/PSD/suite-installer_32x32.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/PSD/suite-installer_48x48.psd b/docs/images/Installers/Apache Directory Suite Installer/PSD/suite-installer_48x48.psd
new file mode 100644
index 0000000..1e08c35
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/PSD/suite-installer_48x48.psd
Binary files differ
diff --git a/docs/images/Installers/Apache Directory Suite Installer/suite-installer.ico b/docs/images/Installers/Apache Directory Suite Installer/suite-installer.ico
new file mode 100644
index 0000000..de407a9
--- /dev/null
+++ b/docs/images/Installers/Apache Directory Suite Installer/suite-installer.ico
Binary files differ
diff --git a/docs/images/Mac OS X - DMG Icon/Apache_Directory_Studio_DMG_Icon.icns b/docs/images/Mac OS X - DMG Icon/Apache_Directory_Studio_DMG_Icon.icns
new file mode 100644
index 0000000..2fde042
--- /dev/null
+++ b/docs/images/Mac OS X - DMG Icon/Apache_Directory_Studio_DMG_Icon.icns
Binary files differ
diff --git a/docs/images/Mac OS X - DMG Icon/Apache_Directory_Studio_DMG_Icon.psd b/docs/images/Mac OS X - DMG Icon/Apache_Directory_Studio_DMG_Icon.psd
new file mode 100644
index 0000000..ae06841
--- /dev/null
+++ b/docs/images/Mac OS X - DMG Icon/Apache_Directory_Studio_DMG_Icon.psd
Binary files differ
diff --git a/docs/images/Mac OS X - DMG Icon/Original_Removable_Icon.icns b/docs/images/Mac OS X - DMG Icon/Original_Removable_Icon.icns
new file mode 100644
index 0000000..b7278c7
--- /dev/null
+++ b/docs/images/Mac OS X - DMG Icon/Original_Removable_Icon.icns
Binary files differ
diff --git a/docs/images/MacOSX_DMG_Background.psd b/docs/images/MacOSX_DMG_Background.psd
new file mode 100644
index 0000000..a2f859b
--- /dev/null
+++ b/docs/images/MacOSX_DMG_Background.psd
Binary files differ
diff --git a/docs/images/ldapstudio_icon.psd b/docs/images/ldapstudio_icon.psd
new file mode 100644
index 0000000..8f3d644
--- /dev/null
+++ b/docs/images/ldapstudio_icon.psd
Binary files differ
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index d80580d..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you 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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <parent>
- <groupId>org.apache.directory.project</groupId>
- <version>13</version>
- <artifactId>project</artifactId>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <packaging>maven-plugin</packaging>
- <name>Apache Directory Studio Plugin</name>
- <version>1.0.0</version>
- <description>Maven2 plugin with specific goals for the Apache Directory Studio project</description>
- <url>http://directory.apache.org/studio/</url>
-
- <inceptionYear>2007</inceptionYear>
-
- <issueManagement>
- <system>JIRA</system>
- <url>http://issues.apache.org/jira/browse/DIRSTUDIO</url>
- </issueManagement>
-
- <scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/directory/studio/tags/1.0.0</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/directory/studio/tags/1.0.0</developerConnection>
- <url>https://svn.apache.org/repos/asf/directory/studio/tags/1.0.0</url>
- </scm>
-
- <distributionManagement>
- <site>
- <id>apache.directory.studio.plugin</id>
- <url>scpexe://vm094.oxylos.org/var/www/html/projects/studio-plugin/</url>
- </site>
- </distributionManagement>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <configuration>
- <skip>false</skip>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.3</version>
- </plugin>
- <!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-gpg-plugin</artifactId>
- <version>1.0-alpha-5-SNAPSHOT</version>
- </plugin>
- -->
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.4</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.4</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-artifact</artifactId>
- <version>2.0.9</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-model</artifactId>
- <version>2.0.9</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>2.0.9</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- <version>2.0.9</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-osgi</artifactId>
- <version>0.2.0</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-archiver</artifactId>
- <version>1.0-alpha-10</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- <version>1.5.6</version>
- </dependency>
-
- <!-- Test -->
- <dependency>
- <groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-plugin-testing-harness</artifactId>
- <version>1.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <reporting>
- <excludeDefaults>true</excludeDefaults>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-plugin-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <configuration>
- <linkXref>true</linkXref>
- <sourceEncoding>utf-8</sourceEncoding>
- <minimumTokens>100</minimumTokens>
- <targetJdk>1.5</targetJdk>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>taglist-maven-plugin</artifactId>
- <configuration>
- <tags>
- <tag>TODO</tag>
- <tag>@todo</tag>
- <tag>@deprecated</tag>
- <tag>FIXME</tag>
- </tags>
- </configuration>
- </plugin>
- </plugins>
- </reporting>
-
- <repositories>
- <repository>
- <id>apache.directory.snapshot.repo</id>
- <name>Snapshot repository for the Apache Directory project</name>
- <url>http://vm094.oxylos.org/mirror-maven2/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- </repository>
- </repositories>
-
-</project>
diff --git a/src/main/java/org/apache/directory/studio/maven/plugins/AbstractStudioMojo.java b/src/main/java/org/apache/directory/studio/maven/plugins/AbstractStudioMojo.java
deleted file mode 100644
index 60752f5..0000000
--- a/src/main/java/org/apache/directory/studio/maven/plugins/AbstractStudioMojo.java
+++ /dev/null
@@ -1,582 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-package org.apache.directory.studio.maven.plugins;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.ArtifactCollector;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
-import org.apache.maven.artifact.versioning.VersionRange;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.archiver.Archiver;
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.UnArchiver;
-import org.codehaus.plexus.archiver.manager.ArchiverManager;
-import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
-
-
-/**
- * The abstract studio mojo
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public abstract class AbstractStudioMojo extends AbstractMojo
-{
-
- /**
- * To look up Archiver/UnArchiver implementations
- *
- * @parameter expression="${component.org.codehaus.plexus.archiver.manager.ArchiverManager}"
- * @required
- * @readonly
- */
- protected ArchiverManager archiverManager;
-
- /**
- * Location of the file.
- *
- * @parameter expression="${project.build.directory}"
- * @required
- * @readonly
- */
- protected String buildDirectory;
-
- /**
- * Used to look up Artifacts in the remote repository.
- *
- * @parameter expression="${component.org.apache.maven.artifact.factory.ArtifactFactory}"
- * @required
- * @readonly
- */
- protected org.apache.maven.artifact.factory.ArtifactFactory factory;
-
- /**
- * Used to look up Artifacts in the remote repository.
- *
- * @parameter expression="${component.org.apache.maven.artifact.resolver.ArtifactResolver}"
- * @required
- * @readonly
- */
- protected org.apache.maven.artifact.resolver.ArtifactResolver resolver;
-
- /**
- * Flag if execution shall be skipped. Defaults to true.
- *
- * @parameter expression="true"
- * @required
- */
- protected boolean skip;
-
- /**
- * Relativ Path to copy libraries to. Defaults to lib
- *
- * @parameter expression="lib"
- * @required
- * @readonly
- */
- protected String libraryPath;
-
- /**
- * Artifact collector, needed to resolve dependencies.
- *
- * @component role="org.apache.maven.artifact.resolver.ArtifactCollector"
- * @required
- * @readonly
- */
- protected ArtifactCollector artifactCollector;
-
- /**
- * @component role="org.apache.maven.artifact.metadata.ArtifactMetadataSource"
- * hint="maven"
- * @required
- * @readonly
- */
- protected ArtifactMetadataSource artifactMetadataSource;
-
- /**
- * Location of the local repository.
- *
- * @parameter expression="${localRepository}"
- * @readonly
- * @required
- */
- protected org.apache.maven.artifact.repository.ArtifactRepository local;
-
- /**
- * List of Remote Repositories used by the resolver
- *
- * @parameter expression="${project.remoteArtifactRepositories}"
- * @readonly
- * @required
- */
- protected List<ArtifactRepository> remoteRepos;
-
- /**
- * POM
- *
- * @parameter expression="${project}"
- * @readonly
- * @required
- */
- protected MavenProject project;
-
- /**
- * Output absolute filename for resolved artifacts
- *
- * @optional
- * @since 2.0
- * @parameter expression="${outputAbsoluteArtifactFilename}"
- * default-value="false"
- */
- protected boolean outputAbsoluteArtifactFilename;
-
-
- /**
- * Unpack a file to a location
- *
- * @param location
- * The location to unpack the file to
- * @param file
- * The file to unpack
- */
- protected void unpackToLocation( final File location, final File file ) throws Exception
- {
- try
- {
- getLog().info( "Unpacking " + file + " to\n " + location );
- location.mkdirs();
- UnArchiver unArchiver = archiverManager.getUnArchiver( file );
- unArchiver.setSourceFile( file );
- unArchiver.setDestDirectory( location );
- unArchiver.extract();
- }
- catch ( NoSuchArchiverException e )
- {
- throw new MojoExecutionException( "Unknown archiver type", e );
- }
- catch ( ArchiverException e )
- {
- e.printStackTrace();
- throw new MojoExecutionException( "Error unpacking file: " + file + " to: " + location + "\r\n"
- + e.toString(), e );
- }
- }
-
-
- /**
- * Pack a given location into a file
- *
- * @param location
- * A location to pack
- * @param file
- * The file to pack the location into
- * @throws Exception
- * If an error occurs
- */
- protected void packFromLocation( final File location, final File file ) throws MojoExecutionException
- {
- try
- {
- getLog().info( "Packing " + location + " to\n " + file );
- Archiver archiver = archiverManager.getArchiver( file );
- archiver.setDestFile( file );
- archiver.setIncludeEmptyDirs( true );
- archiver.addDirectory( location );
- archiver.createArchive();
- }
- catch ( NoSuchArchiverException e )
- {
- throw new MojoExecutionException( "Unknown archiver type", e );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Error creating archive", e );
- }
- catch ( ArchiverException e )
- {
- e.printStackTrace();
- throw new MojoExecutionException( "Error packing file: " + file + " to: " + location + "\r\n"
- + e.toString(), e );
- }
- }
-
-
- /**
- * Resolves the Artifact from the remote repository if nessessary. If no
- * version is specified, it will be retrieved from the dependency list or
- * from the DependencyManagement section of the pom.
- *
- * @param artifactItem
- * containing information about artifact from plugin
- * configuration.
- * @return Artifact object representing the specified file.
- *
- * @throws MojoExecutionException
- * with a message if the version can't be found in
- * DependencyManagement.
- */
- protected Artifact getArtifact( ArtifactItem artifactItem ) throws MojoExecutionException
- {
- Artifact artifact;
-
- VersionRange vr;
- try
- {
- vr = VersionRange.createFromVersionSpec( artifactItem.getVersion() );
- }
- catch ( InvalidVersionSpecificationException e1 )
- {
- e1.printStackTrace();
- vr = VersionRange.createFromVersion( artifactItem.getVersion() );
- }
-
- if ( StringUtils.isEmpty( artifactItem.getClassifier() ) )
- {
- artifact = factory.createDependencyArtifact( artifactItem.getGroupId(), artifactItem.getArtifactId(), vr,
- artifactItem.getType(), null, Artifact.SCOPE_COMPILE );
- }
- else
- {
- artifact = factory.createDependencyArtifact( artifactItem.getGroupId(), artifactItem.getArtifactId(), vr,
- artifactItem.getType(), artifactItem.getClassifier(), Artifact.SCOPE_COMPILE );
- }
-
- try
- {
- resolver.resolve( artifact, remoteRepos, local );
- }
- catch ( ArtifactResolutionException e )
- {
- throw new MojoExecutionException( "Unable to resolve artifact.", e );
- }
- catch ( ArtifactNotFoundException e )
- {
- throw new MojoExecutionException( "Unable to find artifact.", e );
- }
-
- return artifact;
- }
-
-
- /**
- * Tries to find missing version from dependancy list and dependency
- * management. If found, the artifact is updated with the correct version.
- *
- * It will first look for an exact match on
- * artifactId/groupId/classifier/type and if it doesn't find a match, it
- * will try again looking for artifactId and groupId only.
- *
- * @param artifact
- * representing configured file.
- * @throws MojoExecutionException
- */
- protected void fillMissingArtifactVersion( ArtifactItem artifact ) throws MojoExecutionException
- {
- if ( !findDependencyVersion( artifact, project.getDependencies(), false )
- && ( project.getDependencyManagement() == null || !findDependencyVersion( artifact, project
- .getDependencyManagement().getDependencies(), false ) )
- && !findDependencyVersion( artifact, project.getDependencies(), true )
- && ( project.getDependencyManagement() == null || !findDependencyVersion( artifact, project
- .getDependencyManagement().getDependencies(), true ) ) )
- {
- throw new MojoExecutionException( "Unable to find artifact version of " + artifact.getGroupId() + ":"
- + artifact.getArtifactId() + " in either dependency list or in project's dependency management." );
- }
- }
-
-
- /**
- * Tries to find missing version from a list of dependencies. If found, the
- * artifact is updated with the correct version.
- *
- * @param artifact
- * representing configured file.
- * @param list
- * list of dependencies to search.
- * @param looseMatch
- * only look at artifactId and groupId
- * @return the found dependency
- */
- protected boolean findDependencyVersion( ArtifactItem artifact, List<Dependency> list, boolean looseMatch )
- {
- boolean result = false;
-
- for ( int i = 0; i < list.size(); i++ )
- {
- Dependency dependency = list.get( i );
- if ( StringUtils.equals( dependency.getArtifactId(), artifact.getArtifactId() )
- && StringUtils.equals( dependency.getGroupId(), artifact.getGroupId() )
- && ( looseMatch || StringUtils.equals( dependency.getClassifier(), artifact.getClassifier() ) )
- && ( looseMatch || StringUtils.equals( dependency.getType(), artifact.getType() ) ) )
- {
-
- artifact.setVersion( dependency.getVersion() );
- result = true;
- break;
- }
- }
- return result;
- }
-
-
- /**
- * Complete the artifacts in the artifactItems list (e.g. complete with
- * version number)
- *
- * @throws MojoExecutionException
- */
- protected void completeArtifactItems( List<ArtifactItem> artifactItems ) throws MojoExecutionException
- {
- try
- {
- // Get and complete artifacts
- for ( Iterator<ArtifactItem> artifactItem = artifactItems.iterator(); artifactItem.hasNext(); )
- {
- ArtifactItem item = artifactItem.next();
- // make sure we have a version.
- if ( StringUtils.isEmpty( item.getVersion() ) )
- {
- fillMissingArtifactVersion( item );
- }
- item.setArtifact( this.getArtifact( item ) );
- }
- }
- catch ( Exception e )
- {
- throw new MojoExecutionException( "", e );
- }
- }
-
-
- /**
- * Delete a directory
- *
- * @param path
- * @return
- */
- protected static boolean deleteDirectory( File path )
- {
- if ( path.exists() && path.isDirectory() )
- {
- for ( File file : path.listFiles() )
- {
- if ( file.isDirectory() )
- {
- deleteDirectory( file );
- }
- else
- {
- file.delete();
- }
- }
- }
- return ( path.delete() );
- }
-
-
- /**
- * Return a list of artifacts nonscoped "provided"
- *
- * @return
- */
- protected List<Artifact> createArtifactList()
- {
- List<Artifact> list = new ArrayList<Artifact>();
-
- // Copying only artifacts with 'provided' scope
- for ( Iterator<Artifact> artifactItem = project.getArtifacts().iterator(); artifactItem.hasNext(); )
- {
- Artifact artifact = ( Artifact ) artifactItem.next();
- if ( !artifact.getScope().equalsIgnoreCase( "provided" ) )
- {
- list.add( artifact );
- }
- }
-
- // Sorting list before returning it
- Collections.sort( list, new Comparator<Artifact>()
- {
- public int compare( Artifact o1, Artifact o2 )
- {
- String artifactId1 = o1.getArtifactId();
- String artifactId2 = o2.getArtifactId();
-
- if ( ( artifactId1 != null ) && ( artifactId2 != null ) )
- {
- return artifactId1.compareToIgnoreCase( artifactId2 );
- }
-
- // Default
- return o1.toString().compareToIgnoreCase( o2.toString() );
- }
- } );
-
- return list;
- }
-
-
- /**
- * @return Returns the factory.
- */
- public org.apache.maven.artifact.factory.ArtifactFactory getFactory()
- {
- return this.factory;
- }
-
-
- /**
- * @param factory
- * The factory to set.
- */
- public void setFactory( org.apache.maven.artifact.factory.ArtifactFactory factory )
- {
- this.factory = factory;
- }
-
-
- /**
- * @return Returns the project.
- */
- public MavenProject getProject()
- {
- return this.project;
- }
-
-
- /**
- * @return Returns the local.
- */
- public org.apache.maven.artifact.repository.ArtifactRepository getLocal()
- {
- return this.local;
- }
-
-
- /**
- * @param local
- * The local to set.
- */
- public void setLocal( org.apache.maven.artifact.repository.ArtifactRepository local )
- {
- this.local = local;
- }
-
-
- /**
- * @return Returns the remoteRepos.
- */
- public List<ArtifactRepository> getRemoteRepos()
- {
- return this.remoteRepos;
- }
-
-
- /**
- * @param remoteRepos
- * The remoteRepos to set.
- */
- public void setRemoteRepos( List<ArtifactRepository> remoteRepos )
- {
- this.remoteRepos = remoteRepos;
- }
-
-
- /**
- * @return Returns the resolver.
- */
- public org.apache.maven.artifact.resolver.ArtifactResolver getResolver()
- {
- return this.resolver;
- }
-
-
- /**
- * @param resolver
- * The resolver to set.
- */
- public void setResolver( org.apache.maven.artifact.resolver.ArtifactResolver resolver )
- {
- this.resolver = resolver;
- }
-
-
- /**
- * @return Returns the artifactCollector.
- */
- public ArtifactCollector getArtifactCollector()
- {
- return this.artifactCollector;
- }
-
-
- /**
- * @param theArtifactCollector
- * The artifactCollector to set.
- */
- public void setArtifactCollector( ArtifactCollector theArtifactCollector )
- {
- this.artifactCollector = theArtifactCollector;
- }
-
-
- /**
- * @return Returns the artifactMetadataSource.
- */
- public ArtifactMetadataSource getArtifactMetadataSource()
- {
- return this.artifactMetadataSource;
- }
-
-
- /**
- * @param theArtifactMetadataSource
- * The artifactMetadataSource to set.
- */
- public void setArtifactMetadataSource( ArtifactMetadataSource theArtifactMetadataSource )
- {
- this.artifactMetadataSource = theArtifactMetadataSource;
- }
-
-
- /**
- * @param libraryPath
- * the libraryPath to set
- */
- public void setLibraryPath( String pLibraryPath )
- {
- this.libraryPath = pLibraryPath;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/org/apache/directory/studio/maven/plugins/ArtifactItem.java b/src/main/java/org/apache/directory/studio/maven/plugins/ArtifactItem.java
deleted file mode 100644
index 1a2961c..0000000
--- a/src/main/java/org/apache/directory/studio/maven/plugins/ArtifactItem.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-package org.apache.directory.studio.maven.plugins;
-
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.maven.artifact.Artifact;
-
-
-/**
- * ArtifactItem represents information specified in the plugin configuration
- * section for each artifact.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class ArtifactItem
-{
- /**
- * Group Id of Artifact
- *
- * @parameter
- * @required
- */
- private String groupId;
-
- /**
- * Name of Artifact
- *
- * @parameter
- * @required
- */
- private String artifactId;
-
- /**
- * Version of Artifact
- *
- * @parameter
- */
- private String version = null;
-
- /**
- * Type of Artifact (War,Jar,etc)
- *
- * @parameter
- * @required
- */
- private String type = "jar";
-
- /**
- * Classifier for Artifact (tests,sources,etc)
- *
- * @parameter
- */
- private String classifier;
-
- /**
- * Artifact Item
- */
- private Artifact artifact;
-
-
- public ArtifactItem()
- {
- // default constructor
- }
-
-
- public ArtifactItem( Artifact artifact )
- {
- this.setArtifact( artifact );
- this.setArtifactId( artifact.getArtifactId() );
- this.setClassifier( artifact.getClassifier() );
- this.setGroupId( artifact.getGroupId() );
- this.setType( artifact.getType() );
- this.setVersion( artifact.getVersion() );
- }
-
-
- private String filterEmptyString( String in )
- {
- if ( in == null || in.equals( "" ) )
- {
- return null;
- }
- else
- {
- return in;
- }
- }
-
-
- /**
- * @return Returns the artifactId.
- */
- public String getArtifactId()
- {
- return artifactId;
- }
-
-
- /**
- * @param artifactId
- * The artifactId to set.
- */
- public void setArtifactId( String artifact )
- {
- this.artifactId = filterEmptyString( artifact );
- }
-
-
- /**
- * @return Returns the groupId.
- */
- public String getGroupId()
- {
- return groupId;
- }
-
-
- /**
- * @param groupId
- * The groupId to set.
- */
- public void setGroupId( String groupId )
- {
- this.groupId = filterEmptyString( groupId );
- }
-
-
- /**
- * @return Returns the type.
- */
- public String getType()
- {
- return type;
- }
-
-
- /**
- * @param type
- * The type to set.
- */
- public void setType( String type )
- {
- this.type = filterEmptyString( type );
- }
-
-
- /**
- * @return Returns the version.
- */
- public String getVersion()
- {
- return version;
- }
-
-
- /**
- * @param version
- * The version to set.
- */
- public void setVersion( String version )
- {
- this.version = filterEmptyString( version );
- }
-
-
- /**
- * @return Classifier.
- */
- public String getClassifier()
- {
- return classifier;
- }
-
-
- /**
- * @param classifier
- * Classifier.
- */
- public void setClassifier( String classifier )
- {
- this.classifier = filterEmptyString( classifier );
- }
-
-
- public String toString()
- {
- if ( this.classifier == null )
- {
- return groupId + ":" + artifactId + ":" + StringUtils.defaultString( version, "?" ) + ":" + type;
- }
- else
- {
- return groupId + ":" + artifactId + ":" + classifier + ":" + StringUtils.defaultString( version, "?" )
- + ":" + type;
- }
- }
-
-
- /**
- * @return Returns the artifact.
- */
- public Artifact getArtifact()
- {
- return this.artifact;
- }
-
-
- /**
- * @param artifact
- * The artifact to set.
- */
- public void setArtifact( Artifact artifact )
- {
- this.artifact = artifact;
- }
-
-}
diff --git a/src/main/java/org/apache/directory/studio/maven/plugins/StudioCleanMojo.java b/src/main/java/org/apache/directory/studio/maven/plugins/StudioCleanMojo.java
deleted file mode 100644
index bf25d3f..0000000
--- a/src/main/java/org/apache/directory/studio/maven/plugins/StudioCleanMojo.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-package org.apache.directory.studio.maven.plugins;
-
-
-import java.io.File;
-
-import org.apache.maven.plugin.MojoExecutionException;
-
-
-/**
- * Clean stuff generated by studio:eclipse
- *
- * @goal clean
- * @execute phase="generate-resources"
- * @description Clean stuff generated by studio:eclipse
- * @requiresProject
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class StudioCleanMojo extends AbstractStudioMojo
-{
-
- private final String MAVEN_ECLIPSE_XML = "maven-eclipse.xml";
- private final String EXTERNAL_TOOL_BUILDERS_DIR = ".externalToolBuilders";
-
- public void execute() throws MojoExecutionException
- {
- try
- {
- File file = new File( project.getBasedir(), MAVEN_ECLIPSE_XML );
- getLog().info( "Deleting " + file );
- file.delete();
- file = new File( project.getBasedir(), EXTERNAL_TOOL_BUILDERS_DIR );
- getLog().info( "Deleting " + file );
- deleteDirectory( file );
- file = new File( project.getBasedir(), libraryPath );
- getLog().info( "Deleting " + file );
- deleteDirectory( file );
- }
- catch ( Exception e )
- {
- getLog().error( e );
- }
- }
-}
diff --git a/src/main/java/org/apache/directory/studio/maven/plugins/StudioCopyEclipseDependencyMojo.java b/src/main/java/org/apache/directory/studio/maven/plugins/StudioCopyEclipseDependencyMojo.java
deleted file mode 100644
index e8bb44e..0000000
--- a/src/main/java/org/apache/directory/studio/maven/plugins/StudioCopyEclipseDependencyMojo.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-package org.apache.directory.studio.maven.plugins;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.shared.osgi.DefaultMaven2OsgiConverter;
-import org.apache.maven.shared.osgi.Maven2OsgiConverter;
-
-
-/**
- * Copy a set of artifacts to a configured output directory by replacing the
- * separator between artifactId and version by an underscore instead of a dash.
- *
- * @goal copy-eclipse-artifact
- * @description Replace the separator between artifactId and version by an
- * underscore instead of a dash and copy the artifact to a given
- * destination directory
- * @requiresProject
- * @requiresDependencyResolution runtime
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class StudioCopyEclipseDependencyMojo extends AbstractStudioMojo
-{
-
- /**
- * Collection of ArtifactItems to work on. (ArtifactItem contains groupId,
- * artifactId, version, type, classifier, location, destFile, markerFile and
- * overwrite.) See "Usage" and "Javadoc" for details.
- *
- * @parameter
- * @required
- */
- protected ArrayList<ArtifactItem> artifactItems;
-
- /**
- * Location of the file.
- *
- * @parameter expression="${project.build.directory}"
- * @required
- */
- private File destinationDirectory;
-
-
- /**
- * @param destinationDirectory
- * the destinationDirectory to set
- */
- public void setDestinationDirectory( File destinationDirectory )
- {
- this.destinationDirectory = destinationDirectory;
- }
-
-
- public void execute() throws MojoExecutionException
- {
- final Maven2OsgiConverter maven2OsgiConverter = new DefaultMaven2OsgiConverter();
- completeArtifactItems( artifactItems );
-
- if ( !destinationDirectory.exists() && !destinationDirectory.mkdirs() )
- {
- throw new MojoExecutionException( "Can't create directory " + destinationDirectory );
- }
-
- for ( Iterator<ArtifactItem> artifactItem = artifactItems.iterator(); artifactItem.hasNext(); )
- {
- ArtifactItem item = artifactItem.next();
- final File destFile = new File( destinationDirectory.getAbsoluteFile() + File.separator
- + maven2OsgiConverter.getBundleFileName( item.getArtifact() ) );
- getLog().info(
- "Copying artifact " + item.getArtifactId() + " to\n " + destFile.getAbsolutePath() );
- try
- {
- FileUtils.copyFile( item.getArtifact().getFile(), destFile );
- }
- catch ( IOException ioe )
- {
- throw new MojoExecutionException( "Can't copy file.", ioe );
- }
- }
- }
-
-
- /**
- * @param artifactItems
- * the artifactItems to set
- */
- public void setArtifactItems( ArrayList<ArtifactItem> artifactItems )
- {
- this.artifactItems = artifactItems;
- }
-}
diff --git a/src/main/java/org/apache/directory/studio/maven/plugins/StudioEclipseMojo.java b/src/main/java/org/apache/directory/studio/maven/plugins/StudioEclipseMojo.java
deleted file mode 100644
index a5bbed1..0000000
--- a/src/main/java/org/apache/directory/studio/maven/plugins/StudioEclipseMojo.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-package org.apache.directory.studio.maven.plugins;
-
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.List;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.shared.osgi.DefaultMaven2OsgiConverter;
-import org.apache.maven.shared.osgi.Maven2OsgiConverter;
-import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-import org.codehaus.plexus.util.xml.Xpp3DomWriter;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-
-
-/**
- * Prepares for eclipse:
- * <p>
- * <ul>
- * <li>Copy artifacts nonscoped "provided" to ${basedir}/lib</li>
- * <li>Add artifacts nonscoped "provided" to Bundle-ClassPath ind MANIFEST.MF</li>
- * <li>Adapt ${basedir}/.classpath for artifacts nonscoped "provided"</li>
- * </ul>
- * </p>
- *
- * @goal eclipse
- * @execute phase="generate-resources"
- * @description Copy artifacts nonscoped "provided" to libraryPath, Add
- * artifacts nonscoped "provided" to Bundle-ClassPath and
- * MANIFEST.MF, Adapt ${basedir}/.classpath for artifacts nonscoped
- * "provided"
- * @requiresProject
- * @requiresDependencyResolution runtime
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class StudioEclipseMojo extends AbstractStudioMojo
-{
-
- /**
- * Constant used for newline.
- */
- private static final String NEWLINE = "\n";
-
- /**
- * Bundle-ClassPath: updated with the list of dependencies.
- */
- public final static String ENTRY_BUNDLE_CLASSPATH = "Bundle-ClassPath:";
-
- /**
- * Bundle symbolic name: updated with the artifact id.
- */
- public final static String ENTRY_BUNDLE_SYMBOLICNAME = "Bundle-SymbolicName:";
-
-
- public void execute() throws MojoExecutionException
- {
- if ( !skip )
- {
- try
- {
- // Create list of used artifacts
- final List<Artifact> artifactList = createArtifactList();
-
- // copy Artifacts
- copyArtifacts( artifactList );
-
- // Update Bundle-Classpath in MANIFEST.MF
- updateManifest( artifactList );
-
- // Update .classpath
- updateDotClasspath( artifactList );
-
- updateDotProject();
- removeMavenEclipseXml();
- removeDotExternalToolBuilders();
-
- } catch (FileNotFoundException e)
- {
- getLog().error("Please run eclipse:eclipse first to create .classpath, e.g. mvn eclipse:eclipse studio:eclipse.", e);
- }
- catch ( Exception e )
- {
- getLog().error( e );
- }
- }
- }
-
-
- /**
- * Copy artifacts to ${basedir}/lib
- *
- * @param list
- * @throws IOException
- */
- private void copyArtifacts( final List<Artifact> list ) throws IOException
- {
- // Only proceed when we have artifacts to process
- if ( !list.isEmpty() )
- {
- final File copyDir = new File( project.getBasedir(), libraryPath );
-
- if ( !copyDir.exists() )
- copyDir.mkdirs();
-
- for ( Artifact artifact : list )
- {
- if ( !artifact.getScope().equalsIgnoreCase( "test" ) )
- {
- final File destFile = new File( copyDir, artifact.getFile().getName() );
- FileUtils.copyFile( artifact.getFile(), destFile );
- getLog().info( "Copying " + artifact.getFile() + " to " + destFile );
- }
- }
- }
- }
-
-
- /**
- * Updates the Bundle-ClassPath entry in the manifest file
- *
- * @param list
- * @throws FileNotFoundException
- * @throws IOException
- */
- private void updateManifest( final List<Artifact> list ) throws FileNotFoundException, IOException
- {
- final Maven2OsgiConverter maven2OsgiConverter = new DefaultMaven2OsgiConverter();
- final File manifestFile = new File( project.getBasedir(), "META-INF/MANIFEST.MF" );
- getLog().info( "Update Bundle-Classpath in " + manifestFile );
-
- // Build Bundle-ClassPath entry
- final StringBuilder bundleClasspath = new StringBuilder( " ." );
- for ( Artifact artifact : list )
- {
- if ( !artifact.getScope().equalsIgnoreCase( "test" ) )
- {
- bundleClasspath.append( "," ).append( NEWLINE ).append( " " ).append( libraryPath ).append(
- '/' ).append( artifact.getFile().getName() );
- }
- }
-
- boolean inBundleClasspathEntry = false;
-
- // Read existing MANIFEST.MF and add existing entries
- // to StringBuilder exept Bundle-ClassPath entry
- StringBuilder manifestSb = new StringBuilder();
- BufferedReader in = new BufferedReader( new InputStreamReader( new FileInputStream( manifestFile ), "UTF-8" ) );
- String line;
- while ( ( line = in.readLine() ) != null )
- {
- if ( inBundleClasspathEntry && line.indexOf( ":" ) > -1 )
- {
- inBundleClasspathEntry = false;
- }
- else if ( inBundleClasspathEntry )
- {
- continue;
- }
-
- String name = line.substring( 0, line.indexOf( ":" ) + 1 );
-
- if ( !name.equalsIgnoreCase( ENTRY_BUNDLE_CLASSPATH ) )
- {
- if ( name.equalsIgnoreCase( ENTRY_BUNDLE_SYMBOLICNAME ) )
- {
- // get OSGI Bundle Name
- manifestSb.append( ENTRY_BUNDLE_SYMBOLICNAME );
- manifestSb.append( " " );
- manifestSb.append( maven2OsgiConverter.getBundleSymbolicName( project.getArtifact() ) );
- manifestSb.append( ";singleton:=true" );
- manifestSb.append( NEWLINE );
- }
- else
- {
- manifestSb.append( line ).append( NEWLINE );
- }
- }
- else
- {
- inBundleClasspathEntry = true;
- }
- }
-
- // Add Bundle-ClassPath entry
- manifestSb.append( ENTRY_BUNDLE_CLASSPATH ).append( bundleClasspath ).append( NEWLINE );
-
- // Write MANIFEST.MF
- Writer out = new OutputStreamWriter( new FileOutputStream( manifestFile ), "UTF-8" );
- out.write( manifestSb.toString() );
- out.flush();
- out.close();
- }
-
-
- /**
- * Adapt the ${basedir}/.classpath
- *
- * @param list
- */
- private void updateDotClasspath( List<Artifact> list ) throws IOException, XmlPullParserException
- {
- getLog().info( "Update .classpath in " + project.getBasedir() );
- final InputStream is = new FileInputStream( new File( project.getBasedir(), ".classpath" ) );
- Xpp3Dom dom = Xpp3DomBuilder.build( is, "UTF-8" );
- int cnt = 0;
- for ( Xpp3Dom cpEntry : dom.getChildren( "classpathentry" ) )
- {
- if ( cpEntry.getAttribute( "kind" ).equals( "lib" ) )
- {
- dom.removeChild( cnt );
- cnt--;
- }
- cnt++;
- }
-
- Xpp3Dom entry;
- for ( Artifact artifact : list )
- {
- if ( artifact.getScope().equalsIgnoreCase( "test" ) )
- {
- entry = new Xpp3Dom( "classpathentry" );
- entry.setAttribute( "kind", "lib" );
- entry.setAttribute( "path", ( new StringBuilder() ).append( libraryPath ).append( '/' )
- .append( artifact.getFile().getName() ).toString() );
- }
- else
- {
- entry = new Xpp3Dom( "classpathentry" );
- entry.setAttribute( "exported", "true" );
- entry.setAttribute( "kind", "lib" );
- entry.setAttribute( "path", ( new StringBuilder() ).append( libraryPath ).append( '/' )
- .append( artifact.getFile().getName() ).toString() );
- }
- dom.addChild( entry );
- }
-
- is.close();
- Writer w = new OutputStreamWriter( new FileOutputStream( new File( project.getBasedir(), ".classpath" ) ),
- "UTF-8" );
- org.codehaus.plexus.util.xml.XMLWriter writer = new PrettyPrintXMLWriter( w );
- Xpp3DomWriter.write( writer, dom );
- w.flush();
- w.close();
- }
-
-
- /**
- * Adapt the ${basedir}/.project
- *
- * @param list
- */
- private void updateDotProject() throws IOException, XmlPullParserException
- {
- getLog().info( "Update .project in " + project.getBasedir() );
- InputStream is = new FileInputStream( new File( project.getBasedir(), ".project" ) );
- Xpp3Dom dom = Xpp3DomBuilder.build( is, "UTF-8" );
- int cnt = 0;
- for ( Xpp3Dom cpEntry : dom.getChild( "buildSpec" ).getChildren( "buildCommand" ) )
- {
- if ( cpEntry.getChild( "name" ).getValue().equals( "org.eclipse.ui.externaltools.ExternalToolBuilder" ) )
- {
- dom.getChild( "buildSpec" ).removeChild( cnt );
- cnt--;
- }
- cnt++;
- }
-
- removeChildFromDom( dom, "linkedResources" );
- removeChildFromDom( dom, "projects" );
-
- is.close();
- Writer w = new OutputStreamWriter( new FileOutputStream( new File( project.getBasedir(), ".project" ) ),
- "UTF-8" );
- org.codehaus.plexus.util.xml.XMLWriter writer = new PrettyPrintXMLWriter( w );
- Xpp3DomWriter.write( writer, dom );
- w.flush();
- w.close();
- }
-
-
- /**
- * remove ${basedir}/maven-eclipse.xml
- */
- void removeMavenEclipseXml()
- {
- File file = new File( project.getBasedir(), "maven-eclipse.xml" );
- if ( file.exists() )
- file.delete();
- }
-
-
- /**
- * Adapt the ${basedir}/.externalToolBuilders
- */
- void removeDotExternalToolBuilders()
- {
- File file = new File( project.getBasedir(), ".externalToolBuilders" );
- if ( file.exists() )
- deleteDirectory( file );
- }
-
-
- private void removeChildFromDom( Xpp3Dom dom, String childName )
- {
- int cnt = 0;
- for ( Xpp3Dom child : dom.getChildren() )
- {
- if ( child.getName().equals( childName ) )
- {
- dom.removeChild( cnt );
- cnt -= 1;
- }
- cnt += 1;
- }
- }
-}
diff --git a/src/main/java/org/apache/directory/studio/maven/plugins/StudioPrepareJarPackageMojo.java b/src/main/java/org/apache/directory/studio/maven/plugins/StudioPrepareJarPackageMojo.java
deleted file mode 100644
index ca65a58..0000000
--- a/src/main/java/org/apache/directory/studio/maven/plugins/StudioPrepareJarPackageMojo.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-package org.apache.directory.studio.maven.plugins;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugin.MojoExecutionException;
-
-
-/**
- * Prepares for jar: Copy artifacts nonscoped "provided" to
- * ${project.build.outputDirectory}/libraryPath
- *
- * @goal prepare-jar-package
- * @phase process-resources
- * @aggregate
- * @description Prepares for jar: Copy artifacts nonscoped "provided" to
- * ${project.build.outputDirectory}/libraryPath
- * @requiresProject
- * @requiresDependencyResolution runtime
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class StudioPrepareJarPackageMojo extends AbstractStudioMojo
-{
-
- /**
- * Directory containing the classes.
- *
- * @parameter expression="${project.build.outputDirectory}"
- * @readonly
- * @required
- */
- private File classesOutDir;
-
-
- public void execute() throws MojoExecutionException
- {
- try
- {
- // Create list of used artifacts
- final List<Artifact> artifactList = createArtifactList();
-
- // copy Artifacts
- copyArtifacts( artifactList );
-
- }
- catch ( Exception e )
- {
- getLog().error( e );
- }
- }
-
-
- /**
- * Copy artifacts to ${basedir}/lib
- *
- * @param list
- * @throws IOException
- */
- private void copyArtifacts( final List<Artifact> list ) throws IOException
- {
- // Only proceed when we have artifacts to process
- if ( !list.isEmpty() )
- {
- final File copyDir = new File( classesOutDir, libraryPath );
-
- if ( !copyDir.exists() )
- copyDir.mkdirs();
-
- for ( Artifact artifact : list )
- {
- final File destFile = new File( copyDir, artifact.getFile().getName() );
- FileUtils.copyFile( artifact.getFile(), destFile );
- getLog().info( "Copying " + artifact.getFile() + " to\n " + destFile );
- }
- }
- }
-}
diff --git a/src/main/java/org/apache/directory/studio/maven/plugins/StudioReplaceFileInJarMojo.java b/src/main/java/org/apache/directory/studio/maven/plugins/StudioReplaceFileInJarMojo.java
deleted file mode 100644
index a1da65d..0000000
--- a/src/main/java/org/apache/directory/studio/maven/plugins/StudioReplaceFileInJarMojo.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-package org.apache.directory.studio.maven.plugins;
-
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.shared.osgi.DefaultMaven2OsgiConverter;
-import org.apache.maven.shared.osgi.Maven2OsgiConverter;
-
-
-/**
- * Add ro replace file in existing, distributed artifact
- *
- * @goal replace-file-in-eclipse-artifact
- * @description Add/Replace a file within a given eclipse artifact at a specific
- * location (zip or jar file)
- * @requiresProject
- * @requiresDependencyResolution runtime
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class StudioReplaceFileInJarMojo extends AbstractStudioMojo
-{
-
- /**
- * Collection of ArtifactItems to work on. (ArtifactItem contains groupId,
- * artifactId, version, type, classifier, location, destFile, markerFile and
- * overwrite.) See "Usage" and "Javadoc" for details.
- *
- * @parameter
- * @required
- */
- protected ArrayList<ArtifactItem> artifactItems;
-
- /**
- * FinalName of the jar file
- *
- * @parameter
- * @required
- */
- private File inputFile;
-
- /**
- * Location of the file.
- *
- * @parameter expression="${project.build.directory}"
- * @required
- */
- private File destinationDirectory;
-
- /**
- * Tmp work directory for this plugin
- *
- * @parameter expression="${project.build.directory}/ReplaceFileInJarMojo/"
- * @required
- * @readonly
- */
- private String pluginWorkDir;
-
-
- /**
- * @param destinationDirectory
- * the destinationDirectory to set
- */
- public void setDestinationDirectory( File destinationDirectory )
- {
- this.destinationDirectory = destinationDirectory;
- }
-
-
- /**
- * @param inputFile
- * the inputFile to set
- */
- public void setInputFile( File inputFile )
- {
- this.inputFile = inputFile;
- }
-
-
- public void execute() throws MojoExecutionException
- {
- final Maven2OsgiConverter maven2OsgiConverter = new DefaultMaven2OsgiConverter();
-
- completeArtifactItems( artifactItems );
-
- // Add file to packed file
- for ( Iterator<ArtifactItem> artifactItem = artifactItems.iterator(); artifactItem.hasNext(); )
- {
- ArtifactItem item = artifactItem.next();
- try
- {
- final File zipFile = new File( destinationDirectory.getAbsoluteFile() + File.separator
- + maven2OsgiConverter.getBundleFileName( item.getArtifact() ) );
- final File tmpDir = new File( pluginWorkDir + item.getArtifact().getArtifactId() );
- unpackToLocation( tmpDir, zipFile );
- getLog().info( "Adding " + inputFile + " to\n " + zipFile );
- FileUtils.copyFileToDirectory( inputFile, tmpDir );
- packFromLocation( tmpDir, zipFile );
-
- }
- catch ( Exception e )
- {
- throw new MojoExecutionException( "", e );
- }
- }
- }
-
-
- /**
- * @param artifactItems
- * the artifactItems to set
- */
- public void setArtifactItems( ArrayList<ArtifactItem> artifactItems )
- {
- this.artifactItems = artifactItems;
- }
-}
diff --git a/src/main/java/org/apache/directory/studio/maven/plugins/StudioUnpackPrefixedMojo.java b/src/main/java/org/apache/directory/studio/maven/plugins/StudioUnpackPrefixedMojo.java
deleted file mode 100644
index 4d1f63c..0000000
--- a/src/main/java/org/apache/directory/studio/maven/plugins/StudioUnpackPrefixedMojo.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- *
- */
-package org.apache.directory.studio.maven.plugins;
-
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.shared.osgi.DefaultMaven2OsgiConverter;
-import org.apache.maven.shared.osgi.Maven2OsgiConverter;
-
-
-/**
- * Prefixes the unpack of an artifact into a given directory with a directory
- * named based on the artifacts final name
- *
- * @goal unpack-with-artifactid-prefix
- * @description Prefixes the unpack of an artifact into a given directory with a
- * directory named based on the artifacts final name
- * @requiresProject
- * @requiresDependencyResolution runtime
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class StudioUnpackPrefixedMojo extends AbstractStudioMojo
-{
-
- /**
- * Collection of ArtifactItems to work on. (ArtifactItem contains groupId,
- * artifactId, version, type, classifier, location, destFile, markerFile and
- * overwrite.) See "Usage" and "Javadoc" for details.
- *
- * @parameter
- * @required
- */
- protected ArrayList<ArtifactItem> artifactItems;
-
- /**
- * Location of the file.
- *
- * @parameter expression="${project.build.directory}"
- * @required
- */
- private File outputDirectory;
-
-
- /**
- * @param outputDirectory
- * the outputDirectory to set
- */
- public void setOutputDirectory( File outputDirectory )
- {
- this.outputDirectory = outputDirectory;
- }
-
-
- public void execute() throws MojoExecutionException
- {
- final Maven2OsgiConverter maven2OsgiConverter = new DefaultMaven2OsgiConverter();
- completeArtifactItems( artifactItems );
- for ( Iterator<ArtifactItem> artifactItem = artifactItems.iterator(); artifactItem.hasNext(); )
- {
- ArtifactItem item = artifactItem.next();
- try
- {
- final File tmpDir = new File( outputDirectory.getAbsoluteFile() + File.separator
- + maven2OsgiConverter.getBundleSymbolicName( item.getArtifact() ) + "_"
- + maven2OsgiConverter.getVersion( item.getArtifact() ) );
- unpackToLocation( tmpDir, item.getArtifact().getFile() );
- }
- catch ( Exception e )
- {
- throw new MojoExecutionException( "", e );
- }
- }
- }
-
-
- /**
- * @param artifactItems
- * the artifactItems to set
- */
- public void setArtifactItems( ArrayList<ArtifactItem> artifactItems )
- {
- this.artifactItems = artifactItems;
- }
-
-}
diff --git a/src/site/apt/examples/copy-eclipse-artifact.apt b/src/site/apt/examples/copy-eclipse-artifact.apt
deleted file mode 100644
index a3211c9..0000000
--- a/src/site/apt/examples/copy-eclipse-artifact.apt
+++ /dev/null
@@ -1,64 +0,0 @@
-~~ Licensed to the Apache Software Foundation (ASF) under one
-~~ or more contributor license agreements. See the NOTICE file
-~~ distributed with this work for additional information
-~~ regarding copyright ownership. The ASF licenses this file
-~~ to you 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.
-
- ------
- Add or replace a file to existing, distributed artifact
- ------
- Apache Directory Project
- ------
- Oct 2007
- ------
-
-Add or replace a file to existing, distributed artifact
-
- Adds or replaces a file in an existing, distributed artifact.
-
-+---+
-<project>
- [...]
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-directory-studio-plugins</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy-eclipse-artifact</goal>
- </goals>
- <configuration>
- <destinationDirectory>${studio-dir}/plugins</destinationDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>${pom.groupId}.ldapbrowser.core</artifactId>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>${pom.groupId}.ldapbrowser.common</artifactId>
- </artifactItem>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- [...]
-</project>
-+---+
diff --git a/src/site/apt/examples/prepare-jar-package.apt b/src/site/apt/examples/prepare-jar-package.apt
deleted file mode 100644
index c2602ac..0000000
--- a/src/site/apt/examples/prepare-jar-package.apt
+++ /dev/null
@@ -1,53 +0,0 @@
-~~ Licensed to the Apache Software Foundation (ASF) under one
-~~ or more contributor license agreements. See the NOTICE file
-~~ distributed with this work for additional information
-~~ regarding copyright ownership. The ASF licenses this file
-~~ to you 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.
-
- ------
- Add or replace a file to existing, distributed artifact
- ------
- Apache Directory Project
- ------
- Oct 2007
- ------
-
-Add or replace a file to existing, distributed artifact
-
- Adds or replaces a file in an existing, distributed artifact.
-
-+---+
-<project>
- [...]
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <configuration>
- <skip>false</skip>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>prepare-jar-package</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- [...]
-</project>
-+---+
diff --git a/src/site/apt/examples/replace-file-in-eclipse-artifact.apt b/src/site/apt/examples/replace-file-in-eclipse-artifact.apt
deleted file mode 100644
index 32bb56c..0000000
--- a/src/site/apt/examples/replace-file-in-eclipse-artifact.apt
+++ /dev/null
@@ -1,64 +0,0 @@
-~~ Licensed to the Apache Software Foundation (ASF) under one
-~~ or more contributor license agreements. See the NOTICE file
-~~ distributed with this work for additional information
-~~ regarding copyright ownership. The ASF licenses this file
-~~ to you 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.
-
- ------
- Add or replace a file to existing, distributed artifact
- ------
- Apache Directory Project
- ------
- Oct 2007
- ------
-
-Add or replace a file to existing, distributed artifact
-
- Adds or replaces a file in an existing, distributed artifact.
-
-+---+
-<project>
- [...]
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <executions>
- <execution>
- <id>replace-plugin.xml-in-org.eclipse.search</id>
- <phase>process-resources</phase>
- <goals>
- <goal>replace-file-in-eclipse-artifact</goal>
- </goals>
- <configuration>
- <inputFile>src/main/configuration/org.eclipse.search/plugin.xml</inputFile>
- <destinationDirectory>${studio-dir}/plugins</destinationDirectory>
- <overWrite>false</overWrite>
- <outputDirectory>target/eclipse/plugins</outputDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.search</artifactId>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- [...]
-</project>
-+---+
diff --git a/src/site/apt/examples/unpack-with-artifactid-prefix.apt b/src/site/apt/examples/unpack-with-artifactid-prefix.apt
deleted file mode 100644
index f60b11a..0000000
--- a/src/site/apt/examples/unpack-with-artifactid-prefix.apt
+++ /dev/null
@@ -1,66 +0,0 @@
-~~ Licensed to the Apache Software Foundation (ASF) under one
-~~ or more contributor license agreements. See the NOTICE file
-~~ distributed with this work for additional information
-~~ regarding copyright ownership. The ASF licenses this file
-~~ to you 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.
-
- ------
- Unpack with prefix
- ------
- Apache Directory Project
- ------
- Oct 2007
- ------
-
-Unpack with prefix
-
- Unpack an artifact in a desired location and put the artifact content into a directory
- named like the final artifacts name (This is mainly used to unpack a *-feature.jar).
-
-+---+
-<project>
- [...]
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <executions>
- <executions>
- <execution>
- <id>unpack-with-artifactid-prefix</id>
- <phase>process-resources</phase>
- <goals>
- <goal>unpack-with-artifactid-prefix</goal>
- </goals>
- <configuration>
- <outputDirectory>target/features</outputDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>${pom.groupId}.feature</artifactId>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>${pom.groupId}.schemaeditor.feature</artifactId>
- </artifactItem>
- </artifactItems>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- [...]
-</project>
-+---+
diff --git a/src/site/apt/index.apt b/src/site/apt/index.apt
deleted file mode 100644
index 8a6a10b..0000000
--- a/src/site/apt/index.apt
+++ /dev/null
@@ -1,67 +0,0 @@
-~~ Licensed to the Apache Software Foundation (ASF) under one
-~~ or more contributor license agreements. See the NOTICE file
-~~ distributed with this work for additional information
-~~ regarding copyright ownership. The ASF licenses this file
-~~ to you 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.
-
- ------
- Introduction
- ------
- Apache Directory Project
- ------
- Oct 2007
- ------
-
-NOTE: THIS IS ONLY SANDBOX DOCUMENTATION!
-
-
-Directory Studio Maven Plugin
-
- The directory studio maven plugin provides the capability to manipulate artifacts. It
- can prefix existing jar content with a director or can replace/add a file within an existing
- zip/jar archive.
-
-* Goals Overview
-
- The directory studio maven plugin has 6 goals:
-
- * {{{prepare-jar-package-mojo.html}studio:prepare-jar-package}} prepares for building jar - copy artifacts not scoped "provided"
- to ${project.build.outputDirectory}/libraryPath (default is target/classes/lib)
-
- * {{{unpack-with-artifactid-prefix-mojo.html}studio:unpack-with-artifactid-prefix}} unpack an artifact in a desired location and put
- the artifact content into a directory named like the final artifacts name (This is mainly used
- to unpack a *-feature.jar).
-
- * {{{clean-mojo.html}studio:clean}} cleans stuff generated by {{{eclipse-mojo.html}studio:eclipse}}
-
- * {{{replace-file-in-eclipse-artifact-mojo.html}studio:replace-file-in-eclipse-artifact}} takes a list of artifacts defined in
- the plugin configuration section and a configured directory where the artifacts
- are located (not in the local maven repository, but after a being copied e.g. to target
- directory) and replaced/adds a desired file to them.
-
- * {{{eclipse-mojo.html}studio:eclipse}} prepares for eclipse:\
- Copy artifacts nonscoped "provided" to ${basedir}/lib.\
- Add artifacts not scoped "provided" to Bundle-ClassPath in MANIFEST.MF.\
- Adapt ${basedir}/.classpath for artifacts not scoped "provided".\
-
- * {{{copy-eclipse-artifact-mojo.html}studio:copy-eclipse-artifact}}Copy a set of artifacts to a configured output directory
- by replacing the separator between artifactId and version by an underscore instead of a dash.
-
- []
-
-* Usage
-
- * Instructions on how to use the dependency plugin can be found {{{usage.html}here}}.
-
- []
diff --git a/src/site/apt/usage.apt b/src/site/apt/usage.apt
deleted file mode 100644
index 8d0143c..0000000
--- a/src/site/apt/usage.apt
+++ /dev/null
@@ -1,112 +0,0 @@
-~~ Licensed to the Apache Software Foundation (ASF) under one
-~~ or more contributor license agreements. See the NOTICE file
-~~ distributed with this work for additional information
-~~ regarding copyright ownership. The ASF licenses this file
-~~ to you 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.
-
- ------
- Usage
- ------
- Apache Directory Project
- ------
- Oct 2007
- ------
-
-Usage
-
- Brief examples on how to use the dependency goals.
-
-* Generic Plugin configuration information
-
- See the following links for information about including and configuring plugins in your project:
-
- *{{{http://maven.apache.org/guides/mini/guide-configuring-plugins.html}Configuring Plugins}}
-
- *{{{http://maven.apache.org/guides/plugin/guide-java-plugin-development.html}Plugin Development}}
-
- *{{{http://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html}Plugin Prefix}}
-
-* The <<<studio:prefix-jar-content>>> mojo
-
-Prefix built jar
-
- Prefixes the content of the built jar with its artifact name
- (normally used to build extractable studio-*-feature.jar).
-
-+---+
-<project>
- [...]
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>prefix-jar-content</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- [...]
-</project>
-+---+
-
-* The <<<studio:replace-file-in-jar>>> mojo
-
-Add or replace a file to existing, distributed artifact
-
- Adds or replaces a file in an existing, distributed artifact.
-
-+---+
-<project>
- [...]
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <executions>
- <execution>
- <id>replace-plugin.xml-in-org.eclipse.search</id>
- <phase>process-resources</phase>
- <goals>
- <goal>replace-file-in-eclipse-artifact</goal>
- </goals>
- <configuration>
- <inputFile>src/main/configuration/org.eclipse.search/plugin.xml</inputFile>
- <destinationDirectory>${studio-dir}/plugins</destinationDirectory>
- <overWrite>false</overWrite>
- <outputDirectory>target/eclipse/plugins</outputDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.search</artifactId>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- [...]
-</project>
-+---+
-
-
-
diff --git a/src/site/fml/faq.fml b/src/site/fml/faq.fml
deleted file mode 100644
index 86f1eb2..0000000
--- a/src/site/fml/faq.fml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
--->
-<!--
- @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
--->
-
-<faqs id="FAQ" title="Frequently Asked Questions">
-<part id="general">
- <title>General</title>
-
- <faq id="Adapting .classpath">
- <question>
- My classpath is not updated for a specific module. What is wrong?
- </question>
- <answer>
- <p>You need to have set the skip flag to false, that the studio:eclipse goal is executed on your module.</p>
- <source>
-<build>
- <plugins>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <configuration>
- <skip>false</skip>
- </configuration>
- </plugin>
- </plugins>
-</build>
- </source>
- </answer>
- </faq>
-
- </part>
-
- <part id="install">
- <title>Installation</title>
-
- <faq id="Prefixing plugin goal">
- <question>
- Running mvn studio:{goal} maven doesn't finds the plugin 'studio'. What's wrong?
- </question>
- <answer>
- <p>The studio plugin has not the default package name for maven plugins. You need to prefix the studio plugin. See
- <a href="http://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html">Introduction to
- Plugin Prefix Resolution</a> or do the prefixing within your projects root pom:
- <source>
-<build>
- <plugins>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <configuration>
- <goalPrefix>studio</goalPrefix>
- </configuration>
- </plugin>
- </plugins>
-</build>
- </source>
- </p>
- </answer>
- </faq>
- </part>
-</faqs>
diff --git a/src/site/site.xml b/src/site/site.xml
deleted file mode 100644
index 010f465..0000000
--- a/src/site/site.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
--->
-<!--
- @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
--->
-<project name="${project.name}">
- <bannerLeft>
- <src>images/studio-icon_128x128.png</src>
- <href>http://directory.apache.org/studio/</href>
- <name>${project.name}</name>
- </bannerLeft>
- <publishDate position="right" format="dd-MM-yyyy HH:mm"/>
- <version position="right"/>
- <body>
- <links>
- <!--
- Need to encode a part of the url due to Issue
- http://jira.codehaus.org/browse/MSITE-159
- and as of https://bugzilla.mozilla.org/show_bug.cgi?id=43659
- this workaround doesn't works in FF 3.x ...
- -->
- <item name="Apache Directory Studio" href="http://directory.apache%2eorg/studio/"/>
- <item name="Apache Directory" href="http://directory.apache%2eorg/"/>
- <item name="Apache" href="http://www.apache.org/"/>
- <item name="Maven" href="http://maven.apache.org/"/>
- </links>
- <menu name="Overview">
- <item name="Introduction" href="index.html" />
- <item name="Goals" href="plugin-info.html" />
- <item name="Usage" href="usage.html" />
- <item name="FAQ" href="faq.html" />
- </menu>
- <menu name="Examples">
- <item name="prepare-jar-package" href="examples/prepare-jar-package.html" />
- <item name="unpack-with-artifactid-prefix" href="examples/unpack-with-artifactid-prefix.html" />
- <item name="replace-file-in-eclipse-artifact" href="examples/replace-file-in-eclipse-artifact.html" />
- <item name="copy-eclipse-artifact" href="examples/copy-eclipse-artifact.html" />
- </menu>
- <menu ref="reports" />
- </body>
-</project>
\ No newline at end of file
diff --git a/src/test/java/org/apache/directory/studio/maven/plugins/StudioCleanMojoTest.java b/src/test/java/org/apache/directory/studio/maven/plugins/StudioCleanMojoTest.java
deleted file mode 100644
index c59c6aa..0000000
--- a/src/test/java/org/apache/directory/studio/maven/plugins/StudioCleanMojoTest.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-package org.apache.directory.studio.maven.plugins;
-
-
-import java.io.File;
-import java.io.RandomAccessFile;
-import java.nio.channels.FileChannel;
-import java.nio.channels.FileLock;
-
-import org.apache.directory.studio.maven.plugins.StudioCleanMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-import org.codehaus.plexus.util.FileUtils;
-
-
-/**
- * Test the studio clean mojo.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class StudioCleanMojoTest extends AbstractMojoTestCase
-{
- /** {@inheritDoc} */
- protected void setUp() throws Exception
- {
- super.setUp();
- }
-
-
- /** {@inheritDoc} */
- protected void tearDown() throws Exception
- {
- super.tearDown();
- }
-
-
- /**
- * Tests the simple removal of the lib dir and the 2 files 'maven-eclipse.xml' and '.externalToolBuilders'
- *
- * @throws Exception
- */
- public void testBasicClean() throws Exception
- {
- String pluginPom = getBasedir() + "/src/test/resources/unit/basic-clean-test/plugin-pom.xml";
-
- // safety
- FileUtils.copyDirectory( new File( getBasedir(), "src/test/resources/unit/basic-clean-test" ), new File(
- getBasedir(), "target/test-classes/unit/basic-clean-test" ), null, "**/.svn,**/.svn/**" );
-
- StudioCleanMojo mojo = ( StudioCleanMojo ) lookupMojo( "clean", pluginPom );
- assertNotNull( mojo );
-
- mojo.execute();
-
- assertFalse( "File maven-eclipse.xml exists", checkExists( getBasedir() + "/target/test-classes/unit/"
- + "basic-clean-test/maven-eclipse.xml" ) );
- assertFalse( "File .externalToolBuilder exists", checkExists( getBasedir() + "/target/test-classes/unit/"
- + "basic-clean-test/.externalToolBuilders" ) );
- assertFalse( "Directory exists", checkExists( getBasedir() + "/target/test-classes/unit/basic-clean-test/"
- + "lib" ) );
- }
-
-
- /**
- * Tests for exception hanndling - an exception should only be logged, but not be thrown
- *
- * @throws Exception
- */
- public void testBasicCleanException() throws Exception
- {
- String pluginPom = getBasedir() + "/src/test/resources/unit/basic-clean-test/plugin-exception-pom.xml";
- StudioCleanMojo mojo = ( StudioCleanMojo ) lookupMojo( "clean", pluginPom );
- assertNotNull( mojo );
-
- try
- {
- mojo.execute();
- }
- catch ( Exception e )
- {
- fail( "Exception thrown: " + e.toString() );
- }
- }
-
-
- /**
- * @param dir a dir or a file
- * @return true if a file/dir exists, false otherwise
- */
- private boolean checkExists( String dir )
- {
- return FileUtils.fileExists( new File( dir ).getAbsolutePath() );
- }
-
-
- /**
- * @param dir a directory
- * @return true if a dir is empty, false otherwise
- */
- private boolean checkEmpty( String dir )
- {
- return FileUtils.sizeOfDirectory( new File( dir ).getAbsolutePath() ) == 0;
- }
-}
diff --git a/src/test/java/org/apache/directory/studio/maven/plugins/StudioCopyEclipseDependencyMojoTest.java b/src/test/java/org/apache/directory/studio/maven/plugins/StudioCopyEclipseDependencyMojoTest.java
deleted file mode 100644
index 0fd73d7..0000000
--- a/src/test/java/org/apache/directory/studio/maven/plugins/StudioCopyEclipseDependencyMojoTest.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-package org.apache.directory.studio.maven.plugins;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
-import org.apache.maven.artifact.repository.DefaultArtifactRepository;
-import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-import org.codehaus.plexus.util.FileUtils;
-
-
-/**
- * Test the studio copy eclipse dependency mojo.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class StudioCopyEclipseDependencyMojoTest extends AbstractMojoTestCase
-{
- private Set toDelete = new HashSet();
- private ArtifactRepositoryFactory repoFactory;
-
-
- /** {@inheritDoc} */
- protected void setUp() throws Exception
- {
- super.setUp();
-
- repoFactory = ( ArtifactRepositoryFactory ) lookup( ArtifactRepositoryFactory.ROLE );
- }
-
-
- /** {@inheritDoc} */
- protected void tearDown() throws Exception
- {
- super.tearDown();
- for ( Iterator it = toDelete.iterator(); it.hasNext(); )
- {
- File f = ( File ) it.next();
-
- if ( f.exists() )
- {
- try
- {
- FileUtils.forceDelete( f );
- }
- catch ( IOException e )
- {
- //the files on windows can still be locked. They were creaed in a temp directory anyway and will get removed in a subsequent clean.
- //we can safely ignore this error.
- }
- }
- }
- }
-
-
- /**
- * Tests the simple removal of the lib dir and the 2 files 'maven-eclipse.xml' and '.externalToolBuilders'
- *
- * @throws Exception
- */
- public void testCopyEclipseArtifact() throws Exception
- {
- String pluginPom = getBasedir() + "/src/test/resources/unit/basic-copy-test/plugin-pom.xml";
- StudioCopyEclipseDependencyMojo mojo = ( StudioCopyEclipseDependencyMojo ) lookupMojo( "copy-eclipse-artifact",
- pluginPom );
- assertNotNull( mojo );
-
- File remoteRepoDir = findRemoteRepositoryDirectory();
- File localRepo = createTempDir();
-
- List<ArtifactRepository> remoteRepositories = new ArrayList<ArtifactRepository>();
- remoteRepositories.add( repoFactory.createArtifactRepository( "central", remoteRepoDir.toURI().toURL()
- .toExternalForm(), new DefaultRepositoryLayout(), null, null ) );
- mojo.setRemoteRepos( remoteRepositories );
-
- DefaultArtifactRepository localRepository = new DefaultArtifactRepository( "local",
- localRepo.getAbsolutePath(), new DefaultRepositoryLayout() );
- localRepository.setBasedir( localRepo.getAbsolutePath() );
- mojo.setLocal( localRepository );
-
- mojo.execute();
-
- assertTrue( "File org.eclipse.core.jobs_3.3.1.R33x_v20070709.jar not exists", checkExists( getBasedir()
- + "/target/test-classes/copy-plugins/" + "org.eclipse.core.jobs_3.3.1.R33x_v20070709.jar" ) );
- assertTrue( "File org.eclipse.core.commands_3.3.0.I20070605_0010.jar not exists", checkExists( getBasedir()
- + "/target/test-classes/copy-plugins/" + "org.eclipse.core.commands_3.3.0.I20070605_0010.jar" ) );
- }
-
-
- /**
- * @param dir a dir or a file
- * @return true if a file/dir exists, false otherwise
- */
- private boolean checkExists( String dir )
- {
- return FileUtils.fileExists( new File( dir ).getAbsolutePath() );
- }
-
-
- /**
- * @param dir a directory
- * @return true if a dir is empty, false otherwise
- */
- private boolean checkEmpty( String dir )
- {
- return FileUtils.sizeOfDirectory( new File( dir ).getAbsolutePath() ) == 0;
- }
-
-
- private File findRemoteRepositoryDirectory()
- {
- String classPath = getClass().getPackage().getName().replace( '.', '/' ) + "/test-copy-repo/repo-marker.txt";
- ClassLoader cloader = Thread.currentThread().getContextClassLoader();
-
- URL resource = cloader.getResource( classPath );
-
- if ( resource == null )
- {
- throw new IllegalStateException( "Cannot find repository marker file: " + classPath
- + " in context classloader!" );
- }
-
- File repoDir = new File( resource.getPath() ).getParentFile();
-
- return repoDir;
- }
-
-
- private File createTempDir() throws IOException
- {
- File dir = File.createTempFile( "DefaultExtensionManagerTest.", ".dir" );
- FileUtils.forceDelete( dir );
-
- dir.mkdirs();
- toDelete.add( dir );
-
- return dir;
- }
-
-}
diff --git a/src/test/java/org/apache/directory/studio/maven/plugins/StudioUnpackPrefixedMojoTest.java b/src/test/java/org/apache/directory/studio/maven/plugins/StudioUnpackPrefixedMojoTest.java
deleted file mode 100644
index 38cc714..0000000
--- a/src/test/java/org/apache/directory/studio/maven/plugins/StudioUnpackPrefixedMojoTest.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-package org.apache.directory.studio.maven.plugins;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
-import org.apache.maven.artifact.repository.DefaultArtifactRepository;
-import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-import org.codehaus.plexus.util.FileUtils;
-
-
-/**
- * Test the studio unpack prefixed mojo.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class StudioUnpackPrefixedMojoTest extends AbstractMojoTestCase
-{
- private Set toDelete = new HashSet();
- private ArtifactRepositoryFactory repoFactory;
-
-
- /** {@inheritDoc} */
- protected void setUp() throws Exception
- {
- super.setUp();
-
- repoFactory = ( ArtifactRepositoryFactory ) lookup( ArtifactRepositoryFactory.ROLE );
- }
-
-
- /** {@inheritDoc} */
- protected void tearDown() throws Exception
- {
- super.tearDown();
- for ( Iterator it = toDelete.iterator(); it.hasNext(); )
- {
- File f = ( File ) it.next();
-
- if ( f.exists() )
- {
- try
- {
- FileUtils.forceDelete( f );
- }
- catch ( IOException e )
- {
- //the files on windows can still be locked. They were creaed in a temp directory anyway and will get removed in a subsequent clean.
- //we can safely ignore this error.
- }
- }
- }
- }
-
-
- /**
- * Tests the simple unpacking of a (OSGi) artifact into a directory of it's bundlename (=prefix)
- *
- * @throws Exception
- */
- public void testUnpackPrefixed() throws Exception
- {
- String pluginPom = getBasedir() + "/src/test/resources/unit/basic-unpack-test/plugin-pom.xml";
- StudioUnpackPrefixedMojo mojo = ( StudioUnpackPrefixedMojo ) lookupMojo( "unpack-with-artifactid-prefix",
- pluginPom );
- assertNotNull( mojo );
-
- File remoteRepoDir = findRemoteRepositoryDirectory();
- File localRepo = createTempDir();
-
- List<ArtifactRepository> remoteRepositories = new ArrayList<ArtifactRepository>();
- remoteRepositories.add( repoFactory.createArtifactRepository( "central", remoteRepoDir.toURI().toURL()
- .toExternalForm(), new DefaultRepositoryLayout(), null, null ) );
- mojo.setRemoteRepos( remoteRepositories );
-
- DefaultArtifactRepository localRepository = new DefaultArtifactRepository( "local",
- localRepo.getAbsolutePath(), new DefaultRepositoryLayout() );
- localRepository.setBasedir( localRepo.getAbsolutePath() );
- mojo.setLocal( localRepository );
-
- mojo.execute();
-
- assertTrue( "Directory org.eclipse.core.jobs_3.3.1.R33x_v20070709 not exists", checkExists( getBasedir()
- + "/target/test-classes/unpack-plugins/" + "org.eclipse.core.jobs_3.3.1.R33x_v20070709" ) );
- assertTrue( "directory org.eclipse.core.commands_3.3.0.I20070605_0010 not exists", checkExists( getBasedir()
- + "/target/test-classes/unpack-plugins/" + "org.eclipse.core.commands_3.3.0.I20070605_0010" ) );
- }
-
-
- /**
- * @param dir a dir or a file
- * @return true if a file/dir exists, false otherwise
- */
- private boolean checkExists( String dir )
- {
- return FileUtils.fileExists( new File( dir ).getAbsolutePath() );
- }
-
-
- /**
- * @param dir a directory
- * @return true if a dir is empty, false otherwise
- */
- private boolean checkEmpty( String dir )
- {
- return FileUtils.sizeOfDirectory( new File( dir ).getAbsolutePath() ) == 0;
- }
-
-
- private File findRemoteRepositoryDirectory()
- {
- String classPath = getClass().getPackage().getName().replace( '.', '/' ) + "/test-copy-repo/repo-marker.txt";
- ClassLoader cloader = Thread.currentThread().getContextClassLoader();
-
- URL resource = cloader.getResource( classPath );
-
- if ( resource == null )
- {
- throw new IllegalStateException( "Cannot find repository marker file: " + classPath
- + " in context classloader!" );
- }
-
- File repoDir = new File( resource.getPath() ).getParentFile();
-
- return repoDir;
- }
-
-
- private File createTempDir() throws IOException
- {
- File dir = File.createTempFile( "DefaultExtensionManagerTest.", ".dir" );
- FileUtils.forceDelete( dir );
-
- dir.mkdirs();
- toDelete.add( dir );
-
- return dir;
- }
-
-}
diff --git a/src/test/java/org/apache/directory/studio/maven/plugins/stubs/StudioCleanProjectStub.java b/src/test/java/org/apache/directory/studio/maven/plugins/stubs/StudioCleanProjectStub.java
deleted file mode 100644
index d1d25b3..0000000
--- a/src/test/java/org/apache/directory/studio/maven/plugins/stubs/StudioCleanProjectStub.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-package org.apache.directory.studio.maven.plugins.stubs;
-
-
-import java.io.File;
-
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-
-/**
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class StudioCleanProjectStub extends MavenProjectStub
-{
- public File getBasedir()
- {
- return new File( "target/test-classes/unit/basic-clean-test" );
- }
-}
diff --git a/src/test/java/org/apache/directory/studio/maven/plugins/stubs/StudioCopyEclipseDependencyProjectStub.java b/src/test/java/org/apache/directory/studio/maven/plugins/stubs/StudioCopyEclipseDependencyProjectStub.java
deleted file mode 100644
index 67dc5b8..0000000
--- a/src/test/java/org/apache/directory/studio/maven/plugins/stubs/StudioCopyEclipseDependencyProjectStub.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-package org.apache.directory.studio.maven.plugins.stubs;
-
-
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-
-/**
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class StudioCopyEclipseDependencyProjectStub extends MavenProjectStub
-{
- // NOP
-}
diff --git a/src/test/java/org/apache/directory/studio/maven/plugins/stubs/StudioUnpackPrefixedProjectStub.java b/src/test/java/org/apache/directory/studio/maven/plugins/stubs/StudioUnpackPrefixedProjectStub.java
deleted file mode 100644
index 5a9f504..0000000
--- a/src/test/java/org/apache/directory/studio/maven/plugins/stubs/StudioUnpackPrefixedProjectStub.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-package org.apache.directory.studio.maven.plugins.stubs;
-
-
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-
-
-/**
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class StudioUnpackPrefixedProjectStub extends MavenProjectStub
-{
- // NOP
-}
diff --git a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.jar b/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.jar
deleted file mode 100644
index f6ed59b..0000000
--- a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.jar
+++ /dev/null
Binary files differ
diff --git a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.jar.sha1 b/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.jar.sha1
deleted file mode 100644
index 7585bcf..0000000
--- a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-f602b5987689e09820fe1a3e67b25c423a1214ae
\ No newline at end of file
diff --git a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.pom b/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.pom
deleted file mode 100644
index 677aad9..0000000
--- a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.pom
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.core</groupId>
- <artifactId>commands</artifactId>
- <name>Commands</name>
- <version>3.3.0-I20070605-0010</version>
- <licenses>
- <license>
- <name>Eclipse Public License - v 1.0</name>
- <url>http://www.eclipse.org/org/documents/epl-v10.html</url>
- </license>
- </licenses>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.equinox</groupId>
- <artifactId>common</artifactId>
- <version>[0,4.0.0)</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
diff --git a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.pom.sha1 b/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.pom.sha1
deleted file mode 100644
index 6ae793a..0000000
--- a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.pom.sha1
+++ /dev/null
@@ -1 +0,0 @@
-dcb6027b956650a1f48509eed884383d0ccb19a8
\ No newline at end of file
diff --git a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/jobs/3.3.1-R33x_v20070709/jobs-3.3.1-R33x_v20070709.jar b/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/jobs/3.3.1-R33x_v20070709/jobs-3.3.1-R33x_v20070709.jar
deleted file mode 100644
index 8fb83f4..0000000
--- a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/jobs/3.3.1-R33x_v20070709/jobs-3.3.1-R33x_v20070709.jar
+++ /dev/null
Binary files differ
diff --git a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/jobs/3.3.1-R33x_v20070709/jobs-3.3.1-R33x_v20070709.jar.sha1 b/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/jobs/3.3.1-R33x_v20070709/jobs-3.3.1-R33x_v20070709.jar.sha1
deleted file mode 100644
index 151aa54..0000000
--- a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/jobs/3.3.1-R33x_v20070709/jobs-3.3.1-R33x_v20070709.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-8d355e18c3bfbf4869af5cc6b784369bc41d7bbd
\ No newline at end of file
diff --git a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/jobs/3.3.1-R33x_v20070709/jobs-3.3.1-R33x_v20070709.pom b/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/jobs/3.3.1-R33x_v20070709/jobs-3.3.1-R33x_v20070709.pom
deleted file mode 100644
index b10f463..0000000
--- a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/jobs/3.3.1-R33x_v20070709/jobs-3.3.1-R33x_v20070709.pom
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.core</groupId>
- <artifactId>jobs</artifactId>
- <name>Eclipse Jobs Mechanism</name>
- <version>3.3.1-R33x_v20070709</version>
- <licenses>
- <license>
- <name>Eclipse Public License - v 1.0</name>
- <url>http://www.eclipse.org/org/documents/epl-v10.html</url>
- </license>
- </licenses>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.equinox</groupId>
- <artifactId>common</artifactId>
- <version>[0,4.0.0)</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
diff --git a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/jobs/3.3.1-R33x_v20070709/jobs-3.3.1-R33x_v20070709.pom.sha1 b/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/jobs/3.3.1-R33x_v20070709/jobs-3.3.1-R33x_v20070709.pom.sha1
deleted file mode 100644
index c41bcce..0000000
--- a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/org/eclipse/core/jobs/3.3.1-R33x_v20070709/jobs-3.3.1-R33x_v20070709.pom.sha1
+++ /dev/null
@@ -1 +0,0 @@
-6bc64c55230dacd30677d9dca9ca0c5d5cc112de
\ No newline at end of file
diff --git a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/repo-marker.txt b/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/repo-marker.txt
deleted file mode 100644
index 14a481e..0000000
--- a/src/test/resources/org/apache/directory/studio/maven/plugins/test-copy-repo/repo-marker.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a marker file to allow the repository to be found in the classpath.
\ No newline at end of file
diff --git a/src/test/resources/unit/basic-clean-test/.externalToolBuilders b/src/test/resources/unit/basic-clean-test/.externalToolBuilders
deleted file mode 100644
index e69de29..0000000
--- a/src/test/resources/unit/basic-clean-test/.externalToolBuilders
+++ /dev/null
diff --git a/src/test/resources/unit/basic-clean-test/lib/dummy.jar b/src/test/resources/unit/basic-clean-test/lib/dummy.jar
deleted file mode 100644
index e69de29..0000000
--- a/src/test/resources/unit/basic-clean-test/lib/dummy.jar
+++ /dev/null
diff --git a/src/test/resources/unit/basic-clean-test/maven-eclipse.xml b/src/test/resources/unit/basic-clean-test/maven-eclipse.xml
deleted file mode 100644
index e69de29..0000000
--- a/src/test/resources/unit/basic-clean-test/maven-eclipse.xml
+++ /dev/null
diff --git a/src/test/resources/unit/basic-clean-test/plugin-exception-pom.xml b/src/test/resources/unit/basic-clean-test/plugin-exception-pom.xml
deleted file mode 100644
index ae64637..0000000
--- a/src/test/resources/unit/basic-clean-test/plugin-exception-pom.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
--->
-<!--
- @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <configuration>
- <libraryPath>lib</libraryPath>
- <skip>false</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/src/test/resources/unit/basic-clean-test/plugin-pom.xml b/src/test/resources/unit/basic-clean-test/plugin-pom.xml
deleted file mode 100644
index d7bb33c..0000000
--- a/src/test/resources/unit/basic-clean-test/plugin-pom.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
--->
-<!--
- @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <configuration>
- <project implementation="org.apache.directory.studio.maven.plugins.stubs.StudioCleanProjectStub" />
- <libraryPath>lib</libraryPath>
- <skip>false</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/src/test/resources/unit/basic-copy-test/plugin-pom.xml b/src/test/resources/unit/basic-copy-test/plugin-pom.xml
deleted file mode 100644
index 0fa16b2..0000000
--- a/src/test/resources/unit/basic-copy-test/plugin-pom.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
--->
-<!--
- @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <configuration>
- <project implementation="org.apache.directory.studio.maven.plugins.stubs.StudioCopyEclipseDependencyProjectStub" />
- <destinationDirectory>target/test-classes/copy-plugins</destinationDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>org.eclipse.core</groupId>
- <artifactId>jobs</artifactId>
- <version>3.3.1-R33x_v20070709</version>
- </artifactItem>
- <artifactItem>
- <groupId>org.eclipse.core</groupId>
- <artifactId>commands</artifactId>
- <version>3.3.0-I20070605-0010</version>
- </artifactItem>
- </artifactItems>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/src/test/resources/unit/basic-unpack-test/plugin-pom.xml b/src/test/resources/unit/basic-unpack-test/plugin-pom.xml
deleted file mode 100644
index a253d3b..0000000
--- a/src/test/resources/unit/basic-unpack-test/plugin-pom.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You 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.
--->
-<!--
- @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.directory.studio</groupId>
- <artifactId>maven-studio-plugin</artifactId>
- <configuration>
- <project implementation="org.apache.directory.studio.maven.plugins.stubs.StudioUnpackPrefixedProjectStub" />
- <outputDirectory>target/test-classes/unpack-plugins</outputDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>org.eclipse.core</groupId>
- <artifactId>jobs</artifactId>
- <version>3.3.1-R33x_v20070709</version>
- </artifactItem>
- <artifactItem>
- <groupId>org.eclipse.core</groupId>
- <artifactId>commands</artifactId>
- <version>3.3.0-I20070605-0010</version>
- </artifactItem>
- </artifactItems>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/studio-aciitemeditor/.classpath b/studio-aciitemeditor/.classpath
new file mode 100644
index 0000000..f96c619
--- /dev/null
+++ b/studio-aciitemeditor/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/studio-aciitemeditor/.project b/studio-aciitemeditor/.project
new file mode 100644
index 0000000..d714e17
--- /dev/null
+++ b/studio-aciitemeditor/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>studio-aciitemeditor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
+ </natures>
+</projectDescription>
diff --git a/studio-aciitemeditor/META-INF/LICENSE.txt b/studio-aciitemeditor/META-INF/LICENSE.txt
new file mode 100755
index 0000000..d645695
--- /dev/null
+++ b/studio-aciitemeditor/META-INF/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/studio-aciitemeditor/META-INF/MANIFEST.MF b/studio-aciitemeditor/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..bde2683
--- /dev/null
+++ b/studio-aciitemeditor/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Apache Directory Studio ACI Item Editor
+Bundle-SymbolicName: org.apache.directory.studio.aciitemeditor;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: org.apache.directory.studio.aciitemeditor.Activator
+Bundle-Vendor: Apache Software Foundation
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.jface.text,
+ org.eclipse.core.resources,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.workbench.texteditor,
+ org.apache.directory.studio.jars,
+ org.apache.directory.studio.connection.core,
+ org.apache.directory.studio.connection.ui,
+ org.apache.directory.studio.ldapbrowser.core,
+ org.apache.directory.studio.valueeditors,
+ org.apache.directory.studio.ldapbrowser.common
+Eclipse-LazyStart: true
+Bundle-ClassPath: .
diff --git a/studio-aciitemeditor/META-INF/NOTICE.txt b/studio-aciitemeditor/META-INF/NOTICE.txt
new file mode 100644
index 0000000..3fa431b
--- /dev/null
+++ b/studio-aciitemeditor/META-INF/NOTICE.txt
Binary files differ
diff --git a/studio-aciitemeditor/build.properties b/studio-aciitemeditor/build.properties
new file mode 100644
index 0000000..3ab7fe8
--- /dev/null
+++ b/studio-aciitemeditor/build.properties
@@ -0,0 +1,9 @@
+source.. = src/main/java/,\
+ src/main/resources,\
+ src/test/java/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ resources/,\
+ lib/
diff --git a/studio-aciitemeditor/build.xml b/studio-aciitemeditor/build.xml
new file mode 100644
index 0000000..cf155e1
--- /dev/null
+++ b/studio-aciitemeditor/build.xml
@@ -0,0 +1,59 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<project default="plugin">
+ <import file="../studio-build/build.xml"/>
+
+
+ <!-- RETRIEVE-STUDIO-JAR-DEPENDENCIES TASK -->
+ <target name="retrieve-studio-jar-dependencies" description="Compiles the dependencies of the project" >
+ <ant dir="../studio-jars" target="retrieve-dependencies" inheritall="false" />
+ </target>
+
+
+ <!-- COMPILE-DEPENDENCIES TASK -->
+ <target name="compile-dependencies" description="Compiles the dependencies of the project" >
+ <ant dir="../studio-connection-core" target="compile" inheritall="false" />
+ <ant dir="../studio-connection-ui" target="compile" inheritall="false" />
+ <ant dir="../studio-ldapbrowser-core" target="compile" inheritall="false" />
+ <ant dir="../studio-ldapbrowser-common" target="compile" inheritall="false" />
+ <ant dir="../studio-valueeditors" target="compile" inheritall="false" />
+ </target>
+
+
+ <!-- BUILD-CLASSPATH TASK -->
+ <target name="build-classpath" depends="retrieve-studio-jar-dependencies, compile-dependencies" description="Computes the classpath" >
+ <echo>Building classpath for ${project.name} (${project.id}) version ${project.version}</echo>
+ <path id="classpath">
+ <!-- Project dependencies -->
+ <fileset dir="${lib.dir}" />
+ <!-- Eclipse dependencies -->
+ <fileset dir="../dependencies/eclipse/3.2">
+ <include name="**/*.jar"/>
+ </fileset>
+ <!-- Plugin dependencies -->
+ <fileset dir="../studio-jars/lib/" />
+ <pathelement location="../studio-connection-core/target/classes"/>
+ <pathelement location="../studio-connection-ui/target/classes"/>
+ <pathelement location="../studio-ldapbrowser-core/target/classes"/>
+ <pathelement location="../studio-ldapbrowser-common/target/classes"/>
+ <pathelement location="../studio-valueeditors/target/classes"/>
+ </path>
+ </target>
+
+</project>
diff --git a/studio-aciitemeditor/ivy.xml b/studio-aciitemeditor/ivy.xml
new file mode 100644
index 0000000..709cc55
--- /dev/null
+++ b/studio-aciitemeditor/ivy.xml
@@ -0,0 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.studio" module="studio-aciitemeditor"/>
+</ivy-module>
\ No newline at end of file
diff --git a/studio-aciitemeditor/plugin.properties b/studio-aciitemeditor/plugin.properties
new file mode 100644
index 0000000..d6ad1cb
--- /dev/null
+++ b/studio-aciitemeditor/plugin.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+project.name=Apache Directory Studio ACI Item Editor
+project.version=1.0.0
+project.id=org.apache.directory.studio.aciitemeditor
diff --git a/studio-aciitemeditor/plugin.xml b/studio-aciitemeditor/plugin.xml
new file mode 100644
index 0000000..35e5651
--- /dev/null
+++ b/studio-aciitemeditor/plugin.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<plugin>
+
+ <extension
+ point="org.apache.directory.studio.valueeditors">
+ <valueEditor
+ class="org.apache.directory.studio.aciitemeditor.ACIItemValueEditor"
+ icon="resources/icons/aciitemeditor.gif"
+ name="ACI Item Editor">
+ <syntax syntaxOID="1.3.6.1.4.1.1466.115.121.1.1"/>
+ </valueEditor>
+ <valueEditor
+ class="org.apache.directory.studio.aciitemeditor.valueeditors.SubtreeValueEditor"
+ icon="resources/icons/subtreeeditor.png"
+ name="Subtree Specification Editor">
+ <syntax syntaxOID="1.3.6.1.4.1.1466.115.121.1.45"/>
+ </valueEditor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors.templates">
+ <include file="resources/templates/templates.xml"/>
+ <contextType
+ class="org.eclipse.jface.text.templates.TemplateContextType"
+ id="org.apache.directory.studio.aciitemeditor.templates"
+ name="ACI Item"/>
+ </extension>
+
+</plugin>
diff --git a/studio-aciitemeditor/resources/icons/aciitemeditor.gif b/studio-aciitemeditor/resources/icons/aciitemeditor.gif
new file mode 100644
index 0000000..c80481c
--- /dev/null
+++ b/studio-aciitemeditor/resources/icons/aciitemeditor.gif
Binary files differ
diff --git a/studio-aciitemeditor/resources/icons/attributetypeeditor.png b/studio-aciitemeditor/resources/icons/attributetypeeditor.png
new file mode 100644
index 0000000..0ff759b
--- /dev/null
+++ b/studio-aciitemeditor/resources/icons/attributetypeeditor.png
Binary files differ
diff --git a/studio-aciitemeditor/resources/icons/checkbox_checked.gif b/studio-aciitemeditor/resources/icons/checkbox_checked.gif
new file mode 100644
index 0000000..37aac2c
--- /dev/null
+++ b/studio-aciitemeditor/resources/icons/checkbox_checked.gif
Binary files differ
diff --git a/studio-aciitemeditor/resources/icons/checkbox_deny.gif b/studio-aciitemeditor/resources/icons/checkbox_deny.gif
new file mode 100644
index 0000000..f25a7e2
--- /dev/null
+++ b/studio-aciitemeditor/resources/icons/checkbox_deny.gif
Binary files differ
diff --git a/studio-aciitemeditor/resources/icons/checkbox_grant.gif b/studio-aciitemeditor/resources/icons/checkbox_grant.gif
new file mode 100644
index 0000000..c80481c
--- /dev/null
+++ b/studio-aciitemeditor/resources/icons/checkbox_grant.gif
Binary files differ
diff --git a/studio-aciitemeditor/resources/icons/checkbox_unchecked.gif b/studio-aciitemeditor/resources/icons/checkbox_unchecked.gif
new file mode 100644
index 0000000..cdc1086
--- /dev/null
+++ b/studio-aciitemeditor/resources/icons/checkbox_unchecked.gif
Binary files differ
diff --git a/studio-aciitemeditor/resources/icons/error.gif b/studio-aciitemeditor/resources/icons/error.gif
new file mode 100644
index 0000000..0bc6068
--- /dev/null
+++ b/studio-aciitemeditor/resources/icons/error.gif
Binary files differ
diff --git a/studio-aciitemeditor/resources/icons/filtereditor.gif b/studio-aciitemeditor/resources/icons/filtereditor.gif
new file mode 100644
index 0000000..0c81f8c
--- /dev/null
+++ b/studio-aciitemeditor/resources/icons/filtereditor.gif
Binary files differ
diff --git a/studio-aciitemeditor/resources/icons/subtreeeditor.png b/studio-aciitemeditor/resources/icons/subtreeeditor.png
new file mode 100644
index 0000000..d6700f4
--- /dev/null
+++ b/studio-aciitemeditor/resources/icons/subtreeeditor.png
Binary files differ
diff --git a/studio-aciitemeditor/resources/templates/templates.xml b/studio-aciitemeditor/resources/templates/templates.xml
new file mode 100644
index 0000000..d2fdd90
--- /dev/null
+++ b/studio-aciitemeditor/resources/templates/templates.xml
@@ -0,0 +1,529 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<!-- This file is used to store the code templates for the ACI Item syntax -->
+<templates>
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.identificationTag"
+ name="identificationTag"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">identificationTag "${cursor}",
+</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.precedence"
+ name="precedence"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">precedence ${cursor},
+</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.authenticationLevel"
+ name="authenticationLevel"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">authenticationLevel ${cursor},
+</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.none"
+ name="none"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">none</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.simple"
+ name="simple"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">simple</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.strong"
+ name="strong"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">strong</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.itemOrUserFirst"
+ name="itemOrUserFirst"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">itemOrUserFirst ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.itemFirst"
+ name="itemFirst"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">itemFirst :
+{
+ ${cursor}
+}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.userFirst"
+ name="userFirst"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">userFirst :
+{
+ ${cursor}
+}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.userClasses"
+ name="userClasses"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">userClasses
+{
+ ${cursor}
+}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.userPermissions"
+ name="userPermissions"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">userPermissions
+{
+ ${cursor}
+}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.protectedItems"
+ name="protectedItems"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">protectedItems
+{
+ ${cursor}
+}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.itemPermissions"
+ name="itemPermissions"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">itemPermissions
+{
+ ${cursor}
+}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantAdd"
+ name="grantAdd"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantAdd</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyAdd"
+ name="denyAdd"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyAdd</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantDiscloseOnError"
+ name="grantDiscloseOnError"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantDiscloseOnError</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyDiscloseOnError"
+ name="denyDiscloseOnError"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyDiscloseOnError</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantRead"
+ name="grantRead"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantRead</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyRead"
+ name="denyRead"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyRead</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantRemove"
+ name="grantRemove"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantRemove</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyRemove"
+ name="denyRemove"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyRemove</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantBrowse"
+ name="grantBrowse"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantBrowse</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyBrowse"
+ name="denyBrowse"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyBrowse</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantExport"
+ name="grantExport"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantExport</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyExport"
+ name="denyExport"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyExport</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantImport"
+ name="grantImport"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantImport</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyImport"
+ name="denyImport"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyImport</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantModify"
+ name="grantModify"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantModify</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyModify"
+ name="denyModify"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyModify</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantRename"
+ name="grantRename"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantRename</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyRename"
+ name="denyRename"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyRename</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantReturnDN"
+ name="grantReturnDN"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantReturnDN</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyReturnDN"
+ name="denyReturnDN"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyReturnDN</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantCompare"
+ name="grantCompare"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantCompare</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyCompare"
+ name="denyCompare"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyCompare</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantFilterMatch"
+ name="grantFilterMatch"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantFilterMatch</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyFilterMatch"
+ name="denyFilterMatch"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyFilterMatch</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantInvoke"
+ name="grantInvoke"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantInvoke</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.denyInvoke"
+ name="denyInvoke"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">denyInvoke</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.classes"
+ name="classes"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">classes ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.entry"
+ name="entry"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">entry</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.allUserAttributeTypes"
+ name="allUserAttributeTypes"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">allUserAttributeTypes</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.allUserAttributeTypesAndValues"
+ name="allUserAttributeTypesAndValues"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">allUserAttributeTypesAndValues</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.grantsAndDenials"
+ name="grantsAndDenials"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">grantsAndDenials
+{
+ ${cursor}
+}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.allUsers"
+ name="allUsers"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">allUsers</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.thisEntry"
+ name="thisEntry"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">thisEntry</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.attributeType"
+ name="attributeType"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">attributeType ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.allAttributeValues"
+ name="allAttributeValues"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">allAttributeValues ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.selfValue"
+ name="selfValue"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">selfValue ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.item"
+ name="item"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">item:${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.item"
+ name="item:"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">item:${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.and"
+ name="and:"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">and:${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.or"
+ name="or:"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">or:${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.not"
+ name="not:"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">not:${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.name"
+ name="name"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">name { ${cursor} }</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.userGroup"
+ name="userGroup"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">userGroup { ${cursor} }</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.subtree"
+ name="subtree"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">subtree { ${cursor} }</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.base"
+ name="base"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">base ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.specificExclusions"
+ name="specificExclusions"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">specificExclusions ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.chopBefore"
+ name="chopBefore:"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">chopBefore:${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.chopAfter"
+ name="chopAfter:"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">chopAfter:${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.minimum"
+ name="minimum"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">minimum ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.maximum"
+ name="maximum"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">maximum ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.valuesIn"
+ name="valuesIn"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">valuesIn ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.type"
+ name="type"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">type ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.maxCount"
+ name="maxCount"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">maxCount ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.maxImmSub"
+ name="maxImmSub"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">maxImmSub ${cursor}</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.maxValueCount"
+ name="maxValueCount"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">maxValueCount { ${cursor} }</template>
+
+ <template
+ id="org.apache.directory.studio.aciitemeditor.templates.restrictedBy"
+ name="restrictedBy"
+ context="org.apache.directory.studio.aciitemeditor.templates"
+ enabled="true"
+ deleted="false">restrictedBy { ${cursor} }</template>
+
+</templates>
\ No newline at end of file
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIITemConstants.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIITemConstants.java
new file mode 100644
index 0000000..87c932c
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIITemConstants.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor;
+
+/**
+ * This interface is used to store all constants related to the ACI Item Editor Plugin
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ACIITemConstants
+{
+ /** The ID for ACI Item Template*/
+ public static final String ACI_ITEM_TEMPLATE_ID = "org.apache.directory.studio.aciitemeditor.templates"; //$NON-NLS-1$
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIItemValueEditor.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIItemValueEditor.java
new file mode 100644
index 0000000..c3935ad
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIItemValueEditor.java
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor;
+
+
+import org.apache.directory.studio.aciitemeditor.dialogs.ACIItemDialog;
+import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
+import org.apache.directory.studio.ldapbrowser.core.model.IValue;
+import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * The IValueEditor implementation of this plugin.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIItemValueEditor extends AbstractDialogStringValueEditor
+{
+
+ /**
+ * The Constructor.
+ */
+ public ACIItemValueEditor()
+ {
+ super();
+ }
+
+
+ /**
+ * Opens the ACI item dialog.
+ *
+ * @param shell the shell
+ *
+ * @return true, if open dialog
+ */
+ public boolean openDialog( Shell shell )
+ {
+ Object value = getValue();
+ if ( value != null && value instanceof ACIItemValueWithContext )
+ {
+ ACIItemValueWithContext context = (ACIItemValueWithContext)value;
+
+ ACIItemDialog dialog = new ACIItemDialog( shell, context );
+ if ( dialog.open() == ACIItemDialog.OK && !"".equals( dialog.getACIItemValue() ) ) //$NON-NLS-1$
+ {
+ setValue( dialog.getACIItemValue() );
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ * Returns a ACIItemValueContext with the connection
+ * and entry of the attribute hierarchy and an empty value if there
+ * are no values in attributeHierarchy.
+ *
+ * Returns a ACIItemValueContext with the connection
+ * and entry of the attribute hierarchy and a value if there is
+ * one value in attributeHierarchy.
+ *
+ * @param attributeHierarchy the attribute hierarchy
+ *
+ * @return the raw value
+ */
+ public Object getRawValue( AttributeHierarchy attributeHierarchy )
+ {
+ if ( attributeHierarchy == null )
+ {
+ return null;
+ }
+ else if ( attributeHierarchy.size() == 1 && attributeHierarchy.getAttribute().getValueSize() == 0 )
+ {
+ IEntry entry = attributeHierarchy.getAttribute().getEntry();
+ IBrowserConnection connection = entry.getBrowserConnection();
+ return new ACIItemValueWithContext( connection, entry, "" ); //$NON-NLS-1$
+ }
+ else if ( attributeHierarchy.size() == 1 && attributeHierarchy.getAttribute().getValueSize() == 1 )
+ {
+ IEntry entry = attributeHierarchy.getAttribute().getEntry();
+ IBrowserConnection connection = entry.getBrowserConnection();
+ String value = getDisplayValue( attributeHierarchy );
+ return new ACIItemValueWithContext( connection, entry, value );
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+
+ /**
+ * Returns a ACIItemValueContext with the connection,
+ * entry and string value of the given value.
+ *
+ * @param value the value
+ *
+ * @return the raw value
+ */
+ public Object getRawValue( IValue value )
+ {
+ Object o = super.getRawValue( value );
+ if ( o != null && o instanceof String )
+ {
+ IEntry entry = value.getAttribute().getEntry();
+ IBrowserConnection connection = entry.getBrowserConnection();
+ String v = (String) o;
+ return new ACIItemValueWithContext( connection, entry, v );
+ }
+
+ return null;
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIItemValueWithContext.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIItemValueWithContext.java
new file mode 100644
index 0000000..3496f1d
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ACIItemValueWithContext.java
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor;
+
+
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
+
+
+/**
+ * The ACIItemValueContext is used to pass contextual
+ * information to the opened ACIItemDialog.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIItemValueWithContext
+{
+
+ /** The connection, used to browse the directory. */
+ private IBrowserConnection connection;
+
+ /** The entry. */
+ private IEntry entry;
+
+ /** The ACI item. */
+ private String aciItemValue;
+
+
+ /**
+ * Creates a new instance of ACIItemValueContext.
+ *
+ * @param aciItemValue the ACI item value
+ * @param connection the connection
+ * @param entry the entry
+ */
+ public ACIItemValueWithContext( IBrowserConnection connection, IEntry entry, String aciItemValue )
+ {
+ this.connection = connection;
+ this.entry = entry;
+ this.aciItemValue = aciItemValue;
+ }
+
+
+ /**
+ * Gets the aci item value.
+ *
+ * @return the aciItemValue
+ */
+ public String getACIItemValue()
+ {
+ return aciItemValue;
+ }
+
+
+ /**
+ * @return the connection
+ */
+ public IBrowserConnection getConnection()
+ {
+ return connection;
+ }
+
+
+ /**
+ * @return the entry
+ */
+ public IEntry getEntry()
+ {
+ return entry;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString()
+ {
+ return aciItemValue == null ? "" : aciItemValue; //$NON-NLS-1$
+ }
+
+}
\ No newline at end of file
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java
new file mode 100644
index 0000000..b3804f4
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java
@@ -0,0 +1,266 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor;
+
+
+import java.io.IOException;
+
+import org.apache.directory.shared.ldap.aci.ACIItemParser;
+import org.apache.directory.studio.aciitemeditor.sourceeditor.ACICodeScanner;
+import org.apache.directory.studio.aciitemeditor.sourceeditor.ACITextAttributeProvider;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.text.templates.GlobalTemplateVariables;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
+import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Activator extends AbstractUIPlugin
+{
+
+ /** The plug-in ID */
+ public static final String PLUGIN_ID = "org.apache.directory.studio.aciitemeditor"; //$NON-NLS-1$
+
+ /** The shared instance */
+ private static Activator plugin;
+
+ /** The shared ACI Item parser */
+ private ACIItemParser aciItemParser;
+
+ /** The shared ACI Code Scanner */
+ private ACICodeScanner aciCodeScanner;
+
+ /** The shared ACI TextAttribute Provider */
+ private ACITextAttributeProvider textAttributeProvider;
+
+ /** The template store */
+ private ContributionTemplateStore aciTemplateStore;
+
+ /** The context type registry */
+ private ContributionContextTypeRegistry aciTemplateContextTypeRegistry;
+
+
+ /**
+ * The constructor
+ */
+ public Activator()
+ {
+ plugin = this;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void start( BundleContext context ) throws Exception
+ {
+ super.start( context );
+
+ // ACI Template ContextType Registry initialization
+ if ( aciTemplateContextTypeRegistry == null )
+ {
+ aciTemplateContextTypeRegistry = new ContributionContextTypeRegistry();
+
+ aciTemplateContextTypeRegistry.addContextType( ACIITemConstants.ACI_ITEM_TEMPLATE_ID );
+ aciTemplateContextTypeRegistry.getContextType( ACIITemConstants.ACI_ITEM_TEMPLATE_ID ).addResolver(
+ new GlobalTemplateVariables.Cursor() );
+ }
+
+ // ACI Template Store initialization
+ if ( aciTemplateStore == null )
+ {
+ aciTemplateStore = new ContributionTemplateStore( getAciTemplateContextTypeRegistry(),
+ getPreferenceStore(), "templates" ); //$NON-NLS-1$
+ try
+ {
+ aciTemplateStore.load();
+ }
+ catch ( IOException e )
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void stop( BundleContext context ) throws Exception
+ {
+ plugin = null;
+ super.stop( context );
+ }
+
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault()
+ {
+ return plugin;
+ }
+
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor( String path )
+ {
+ return imageDescriptorFromPlugin( PLUGIN_ID, path );
+ }
+
+
+ /**
+ * Use this method to get SWT images. A ImageRegistry is used
+ * to manage the the path->Image mapping.
+ * <p>
+ * Note: Don't dispose the returned SWT Image. It is disposed
+ * automatically when the plugin is stopped.
+ *
+ * @param path the path
+ * @return The SWT Image or null
+ */
+ public Image getImage( String path )
+ {
+ Image image = getImageRegistry().get( path );
+ if ( image == null )
+ {
+ ImageDescriptor id = getImageDescriptor( path );
+ if ( id != null )
+ {
+ image = id.createImage();
+ getImageRegistry().put( path, image );
+ }
+ }
+ return image;
+ }
+
+
+ /**
+ * Returns the shared ACI item parser. Take care that
+ * the parser isn't used concurrently.
+ *
+ * @return the shared ACI item parser.
+ */
+ public ACIItemParser getACIItemParser()
+ {
+ if ( aciItemParser == null )
+ {
+ aciItemParser = new ACIItemParser( null );
+ }
+ return aciItemParser;
+ }
+
+
+ /**
+ * Returns the button with respect to the font metrics.
+ *
+ * @param control a control
+ * @return the button width
+ */
+ public static int getButtonWidth( Control control )
+ {
+ GC gc = new GC( control );
+ gc.setFont( JFaceResources.getDialogFont() );
+ FontMetrics fontMetrics = gc.getFontMetrics();
+ gc.dispose();
+
+ int width = Dialog.convertHorizontalDLUsToPixels( fontMetrics, IDialogConstants.BUTTON_WIDTH );
+ return width;
+ }
+
+
+ /**
+ * Returns the TextAttribute Provider
+ *
+ * @return
+ * the TextAttribute Provider
+ */
+ public ACITextAttributeProvider getTextAttributeProvider()
+ {
+ if ( textAttributeProvider == null )
+ {
+ textAttributeProvider = new ACITextAttributeProvider();
+ }
+ return textAttributeProvider;
+ }
+
+
+ /**
+ * Retuns the the Aci Code Scanner
+ *
+ * @return
+ * the the Aci Code Scanner
+ */
+ public ACICodeScanner getAciCodeScanner()
+ {
+ if ( aciCodeScanner == null )
+ {
+ aciCodeScanner = new ACICodeScanner( getTextAttributeProvider() );
+ }
+ return aciCodeScanner;
+ }
+
+
+ /**
+ * Gets the ACI Template ContextType Registry
+ *
+ * @return
+ * the ACI Template ContextType Registry
+ */
+ public ContributionContextTypeRegistry getAciTemplateContextTypeRegistry()
+ {
+ return aciTemplateContextTypeRegistry;
+ }
+
+
+ /**
+ * Gets the ACI Template Store
+ *
+ * @return
+ * the ACI Template Store
+ */
+ public ContributionTemplateStore getAciTemplateStore()
+ {
+ return aciTemplateStore;
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/ACIItemDialog.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/ACIItemDialog.java
new file mode 100644
index 0000000..8ad12c6
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/ACIItemDialog.java
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.dialogs;
+
+
+import java.text.ParseException;
+
+import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.aciitemeditor.widgets.ACIItemTabFolderComposite;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * The main dialog of the ACI item editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIItemDialog extends Dialog
+{
+
+ /** The context containing the initial value, passed by the constructor */
+ private ACIItemValueWithContext context;
+
+ /** The resulting value returned by getACIItemValue() */
+ private String returnValue;
+
+ /** The child composite with the tabs */
+ private ACIItemTabFolderComposite tabFolderComposite;
+
+
+ /**
+ * Creates a new instance of ACIItemDialog.
+ *
+ * @param parentShell the shell
+ * @param context the context
+ */
+ public ACIItemDialog( Shell parentShell, ACIItemValueWithContext context )
+ {
+ super( parentShell );
+ super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+
+ assert context != null;
+ assert context.getACIItemValue() != null;
+ assert context.getConnection() != null;
+
+ this.context = context;
+
+ this.returnValue = null;
+ }
+
+
+ /**
+ * Sets the dialog image and text.
+ *
+ * {@inheritDoc}
+ */
+ protected void configureShell( Shell shell )
+ {
+ super.configureShell( shell );
+ shell.setText( Messages.getString( "ACIItemDialog.dialog.text" ) ); //$NON-NLS-1$
+ shell.setImage( Activator.getDefault().getImage( Messages.getString( "ACIItemDialog.dialog.icon" ) ) ); //$NON-NLS-1$
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation additionally adds the Format button.
+ */
+ protected Control createButtonBar( Composite parent )
+ {
+ Composite composite = ( Composite ) super.createButtonBar( parent );
+ super.createButton( composite, 987654321, Messages.getString( "ACIItemDialog.button.format" ), false ); //$NON-NLS-1$
+ super.createButton( composite, 876543210, Messages.getString( "ACIItemDialog.button.checkSyntax" ), false ); //$NON-NLS-1$
+ return composite;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation checks if the Format button was pressed.
+ */
+ protected void buttonPressed( int buttonId )
+ {
+ if ( buttonId == 987654321 )
+ {
+ tabFolderComposite.format();
+ }
+ if ( buttonId == 876543210 )
+ {
+ try
+ {
+ tabFolderComposite.getInput();
+ MessageDialog
+ .openInformation(
+ getShell(),
+ Messages.getString( "ACIItemDialog.syntaxOk.title" ), Messages.getString( "ACIItemDialog.syntaxOk.text" ) ); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ catch ( ParseException pe )
+ {
+ IStatus status = new Status( IStatus.ERROR, Activator.PLUGIN_ID, 1, Messages
+ .getString( "ACIItemDialog.error.invalidSyntax" ), pe ); //$NON-NLS-1$
+ ErrorDialog.openError( getShell(), Messages.getString( "ACIItemDialog.error.title" ), null, status ); //$NON-NLS-1$
+ }
+ }
+
+ // call super implementation
+ super.buttonPressed( buttonId );
+ }
+
+
+ /**
+ * Reimplementation: Checks for valid syntax first and sets the return value.
+ */
+ protected void okPressed()
+ {
+ try
+ {
+ this.returnValue = tabFolderComposite.getInput();
+ super.okPressed();
+ }
+ catch ( ParseException pe )
+ {
+ IStatus status = new Status( IStatus.ERROR, Activator.PLUGIN_ID, 1, Messages
+ .getString( "ACIItemDialog.error.invalidSyntax" ), pe ); //$NON-NLS-1$
+ ErrorDialog.openError( getShell(), Messages.getString( "ACIItemDialog.error.title" ), null, status ); //$NON-NLS-1$
+ }
+ }
+
+
+ /**
+ * Creates the tabFolderComposite.
+ *
+ * @param parent the parent
+ *
+ * @return the control
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = ( Composite ) super.createDialogArea( parent );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH ) * 4 / 3;
+ gd.heightHint = convertVerticalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH ) * 4 / 3;
+ composite.setLayoutData( gd );
+
+ tabFolderComposite = new ACIItemTabFolderComposite( composite, SWT.NONE );
+
+ // set initial value
+ if ( context != null )
+ {
+ tabFolderComposite.setContext( context );
+ tabFolderComposite.setInput( context.getACIItemValue() );
+ }
+
+ applyDialogFont( composite );
+ return composite;
+ }
+
+
+ /**
+ * Returns the string representation of the ACI item. Returns
+ * null if Cancel button was pressed.
+ *
+ * @return the string representation of the ACI item or null
+ */
+ public String getACIItemValue()
+ {
+ return returnValue;
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/ItemPermissionDialog.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/ItemPermissionDialog.java
new file mode 100644
index 0000000..fc45d44
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/ItemPermissionDialog.java
@@ -0,0 +1,208 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.dialogs;
+
+
+import java.util.Collection;
+
+import org.apache.directory.shared.ldap.aci.GrantAndDenial;
+import org.apache.directory.shared.ldap.aci.ItemPermission;
+import org.apache.directory.shared.ldap.aci.UserClass;
+import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.aciitemeditor.widgets.ACIItemGrantsAndDenialsComposite;
+import org.apache.directory.studio.aciitemeditor.widgets.ACIItemUserClassesComposite;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+
+
+/**
+ * A dialog to compose item permissions.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ItemPermissionDialog extends Dialog
+{
+
+ /** The context */
+ private ACIItemValueWithContext context;
+
+ /** The initial value, passed by the constructor */
+ private ItemPermission initialItemPermission;
+
+ /** The resulting value returned by getItemPermission() */
+ private ItemPermission returnItemPermission;
+
+ /** The precedence checkbox to enable/disable spinner */
+ private Button precedenceCheckbox = null;
+
+ /** The precedence spinner */
+ private Spinner precedenceSpinner = null;
+
+ /** The widget with user classes table */
+ private ACIItemUserClassesComposite userClassesComposite;
+
+ /** The widget with grants and denials table */
+ private ACIItemGrantsAndDenialsComposite grantsAndDenialsComposite;
+
+
+ /**
+ * Creates a new instance of ItemPermissionDialog.
+ *
+ * @param parentShell the shell
+ * @param initialItemPermission the initial item permission
+ * @param context the context
+ */
+ public ItemPermissionDialog( Shell parentShell, ItemPermission initialItemPermission,
+ ACIItemValueWithContext context )
+ {
+ super( parentShell );
+ super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+ this.context = context;
+ this.initialItemPermission = initialItemPermission;
+ this.returnItemPermission = null;
+ }
+
+
+ /**
+ * Sets the dialog image and text.
+ *
+ * {@inheritDoc}
+ */
+ protected void configureShell( Shell shell )
+ {
+ super.configureShell( shell );
+ shell.setText( Messages.getString( "ItemPermissionDialog.dialog.text" ) ); //$NON-NLS-1$
+ shell.setImage( Activator.getDefault().getImage( Messages.getString( "ItemPermissionDialog.dialog.icon" ) ) ); //$NON-NLS-1$
+ }
+
+
+ /**
+ * Reimplementation: Checks for valid syntax and sets the return value.
+ */
+ protected void okPressed()
+ {
+ try
+ {
+ int precedence = precedenceCheckbox.getSelection() ? precedenceSpinner.getSelection() : -1;
+ Collection<UserClass> userClasses = userClassesComposite.getUserClasses();
+ Collection<GrantAndDenial> grantsAndDenials = grantsAndDenialsComposite.getGrantsAndDenials();
+ returnItemPermission = new ItemPermission( precedence, grantsAndDenials, userClasses );
+ super.okPressed();
+ }
+ catch ( Exception e )
+ {
+ MessageDialog.openError( getShell(), Messages
+ .getString( "ItemPermissionDialog.error.invalidItemPermission" ), e.getMessage() ); //$NON-NLS-1$
+ }
+ }
+
+
+ /**
+ * Creates all the dialog content.
+ *
+ * @param parent the parent
+ *
+ * @return the control
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = ( Composite ) super.createDialogArea( parent );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+ gd.heightHint = convertVerticalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH ) * 4 / 3;
+ composite.setLayoutData( gd );
+
+ // precedence
+ Composite spinnerComposite = new Composite( composite, SWT.NONE );
+ spinnerComposite.setLayout( new GridLayout( 2, false ) );
+ spinnerComposite.setLayoutData( new GridData() );
+ precedenceCheckbox = new Button( spinnerComposite, SWT.CHECK );
+ precedenceCheckbox.setText( Messages.getString( "ItemPermissionDialog.precedence.label" ) ); //$NON-NLS-1$
+ precedenceCheckbox.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ precedenceSpinner.setEnabled( precedenceCheckbox.getSelection() );
+ }
+ } );
+ precedenceSpinner = new Spinner( spinnerComposite, SWT.BORDER );
+ precedenceSpinner.setMinimum( 0 );
+ precedenceSpinner.setMaximum( 255 );
+ precedenceSpinner.setDigits( 0 );
+ precedenceSpinner.setIncrement( 1 );
+ precedenceSpinner.setPageIncrement( 10 );
+ precedenceSpinner.setSelection( 0 );
+ precedenceSpinner.setEnabled( false );
+ GridData precedenceGridData = new GridData();
+ precedenceGridData.grabExcessHorizontalSpace = true;
+ precedenceGridData.verticalAlignment = GridData.CENTER;
+ precedenceGridData.horizontalAlignment = GridData.BEGINNING;
+ precedenceGridData.widthHint = 3 * 12;
+ precedenceSpinner.setLayoutData( precedenceGridData );
+
+ // user classes
+ userClassesComposite = new ACIItemUserClassesComposite( composite, SWT.NONE );
+ userClassesComposite.setContext( context );
+
+ // grants and denial
+ grantsAndDenialsComposite = new ACIItemGrantsAndDenialsComposite( composite, SWT.NONE );
+
+ // set initial values
+ if ( initialItemPermission != null )
+ {
+ if ( initialItemPermission.getPrecedence() > -1 )
+ {
+ precedenceCheckbox.setSelection( true );
+ precedenceSpinner.setEnabled( true );
+ precedenceSpinner.setSelection( initialItemPermission.getPrecedence() );
+ }
+ userClassesComposite.setUserClasses( initialItemPermission.getUserClasses() );
+ grantsAndDenialsComposite.setGrantsAndDenials( initialItemPermission.getGrantsAndDenials() );
+ }
+
+ applyDialogFont( composite );
+ return composite;
+ }
+
+
+ /**
+ * Returns the item permission. Returns null if Cancel button was pressed.
+ *
+ * @return the composed item permission or null
+ */
+ public ItemPermission getItemPermission()
+ {
+ return returnItemPermission;
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/Messages.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/Messages.java
new file mode 100644
index 0000000..29b2241
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/Messages.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.dialogs;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.apache.directory.studio.aciitemeditor.dialogs.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+
+ private Messages()
+ {
+ }
+
+
+ public static String getString( String key )
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString( key );
+ }
+ catch ( MissingResourceException e )
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/MultiValuedDialog.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/MultiValuedDialog.java
new file mode 100644
index 0000000..4ecc482
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/MultiValuedDialog.java
@@ -0,0 +1,401 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.dialogs;
+
+
+import java.util.List;
+
+import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.ldapbrowser.core.internal.model.Attribute;
+import org.apache.directory.studio.ldapbrowser.core.internal.model.Value;
+import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
+import org.apache.directory.studio.ldapbrowser.core.model.IValue;
+import org.apache.directory.studio.ldapbrowser.core.model.ModelModificationException;
+import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+
+
+/**
+ * Dialog to edit user classes or protected items with multiple values.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class MultiValuedDialog extends Dialog
+{
+ /** The dialog title */
+ private String displayName;
+
+ /** The value editor */
+ private AbstractDialogStringValueEditor valueEditor;
+
+ /** The values, may be empty. */
+ private List<String> values;
+
+ /** The context */
+ private ACIItemValueWithContext context;
+
+ /** The inner composite for all the content */
+ private Composite composite = null;
+
+ /** The table control for the table viewer */
+ private Table table = null;
+
+ /** The table viewer containing all user classes */
+ private TableViewer tableViewer = null;
+
+ /** The composite containing the buttons */
+ private Composite buttonComposite = null;
+
+ /** The add button */
+ private Button addButton = null;
+
+ /** The edit button */
+ private Button editButton = null;
+
+ /** The delete button */
+ private Button deleteButton = null;
+
+
+ /**
+ * Creates a new instance of MultiValuedDialog.
+ *
+ * @param parentShell the shell
+ * @param displayName the display name of the edited element
+ * @param values a modifyable list of values
+ * @param context the context
+ * @param valueEditor the detail value editor
+ */
+ public MultiValuedDialog( Shell parentShell, String displayName, List<String> values,
+ ACIItemValueWithContext context, AbstractDialogStringValueEditor valueEditor )
+ {
+ super( parentShell );
+ super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+
+ this.displayName = displayName;
+ this.values = values;
+ this.context = context;
+ this.valueEditor = valueEditor;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * Sets the dialog title.
+ */
+ protected void configureShell( Shell shell )
+ {
+ super.configureShell( shell );
+ shell.setText( Messages.getString("MultiValuedDialog.dialog.titlePrefix") + displayName ); //$NON-NLS-1$
+ shell.setImage( Activator.getDefault().getImage( Messages.getString("MultiValuedDialog.dialog.icon") ) ); //$NON-NLS-1$
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * Creates only a OK button.
+ */
+ protected void createButtonsForButtonBar( Composite parent )
+ {
+ createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ // create composite
+ composite = ( Composite ) super.createDialogArea( parent );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+ gd.heightHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH / 2 );
+ composite.setLayoutData( gd );
+ GridLayout layout = ( GridLayout ) composite.getLayout();
+ layout.makeColumnsEqualWidth = false;
+ layout.numColumns = 2;
+
+ createTable();
+
+ createButtonComposite();
+
+ applyDialogFont( composite );
+ return composite;
+ }
+
+
+ /**
+ * This method initializes table and table viewer
+ */
+ private void createTable()
+ {
+ GridData tableGridData = new GridData( GridData.FILL_BOTH );
+ tableGridData.grabExcessHorizontalSpace = true;
+ tableGridData.verticalAlignment = GridData.FILL;
+ tableGridData.horizontalAlignment = GridData.FILL;
+ //tableGridData.heightHint = 100;
+
+ table = new Table( composite, SWT.BORDER );
+ table.setHeaderVisible( false );
+ table.setLayoutData( tableGridData );
+ table.setLinesVisible( false );
+ tableViewer = new TableViewer( table );
+ tableViewer.setContentProvider( new ArrayContentProvider() );
+ tableViewer.setLabelProvider( new LabelProvider() );
+ tableViewer.setInput( values );
+
+ tableViewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ valueSelected();
+ }
+ } );
+
+ tableViewer.addDoubleClickListener( new IDoubleClickListener()
+ {
+ public void doubleClick( DoubleClickEvent event )
+ {
+ editValue();
+ }
+ } );
+ }
+
+
+ /**
+ * This method initializes buttons
+ */
+ private void createButtonComposite()
+ {
+ GridData deleteButtonGridData = new GridData();
+ deleteButtonGridData.horizontalAlignment = GridData.FILL;
+ deleteButtonGridData.grabExcessHorizontalSpace = false;
+ deleteButtonGridData.verticalAlignment = GridData.BEGINNING;
+ deleteButtonGridData.widthHint = Activator.getButtonWidth( composite );
+
+ GridData editButtonGridData = new GridData();
+ editButtonGridData.horizontalAlignment = GridData.FILL;
+ editButtonGridData.grabExcessHorizontalSpace = false;
+ editButtonGridData.verticalAlignment = GridData.BEGINNING;
+ editButtonGridData.widthHint = Activator.getButtonWidth( composite );
+
+ GridData addButtonGridData = new GridData();
+ addButtonGridData.horizontalAlignment = GridData.FILL;
+ addButtonGridData.grabExcessHorizontalSpace = false;
+ addButtonGridData.verticalAlignment = GridData.BEGINNING;
+ addButtonGridData.widthHint = Activator.getButtonWidth( composite );
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.marginWidth = 0;
+ gridLayout.marginHeight = 0;
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.CENTER;
+ gridData.grabExcessHorizontalSpace = false;
+ gridData.grabExcessVerticalSpace = false;
+ gridData.verticalAlignment = GridData.FILL;
+
+ buttonComposite = new Composite( composite, SWT.NONE );
+ buttonComposite.setLayoutData( gridData );
+ buttonComposite.setLayout( gridLayout );
+
+ addButton = new Button( buttonComposite, SWT.NONE );
+ addButton.setText( Messages.getString( "MultiValuedDialog.button.add" ) ); //$NON-NLS-1$
+ addButton.setLayoutData( addButtonGridData );
+ addButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ addValue();
+ }
+ } );
+
+ editButton = new Button( buttonComposite, SWT.NONE );
+ editButton.setText( Messages.getString( "MultiValuedDialog.button.edit" ) ); //$NON-NLS-1$
+ editButton.setLayoutData( editButtonGridData );
+ editButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ editValue();
+ }
+ } );
+ editButton.setEnabled( false );
+
+ deleteButton = new Button( buttonComposite, SWT.NONE );
+ deleteButton.setText( Messages.getString( "MultiValuedDialog.button.delete" ) ); //$NON-NLS-1$
+ deleteButton.setLayoutData( deleteButtonGridData );
+ deleteButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ deleteValue();
+ }
+ } );
+ deleteButton.setEnabled( false );
+
+ }
+
+
+ /**
+ * Opens the editor and adds the new value to the list.
+ */
+ private void addValue()
+ {
+ try
+ {
+ IAttribute attribute = new Attribute( context.getEntry(), "" ); //$NON-NLS-1$
+ IValue value = new Value( attribute, "" ); //$NON-NLS-1$
+ Object oldRawValue = valueEditor.getRawValue( value ); //$NON-NLS-1$
+
+ CellEditor cellEditor = valueEditor.getCellEditor();
+ cellEditor.setValue( oldRawValue );
+ cellEditor.activate();
+ Object newRawValue = cellEditor.getValue();
+
+ if ( newRawValue != null )
+ {
+ String newValue = ( String ) valueEditor.getStringOrBinaryValue( newRawValue );
+
+ values.add( newValue );
+ tableViewer.refresh();
+ }
+ }
+ catch ( ModelModificationException e )
+ {
+ }
+ }
+
+
+ /**
+ * Opens the editor with the currently selected
+ * value and puts the modified value into the list.
+ */
+ private void editValue()
+ {
+ String oldValue = getSelectedValue();
+ if ( oldValue != null )
+ {
+ try
+ {
+ IAttribute attribute = new Attribute( context.getEntry(), "" ); //$NON-NLS-1$
+ IValue value = new Value( attribute, oldValue ); //$NON-NLS-1$
+ Object oldRawValue = valueEditor.getRawValue( value ); //$NON-NLS-1$
+
+ CellEditor cellEditor = valueEditor.getCellEditor();
+ cellEditor.setValue( oldRawValue );
+ cellEditor.activate();
+ Object newRawValue = cellEditor.getValue();
+
+ if ( newRawValue != null )
+ {
+ String newValue = ( String ) valueEditor.getStringOrBinaryValue( newRawValue );
+
+ values.remove( oldValue );
+ values.add( newValue );
+ tableViewer.refresh();
+ }
+ }
+ catch ( ModelModificationException e )
+ {
+ }
+ }
+ }
+
+
+ /**
+ * Deletes the currently selected value from list.
+ */
+ private void deleteValue()
+ {
+ String value = getSelectedValue();
+ if ( value != null )
+ {
+ values.remove( value );
+ tableViewer.refresh();
+ }
+ }
+
+
+ /**
+ * Called when value is selected in table viewer.
+ * Updates the enabled/disabled state of the buttons.
+ */
+ private void valueSelected()
+ {
+ String value = getSelectedValue();
+
+ if ( value == null )
+ {
+ editButton.setEnabled( false );
+ deleteButton.setEnabled( false );
+ }
+ else
+ {
+ editButton.setEnabled( true );
+ deleteButton.setEnabled( true );
+ }
+ }
+
+
+ /**
+ * @return the value that is selected in the table viewer, or null.
+ */
+ private String getSelectedValue()
+ {
+ String value = null;
+
+ IStructuredSelection selection = ( IStructuredSelection ) tableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ Object element = selection.getFirstElement();
+ if ( element instanceof String )
+ {
+ value = ( String ) element;
+ }
+ }
+
+ return value;
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/UserPermissionDialog.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/UserPermissionDialog.java
new file mode 100644
index 0000000..55d304a
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/UserPermissionDialog.java
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.dialogs;
+
+
+import java.util.Collection;
+
+import org.apache.directory.shared.ldap.aci.GrantAndDenial;
+import org.apache.directory.shared.ldap.aci.ProtectedItem;
+import org.apache.directory.shared.ldap.aci.UserPermission;
+import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.aciitemeditor.widgets.ACIItemGrantsAndDenialsComposite;
+import org.apache.directory.studio.aciitemeditor.widgets.ACIItemProtectedItemsComposite;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+
+
+/**
+ * A dialog to compose user permissions.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class UserPermissionDialog extends Dialog
+{
+
+ /** The context */
+ private ACIItemValueWithContext context;
+
+ /** The initial value, passed by the constructor */
+ private UserPermission initialUserPermission;
+
+ /** The resulting value returned by getUserPermission() */
+ private UserPermission returnUserPermission;
+
+ /** The precedence checkbox to enable/disable spinner */
+ private Button precedenceCheckbox = null;
+
+ /** The precedence spinner */
+ private Spinner precedenceSpinner = null;
+
+ /** The widget with protected items table */
+ private ACIItemProtectedItemsComposite protectedItemsComposite;
+
+ /** The widget with grants and denials table */
+ private ACIItemGrantsAndDenialsComposite grantsAndDenialsComposite;
+
+
+ /**
+ * Creates a new instance of UserPermissionDialog.
+ *
+ * @param parentShell the shell
+ * @param initialUserPermission the initial user permission
+ * @param context the context
+ */
+ public UserPermissionDialog( Shell parentShell, UserPermission initialUserPermission, ACIItemValueWithContext context )
+ {
+ super( parentShell );
+ super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+ this.initialUserPermission = initialUserPermission;
+ this.context = context;
+ this.returnUserPermission = null;
+ }
+
+
+ /**
+ * Sets the dialog image and text.
+ *
+ * {@inheritDoc}
+ */
+ protected void configureShell( Shell shell )
+ {
+ super.configureShell( shell );
+ shell.setText( Messages.getString("UserPermissionDialog.dialog.text") ); //$NON-NLS-1$
+ shell.setImage( Activator.getDefault().getImage( Messages.getString("UserPermissionDialog.dialog.icon") ) ); //$NON-NLS-1$
+ }
+
+
+ /**
+ * Reimplementation: Checks for valid syntax and sets the return value.
+ */
+ protected void okPressed()
+ {
+ try
+ {
+ int precedence = precedenceCheckbox.getSelection() ? precedenceSpinner.getSelection() : -1;
+ Collection<ProtectedItem> protectedItems = protectedItemsComposite.getProtectedItems();
+ Collection<GrantAndDenial> grantsAndDenials = grantsAndDenialsComposite.getGrantsAndDenials();
+ returnUserPermission = new UserPermission( precedence, grantsAndDenials, protectedItems );
+ super.okPressed();
+ }
+ catch ( Exception e )
+ {
+ MessageDialog.openError( getShell(), Messages.getString("UserPermissionDialog.error.invalidUserPermission"), e.getMessage() ); //$NON-NLS-1$
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = ( Composite ) super.createDialogArea( parent );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+ gd.heightHint = convertVerticalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH ) * 4 / 3;
+ composite.setLayoutData( gd );
+
+ // precedence
+ Composite spinnerComposite = new Composite( composite, SWT.NONE );
+ spinnerComposite.setLayout( new GridLayout( 2, false ) );
+ spinnerComposite.setLayoutData( new GridData() );
+ precedenceCheckbox = new Button( spinnerComposite, SWT.CHECK );
+ precedenceCheckbox.setText( Messages.getString("UserPermissionDialog.precedence.label") ); //$NON-NLS-1$
+ precedenceCheckbox.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ precedenceSpinner.setEnabled( precedenceCheckbox.getSelection() );
+ }
+ } );
+ precedenceSpinner = new Spinner( spinnerComposite, SWT.BORDER );
+ precedenceSpinner.setMinimum( 0 );
+ precedenceSpinner.setMaximum( 255 );
+ precedenceSpinner.setDigits( 0 );
+ precedenceSpinner.setIncrement( 1 );
+ precedenceSpinner.setPageIncrement( 10 );
+ precedenceSpinner.setSelection( 0 );
+ precedenceSpinner.setEnabled( false );
+ GridData precedenceGridData = new GridData();
+ precedenceGridData.grabExcessHorizontalSpace = true;
+ precedenceGridData.verticalAlignment = GridData.CENTER;
+ precedenceGridData.horizontalAlignment = GridData.BEGINNING;
+ precedenceGridData.widthHint = 3 * 12;
+ precedenceSpinner.setLayoutData( precedenceGridData );
+
+ // protected items
+ protectedItemsComposite = new ACIItemProtectedItemsComposite( composite, SWT.NONE );
+ protectedItemsComposite.setContext( context );
+
+ // grants and denials
+ grantsAndDenialsComposite = new ACIItemGrantsAndDenialsComposite( composite, SWT.NONE );
+
+ // set initial values
+ if ( initialUserPermission != null )
+ {
+ if ( initialUserPermission.getPrecedence() > -1 )
+ {
+ precedenceCheckbox.setSelection( true );
+ precedenceSpinner.setEnabled( true );
+ precedenceSpinner.setSelection( initialUserPermission.getPrecedence() );
+ }
+ protectedItemsComposite.setProtectedItems( initialUserPermission.getProtectedItems() );
+ grantsAndDenialsComposite.setGrantsAndDenials( initialUserPermission.getGrantsAndDenials() );
+ }
+
+ applyDialogFont( composite );
+ return composite;
+ }
+
+
+ /**
+ * Returns the user permission. Returns null if Cancel button was pressed.
+ *
+ * @return the composed user permission or null
+ */
+ public UserPermission getUserPermission()
+ {
+ return returnUserPermission;
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/package-info.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/package-info.java
new file mode 100644
index 0000000..7fc345a
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/dialogs/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+/**
+ * Contains the dialogs of the ACI item editor.
+ */
+package org.apache.directory.studio.aciitemeditor.dialogs;
\ No newline at end of file
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/Messages.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/Messages.java
new file mode 100644
index 0000000..36b4240
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/Messages.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.model;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.apache.directory.studio.aciitemeditor.model.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+
+ private Messages()
+ {
+ }
+
+
+ public static String getString( String key )
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString( key );
+ }
+ catch ( MissingResourceException e )
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java
new file mode 100644
index 0000000..074f541
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java
@@ -0,0 +1,415 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.model;
+
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+
+import org.apache.directory.shared.ldap.aci.ACIItemParser;
+import org.apache.directory.shared.ldap.aci.ItemFirstACIItem;
+import org.apache.directory.shared.ldap.aci.ProtectedItem;
+import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.osgi.util.NLS;
+
+
+/**
+ * The ProtectedItemWrapper is used as input for the table viewer.
+ * The protected item values are always stored as raw string value.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ProtectedItemWrapper
+{
+ /** This map contains all possible protected item identifiers */
+ public static final Map<Class, String> classToIdentifierMap;
+ static
+ {
+ Map<Class, String> map = new HashMap<Class, String>();
+ map.put( ProtectedItem.Entry.class, "entry" ); //$NON-NLS-1$
+ map.put( ProtectedItem.AllUserAttributeTypes.class, "allUserAttributeTypes" ); //$NON-NLS-1$
+ map.put( ProtectedItem.AttributeType.class, "attributeType" ); //$NON-NLS-1$
+ map.put( ProtectedItem.AllAttributeValues.class, "allAttributeValues" ); //$NON-NLS-1$
+ map.put( ProtectedItem.AllUserAttributeTypesAndValues.class, "allUserAttributeTypesAndValues" ); //$NON-NLS-1$
+ map.put( ProtectedItem.AttributeValue.class, "attributeValue" ); //$NON-NLS-1$
+ map.put( ProtectedItem.SelfValue.class, "selfValue" ); //$NON-NLS-1$
+ map.put( ProtectedItem.RangeOfValues.class, "rangeOfValues" ); //$NON-NLS-1$
+ map.put( ProtectedItem.MaxValueCount.class, "maxValueCount" ); //$NON-NLS-1$
+ map.put( ProtectedItem.MaxImmSub.class, "maxImmSub" ); //$NON-NLS-1$
+ map.put( ProtectedItem.RestrictedBy.class, "restrictedBy" ); //$NON-NLS-1$
+ map.put( ProtectedItem.Classes.class, "classes" ); //$NON-NLS-1$
+ classToIdentifierMap = Collections.unmodifiableMap( map );
+ }
+
+ /** This map contains all protected item display values */
+ public static final Map<Class, String> classToDisplayMap;
+ static
+ {
+ Map<Class, String> map = new HashMap<Class, String>();
+ map.put( ProtectedItem.Entry.class, Messages.getString( "ProtectedItemWrapper.protectedItem.entry.label" ) ); //$NON-NLS-1$
+ map.put( ProtectedItem.AllUserAttributeTypes.class, Messages
+ .getString( "ProtectedItemWrapper.protectedItem.allUserAttributeTypes.label" ) ); //$NON-NLS-1$
+ map.put( ProtectedItem.AttributeType.class, Messages
+ .getString( "ProtectedItemWrapper.protectedItem.attributeType.label" ) ); //$NON-NLS-1$
+ map.put( ProtectedItem.AllAttributeValues.class, Messages
+ .getString( "ProtectedItemWrapper.protectedItem.allAttributeValues.label" ) ); //$NON-NLS-1$
+ map.put( ProtectedItem.AllUserAttributeTypesAndValues.class, Messages
+ .getString( "ProtectedItemWrapper.protectedItem.allUserAttributeTypesAndValues.label" ) ); //$NON-NLS-1$
+ map.put( ProtectedItem.AttributeValue.class, Messages
+ .getString( "ProtectedItemWrapper.protectedItem.attributeValue.label" ) ); //$NON-NLS-1$
+ map.put( ProtectedItem.SelfValue.class, Messages
+ .getString( "ProtectedItemWrapper.protectedItem.selfValue.label" ) ); //$NON-NLS-1$
+ map.put( ProtectedItem.RangeOfValues.class, Messages
+ .getString( "ProtectedItemWrapper.protectedItem.rangeOfValues.label" ) ); //$NON-NLS-1$
+ map.put( ProtectedItem.MaxValueCount.class, Messages
+ .getString( "ProtectedItemWrapper.protectedItem.maxValueCount.label" ) ); //$NON-NLS-1$
+ map.put( ProtectedItem.MaxImmSub.class, Messages
+ .getString( "ProtectedItemWrapper.protectedItem.maxImmSub.label" ) ); //$NON-NLS-1$
+ map.put( ProtectedItem.RestrictedBy.class, Messages
+ .getString( "ProtectedItemWrapper.protectedItem.restrictedBy.label" ) ); //$NON-NLS-1$
+ map.put( ProtectedItem.Classes.class, Messages.getString( "ProtectedItemWrapper.protectedItem.classes.label" ) ); //$NON-NLS-1$
+ classToDisplayMap = Collections.unmodifiableMap( map );
+ }
+
+ /** A dummy ACI to check syntax of the protectedItemValue */
+ private static final String DUMMY = "{ identificationTag \"id1\", precedence 1, authenticationLevel simple, " //$NON-NLS-1$
+ + "itemOrUserFirst itemFirst: { protectedItems { #identifier# #values# }, " //$NON-NLS-1$
+ + "itemPermissions { { userClasses { allUsers }, grantsAndDenials { grantRead } } } } }"; //$NON-NLS-1$
+
+ /** The class of the protected item, never null. */
+ private final Class clazz;
+
+ /** The protected item values, may be empty. */
+ private List<String> values;
+
+ /** The value prefix, prepended to the value. */
+ private String valuePrefix;
+
+ /** The value suffix, appended to the value. */
+ private String valueSuffix;
+
+ /** The value editor, null means no value. */
+ private AbstractDialogStringValueEditor valueEditor;
+
+ /** The multivalued. */
+ private boolean isMultivalued;
+
+
+ /**
+ * Creates a new instance of ProtectedItemWrapper.
+ *
+ * @param clazz the java class of the UserClass
+ * @param isMultivalued the is multivalued
+ * @param valuePrefix the identifier
+ * @param valueSuffix the dislpay name
+ * @param valueEditor the value editor
+ */
+ public ProtectedItemWrapper( Class clazz, boolean isMultivalued, String valuePrefix, String valueSuffix,
+ AbstractDialogStringValueEditor valueEditor )
+ {
+ this.clazz = clazz;
+ this.isMultivalued = isMultivalued;
+ this.valuePrefix = valuePrefix;
+ this.valueSuffix = valueSuffix;
+ this.valueEditor = valueEditor;
+
+ this.values = new ArrayList<String>();
+ }
+
+
+ /**
+ * Creates a new protected item object. Therefore it uses the
+ * dummy ACI, injects the protected item and its value, parses
+ * the ACI and extracts the protected item from the parsed bean.
+ *
+ * @return the parsed protected item
+ *
+ * @throws ParseException if parsing fails
+ */
+ public ProtectedItem getProtectedItem() throws ParseException
+ {
+ String flatValue = getFlatValue();
+ String spec = DUMMY;
+ spec = spec.replaceAll( "#identifier#", getIdentifier() ); //$NON-NLS-1$
+ spec = spec.replaceAll( "#values#", flatValue ); //$NON-NLS-1$
+ ACIItemParser parser = new ACIItemParser( null );
+ ItemFirstACIItem aci = null;
+ try
+ {
+ aci = ( ItemFirstACIItem ) parser.parse( spec );
+ }
+ catch ( ParseException e )
+ {
+
+ String msg = NLS
+ .bind(
+ Messages.getString( "ProtectedItemWrapper.error.message" ), new String[] { getIdentifier(), flatValue } ); //$NON-NLS-1$
+ throw new ParseException( msg, 0 );
+ }
+ ProtectedItem item = ( ProtectedItem ) aci.getProtectedItems().iterator().next();
+ return item;
+ }
+
+
+ /**
+ * Sets the protected item.
+ *
+ * @param item the protected item
+ */
+ public void setProtectedItem( ProtectedItem item )
+ {
+ assert item.getClass() == getClazz();
+
+ // first clear values
+ values.clear();
+
+ // switch on userClass type
+ // no value in ProtectedItem.Entry, ProtectedItem.AllUserAttributeTypes and ProtectedItem.AllUserAttributeTypesAndValues
+ if ( item.getClass() == ProtectedItem.AttributeType.class )
+ {
+ ProtectedItem.AttributeType at = ( ProtectedItem.AttributeType ) item;
+ for ( Iterator it = at.iterator(); it.hasNext(); )
+ {
+ values.add( it.next().toString() );
+ }
+ }
+ else if ( item.getClass() == ProtectedItem.AllAttributeValues.class )
+ {
+ ProtectedItem.AllAttributeValues aav = ( ProtectedItem.AllAttributeValues ) item;
+ for ( Iterator it = aav.iterator(); it.hasNext(); )
+ {
+ values.add( it.next().toString() );
+ }
+ }
+ else if ( item.getClass() == ProtectedItem.AttributeValue.class )
+ {
+ ProtectedItem.AttributeValue av = ( ProtectedItem.AttributeValue ) item;
+ for ( Iterator it = av.iterator(); it.hasNext(); )
+ {
+ Attribute attribute = ( Attribute ) it.next();
+ try
+ {
+ values.add( attribute.getID() + "=" + attribute.get() ); //$NON-NLS-1$
+ }
+ catch ( NamingException e )
+ {
+ }
+ }
+ }
+ else if ( item.getClass() == ProtectedItem.SelfValue.class )
+ {
+ ProtectedItem.SelfValue sv = ( ProtectedItem.SelfValue ) item;
+ for ( Iterator it = sv.iterator(); it.hasNext(); )
+ {
+ values.add( it.next().toString() );
+ }
+ }
+ else if ( item.getClass() == ProtectedItem.RangeOfValues.class )
+ {
+ ProtectedItem.RangeOfValues rov = ( ProtectedItem.RangeOfValues ) item;
+ StringBuffer buffer = new StringBuffer();
+ rov.getFilter().printToBuffer( buffer );
+ values.add( buffer.toString() );
+ }
+ else if ( item.getClass() == ProtectedItem.MaxValueCount.class )
+ {
+ ProtectedItem.MaxValueCount mvc = ( ProtectedItem.MaxValueCount ) item;
+ for ( Iterator it = mvc.iterator(); it.hasNext(); )
+ {
+ ProtectedItem.MaxValueCountItem mvci = ( ProtectedItem.MaxValueCountItem ) it.next();
+ StringBuffer buffer = new StringBuffer();
+ mvci.printToBuffer( buffer );
+ values.add( buffer.toString() );
+ }
+ }
+ else if ( item.getClass() == ProtectedItem.MaxImmSub.class )
+ {
+ ProtectedItem.MaxImmSub mis = ( ProtectedItem.MaxImmSub ) item;
+ values.add( Integer.toString( mis.getValue() ) );
+ }
+ else if ( item.getClass() == ProtectedItem.RestrictedBy.class )
+ {
+ ProtectedItem.RestrictedBy rb = ( ProtectedItem.RestrictedBy ) item;
+ for ( Iterator it = rb.iterator(); it.hasNext(); )
+ {
+ ProtectedItem.RestrictedByItem rbi = ( ProtectedItem.RestrictedByItem ) it.next();
+ StringBuffer buffer = new StringBuffer();
+ rbi.printToBuffer( buffer );
+ values.add( buffer.toString() );
+ }
+ }
+ else if ( item.getClass() == ProtectedItem.Classes.class )
+ {
+ ProtectedItem.Classes classes = ( ProtectedItem.Classes ) item;
+ StringBuffer buffer = new StringBuffer();
+ classes.getClasses().printRefinementToBuffer( buffer );
+ values.add( buffer.toString() );
+ }
+
+ }
+
+
+ /**
+ * Returns a user-friedly string, displayed in the table.
+ *
+ * @return the string
+ */
+ public String toString()
+ {
+ String flatValue = getFlatValue();
+ if ( flatValue.length() > 0 )
+ {
+ flatValue = flatValue.replace( '\r', ' ' );
+ flatValue = flatValue.replace( '\n', ' ' );
+ flatValue = ": " + flatValue; //$NON-NLS-1$
+ if ( flatValue.length() > 40 )
+ {
+ String temp = flatValue;
+ flatValue = temp.substring( 0, 20 );
+ flatValue = flatValue + "..."; //$NON-NLS-1$
+ flatValue = flatValue + temp.substring( temp.length() - 20, temp.length() );
+ }
+ }
+
+ return getDisplayName() + " " + flatValue; //$NON-NLS-1$
+ }
+
+
+ /**
+ * Returns the flat value.
+ *
+ * @return the flat value
+ */
+ private String getFlatValue()
+ {
+ if ( valueEditor == null || values.isEmpty() )
+ {
+ return ""; //$NON-NLS-1$
+ }
+
+ StringBuffer sb = new StringBuffer();
+ if ( isMultivalued() )
+ {
+ sb.append( "{ " ); //$NON-NLS-1$
+ }
+ for ( Iterator<String> it = values.iterator(); it.hasNext(); )
+ {
+ sb.append( valuePrefix );
+ String value = it.next();
+ sb.append( value );
+ sb.append( valueSuffix );
+ if ( it.hasNext() )
+ {
+ sb.append( ", " ); //$NON-NLS-1$
+ }
+ }
+ if ( isMultivalued() )
+ {
+ sb.append( " }" ); //$NON-NLS-1$
+ }
+ return sb.toString();
+ }
+
+
+ /**
+ * Returns the list of values, may be modified.
+ *
+ * @return the modifyable list of values.
+ */
+ public List<String> getValues()
+ {
+ return values;
+ }
+
+
+ /**
+ * Gets the display name.
+ *
+ * @return the display name
+ */
+ public String getDisplayName()
+ {
+ return classToDisplayMap.get( clazz );
+ }
+
+
+ /**
+ * Gets the identifier.
+ *
+ * @return the identifier
+ */
+ public String getIdentifier()
+ {
+ return classToIdentifierMap.get( clazz );
+ }
+
+
+ /**
+ * Returns the class of the user class.
+ *
+ * @return the class of the user class.
+ */
+ public Class getClazz()
+ {
+ return clazz;
+ }
+
+
+ /**
+ * Checks if is editable.
+ *
+ * @return true, if is editable
+ */
+ public boolean isEditable()
+ {
+ return valueEditor != null;
+ }
+
+
+ /**
+ * Gets the value editor.
+ *
+ * @return the value editor, may be null.
+ */
+ public AbstractDialogStringValueEditor getValueEditor()
+ {
+ return valueEditor;
+ }
+
+
+ /**
+ * Checks if is multivalued.
+ *
+ * @return true, if is multivalued
+ */
+ public boolean isMultivalued()
+ {
+ return isMultivalued;
+ }
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapperFactory.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapperFactory.java
new file mode 100644
index 0000000..19b70fd
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapperFactory.java
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.model;
+
+
+import org.apache.directory.shared.ldap.aci.ProtectedItem;
+import org.apache.directory.studio.aciitemeditor.valueeditors.AttributeTypeAndValueValueEditor;
+import org.apache.directory.studio.aciitemeditor.valueeditors.AttributeTypeValueEditor;
+import org.apache.directory.studio.aciitemeditor.valueeditors.FilterValueEditor;
+import org.apache.directory.studio.aciitemeditor.valueeditors.MaxValueCountValueEditor;
+import org.apache.directory.studio.aciitemeditor.valueeditors.RestrictedByValueEditor;
+import org.apache.directory.studio.valueeditors.TextValueEditor;
+import org.apache.directory.studio.valueeditors.integer.IntegerValueEditor;
+
+
+/**
+ * The ProtectedItemWrapperFactory creates the ProtectedItemWrappers, ready to
+ * be used in the protected item table.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ProtectedItemWrapperFactory
+{
+
+ /**
+ * Creates the protected item wrappers.
+ *
+ * @return the protected item wrapper[]
+ */
+ public static final ProtectedItemWrapper[] createProtectedItemWrappers()
+ {
+ ProtectedItemWrapper[] protectedItemWrappers = new ProtectedItemWrapper[]
+ {
+ // entry
+ new ProtectedItemWrapper( ProtectedItem.Entry.class, false, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ null ),
+
+ // allUserAttributeTypes
+ new ProtectedItemWrapper( ProtectedItem.AllUserAttributeTypes.class, false, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ null ),
+
+ // attributeType { 1.2.3, cn }
+ new ProtectedItemWrapper( ProtectedItem.AttributeType.class, true, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ new AttributeTypeValueEditor() ),
+
+ // allAttributeValues { 1.2.3, cn }
+ new ProtectedItemWrapper( ProtectedItem.AllAttributeValues.class, true, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ new AttributeTypeValueEditor() ),
+
+ // attributeType
+ new ProtectedItemWrapper( ProtectedItem.AllUserAttributeTypesAndValues.class, false, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ null ),
+
+ // attributeValue { ou=people, cn=Ersin }
+ new ProtectedItemWrapper( ProtectedItem.AttributeValue.class, true, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ new AttributeTypeAndValueValueEditor() ),
+
+ // selfValue { 1.2.3, cn }
+ new ProtectedItemWrapper( ProtectedItem.SelfValue.class, true, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ new AttributeTypeValueEditor() ),
+
+ // rangeOfValues (cn=E*)
+ new ProtectedItemWrapper( ProtectedItem.RangeOfValues.class, false, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ new FilterValueEditor() ),
+
+ // maxValueCount { { type 10.11.12, maxCount 10 }, { maxCount 20, type 11.12.13 } }
+ new ProtectedItemWrapper( ProtectedItem.MaxValueCount.class, true, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ new MaxValueCountValueEditor() ),
+
+ // maxImmSub 3
+ new ProtectedItemWrapper( ProtectedItem.MaxImmSub.class, false, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ new IntegerValueEditor() ),
+
+ // restrictedBy { { type 10.11.12, valuesIn ou }, { valuesIn cn, type 11.12.13 } }
+ new ProtectedItemWrapper( ProtectedItem.RestrictedBy.class, true, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ new RestrictedByValueEditor() ),
+
+ // classes and : { item: xyz , or:{item:X,item:Y} }
+ new ProtectedItemWrapper( ProtectedItem.Classes.class, false, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ new TextValueEditor() // TODO: RefinementValueEditor
+ ),
+
+ };
+
+ return protectedItemWrappers;
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java
new file mode 100644
index 0000000..c06c27e
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java
@@ -0,0 +1,320 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.model;
+
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.naming.Name;
+
+import org.apache.directory.shared.ldap.aci.ACIItemParser;
+import org.apache.directory.shared.ldap.aci.UserClass;
+import org.apache.directory.shared.ldap.aci.UserFirstACIItem;
+import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
+import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.osgi.util.NLS;
+
+
+/**
+ * The UserClassWrapper is used as input for the table viewer.
+ * The user class values are always stored as raw string values.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class UserClassWrapper
+{
+
+ /** This map contains all possible user class identifiers */
+ public static final Map<Class, String> classToIdentifierMap;
+ static
+ {
+ Map<Class, String> map = new HashMap<Class, String>();
+ map.put( UserClass.AllUsers.class, "allUsers" ); //$NON-NLS-1$
+ map.put( UserClass.ThisEntry.class, "thisEntry" ); //$NON-NLS-1$
+ map.put( UserClass.Name.class, "name" ); //$NON-NLS-1$
+ map.put( UserClass.UserGroup.class, "userGroup" ); //$NON-NLS-1$
+ map.put( UserClass.Subtree.class, "subtree" ); //$NON-NLS-1$
+ classToIdentifierMap = Collections.unmodifiableMap( map );
+ }
+
+ /** This map contains all user class display values */
+ public static final Map<Class, String> classToDisplayMap;
+ static
+ {
+ Map<Class, String> map = new HashMap<Class, String>();
+ map.put( UserClass.AllUsers.class, Messages.getString( "UserClassWrapper.userClass.allUsers.label" ) ); //$NON-NLS-1$
+ map.put( UserClass.ThisEntry.class, Messages.getString( "UserClassWrapper.userClass.thisEntry.label" ) ); //$NON-NLS-1$
+ map.put( UserClass.Name.class, Messages.getString( "UserClassWrapper.userClass.name.label" ) ); //$NON-NLS-1$
+ map.put( UserClass.UserGroup.class, Messages.getString( "UserClassWrapper.userClass.userGroup.label" ) ); //$NON-NLS-1$
+ map.put( UserClass.Subtree.class, Messages.getString( "UserClassWrapper.userClass.subtree.label" ) ); //$NON-NLS-1$
+ classToDisplayMap = Collections.unmodifiableMap( map );
+ }
+
+ /** A dummy ACI to check syntax of the userClassValue. */
+ private static final String DUMMY = "{ identificationTag \"id1\", precedence 1, authenticationLevel simple, " //$NON-NLS-1$
+ + "itemOrUserFirst userFirst: { userClasses { #identifier# #values# }, " //$NON-NLS-1$
+ + "userPermissions { { protectedItems { entry }, grantsAndDenials { grantRead } } } } }"; //$NON-NLS-1$
+
+ /** The class of the user class, never null. */
+ private final Class clazz;
+
+ /** The user class values, may be empty. */
+ private List<String> values;
+
+ /** The value prefix, prepended to the value. */
+ private String valuePrefix;
+
+ /** The value suffix, appended to the value. */
+ private String valueSuffix;
+
+ /** The value editor, null means no value. */
+ private AbstractDialogStringValueEditor valueEditor;
+
+
+ /**
+ * Creates a new instance of UserClassWrapper.
+ *
+ * @param clazz the java class of the UserClass
+ * @param valuePrefix the identifier
+ * @param valueSuffix the dislpay name
+ * @param valueEditor the value editor
+ */
+ public UserClassWrapper( Class clazz, String valuePrefix, String valueSuffix,
+ AbstractDialogStringValueEditor valueEditor )
+ {
+ this.clazz = clazz;
+ this.valuePrefix = valuePrefix;
+ this.valueSuffix = valueSuffix;
+ this.valueEditor = valueEditor;
+
+ this.values = new ArrayList<String>();
+ }
+
+
+ /**
+ * Creates a new user class object. Therefore it uses the
+ * dummy ACI, injects the user class and its value, parses
+ * the ACI and extracts the user class from the parsed bean.
+ *
+ * @return the parsed user class
+ *
+ * @throws ParseException if parsing fails
+ */
+ public UserClass getUserClass() throws ParseException
+ {
+ String flatValue = getFlatValue();
+ String spec = DUMMY;
+ spec = spec.replaceAll( "#identifier#", getIdentifier() ); //$NON-NLS-1$
+ spec = spec.replaceAll( "#values#", flatValue ); //$NON-NLS-1$
+ ACIItemParser parser = new ACIItemParser( null );
+ UserFirstACIItem aci = null;
+ try
+ {
+ aci = ( UserFirstACIItem ) parser.parse( spec );
+ }
+ catch ( ParseException e )
+ {
+ String msg = NLS.bind(
+ Messages.getString( "UserClassWrapper.error.message" ), new String[] { getIdentifier(), flatValue } ); //$NON-NLS-1$
+ throw new ParseException( msg, 0 );
+ }
+ UserClass userClass = ( UserClass ) aci.getUserClasses().iterator().next();
+ return userClass;
+ }
+
+
+ /**
+ * Sets the user class.
+ *
+ * @param userClass the user class
+ */
+ public void setUserClass( UserClass userClass )
+ {
+ assert userClass.getClass() == getClazz();
+
+ // first clear values
+ values.clear();
+
+ // switch on userClass type
+ // no value in UserClass.AllUsers and UserClass.ThisEntry
+ if ( userClass.getClass() == UserClass.Name.class )
+ {
+ UserClass.Name name = ( UserClass.Name ) userClass;
+ Set<Name> jndiNames = name.getNames();
+ for ( Name jndiName : jndiNames )
+ {
+ values.add( jndiName.toString() );
+ }
+ }
+ else if ( userClass.getClass() == UserClass.UserGroup.class )
+ {
+ UserClass.UserGroup userGrops = ( UserClass.UserGroup ) userClass;
+ Set<Name> jndiNames = userGrops.getNames();
+ for ( Name jndiName : jndiNames )
+ {
+ values.add( jndiName.toString() );
+ }
+ }
+ else if ( userClass.getClass() == UserClass.Subtree.class )
+ {
+ UserClass.Subtree subtree = ( UserClass.Subtree ) userClass;
+ Collection<SubtreeSpecification> subtreeSpecifications = subtree.getSubtreeSpecifications();
+ for ( SubtreeSpecification subtreeSpecification : subtreeSpecifications )
+ {
+ StringBuffer buffer = new StringBuffer();
+ subtreeSpecification.printToBuffer( buffer );
+ String s = buffer.toString();
+ values.add( s );
+ }
+ }
+ }
+
+
+ /**
+ * Returns a user-friedly string, displayed in the table.
+ *
+ * @return the string
+ */
+ public String toString()
+ {
+ String flatValue = getFlatValue();
+ if ( flatValue.length() > 0 )
+ {
+ flatValue = flatValue.replace( '\r', ' ' );
+ flatValue = flatValue.replace( '\n', ' ' );
+ flatValue = ": " + flatValue; //$NON-NLS-1$
+ if ( flatValue.length() > 40 )
+ {
+ String temp = flatValue;
+ flatValue = temp.substring( 0, 20 );
+ flatValue = flatValue + "..."; //$NON-NLS-1$
+ flatValue = flatValue + temp.substring( temp.length() - 20, temp.length() );
+ }
+ }
+
+ return getDisplayName() + " " + flatValue; //$NON-NLS-1$
+ }
+
+
+ /**
+ * Returns the flat value.
+ *
+ * @return the flat value
+ */
+ private String getFlatValue()
+ {
+ if ( valueEditor == null || values.isEmpty() )
+ {
+ return ""; //$NON-NLS-1$
+ }
+
+ StringBuffer sb = new StringBuffer();
+ sb.append( "{ " ); //$NON-NLS-1$
+ for ( Iterator<String> it = values.iterator(); it.hasNext(); )
+ {
+ sb.append( valuePrefix );
+ String value = it.next();
+ sb.append( value );
+ sb.append( valueSuffix );
+ if ( it.hasNext() )
+ {
+ sb.append( ", " ); //$NON-NLS-1$
+ }
+ }
+ sb.append( " }" ); //$NON-NLS-1$
+ return sb.toString();
+ }
+
+
+ /**
+ * Returns the list of values, may be modified.
+ *
+ * @return the modifyable list of values.
+ */
+ public List<String> getValues()
+ {
+ return values;
+ }
+
+
+ /**
+ * Gets the display name.
+ *
+ * @return the display name
+ */
+ public String getDisplayName()
+ {
+ return classToDisplayMap.get( clazz );
+ }
+
+
+ /**
+ * Gets the identifier.
+ *
+ * @return the identifier
+ */
+ public String getIdentifier()
+ {
+ return classToIdentifierMap.get( clazz );
+ }
+
+
+ /**
+ * Returns the class of the user class.
+ *
+ * @return the class of the user class.
+ */
+ public Class getClazz()
+ {
+ return clazz;
+ }
+
+
+ /**
+ * Checks if is editable.
+ *
+ * @return true, if is editable
+ */
+ public boolean isEditable()
+ {
+ return valueEditor != null;
+ }
+
+
+ /**
+ * Gets the value editor.
+ *
+ * @return the value editor, may be null.
+ */
+ public AbstractDialogStringValueEditor getValueEditor()
+ {
+ return valueEditor;
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapperFactory.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapperFactory.java
new file mode 100644
index 0000000..79ada3a
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapperFactory.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.model;
+
+
+import org.apache.directory.shared.ldap.aci.UserClass;
+import org.apache.directory.studio.aciitemeditor.valueeditors.SubtreeValueEditor;
+import org.apache.directory.studio.valueeditors.dn.DnValueEditor;
+
+
+/**
+ * The UserClassWrapperFactory creates the UserClassWrapper, ready to
+ * be used in the user classes table.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class UserClassWrapperFactory
+{
+
+ /**
+ * Creates the user class wrappers.
+ *
+ * @return the user class wrapper[]
+ */
+ public static final UserClassWrapper[] createUserClassWrappers()
+ {
+ UserClassWrapper[] userClassWrappers = new UserClassWrapper[]
+ {
+ // allUsers
+ new UserClassWrapper( UserClass.AllUsers.class, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ null ),
+
+ // thisEntry
+ new UserClassWrapper( UserClass.ThisEntry.class, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ null ),
+
+ // name
+ new UserClassWrapper( UserClass.Name.class, "\"", //$NON-NLS-1$
+ "\"", //$NON-NLS-1$
+ new DnValueEditor() ),
+
+ // userGroup
+ new UserClassWrapper( UserClass.UserGroup.class, "\"", //$NON-NLS-1$
+ "\"", //$NON-NLS-1$
+ new DnValueEditor() ),
+
+ // subtree
+ new UserClassWrapper( UserClass.Subtree.class, "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ new SubtreeValueEditor( false )
+ ) };
+
+ return userClassWrappers;
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/package-info.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/package-info.java
new file mode 100644
index 0000000..23b9114
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+/**
+ * Contains the model for the ACI item editor.
+ */
+package org.apache.directory.studio.aciitemeditor.model;
\ No newline at end of file
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/package-info.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/package-info.java
new file mode 100644
index 0000000..0a6f292
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+/**
+ * Contains the ACI item editor's
+ * {@link org.apache.directory.studio.valueeditors.IValueEditor}
+ * implementation and the plugin activator.
+ */
+package org.apache.directory.studio.aciitemeditor;
\ No newline at end of file
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACICodeScanner.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACICodeScanner.java
new file mode 100644
index 0000000..e000105
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACICodeScanner.java
@@ -0,0 +1,236 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.sourceeditor;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.IWhitespaceDetector;
+import org.eclipse.jface.text.rules.IWordDetector;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WhitespaceRule;
+import org.eclipse.jface.text.rules.WordRule;
+
+
+/**
+ * Scanner used to analyse ACI code. Allows syntax coloring.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACICodeScanner extends RuleBasedScanner
+{
+ /** 'identificationTag' keyword */
+ public static final String identificationTagPartition = "identificationTag"; //$NON-NLS-1$
+
+ /** 'precedence' keyword */
+ public static final String precedencePartition = "precedence"; //$NON-NLS-1$
+
+ /** 'authenticationLevel' keyword */
+ public static final String authenticationLevelPartition = "authenticationLevel"; //$NON-NLS-1$
+
+ /** Keywords for the itemOrUserFirst Section */
+ public static final String[] itemOrUserFirstSectionPartition = new String[]
+ { "itemOrUserFirst", "itemFirst", "userFirst" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ /** Keywords for 'userFirst' section */
+ public static final String[] userSection = new String[]
+ { "userClasses", "userPermissions" }; //$NON-NLS-1$ //$NON-NLS-2$
+
+ /** Keywords for AciItems values */
+ public static final String[] aciKeywords = new String[]
+ { "protectedItems", //$NON-NLS-1$
+ "itemPermissions", //$NON-NLS-1$
+ "entry", //$NON-NLS-1$
+ "allUserAttributeTypes", //$NON-NLS-1$
+ "attributeType", //$NON-NLS-1$
+ "allAttributeValues", //$NON-NLS-1$
+ "allUserAttributeTypesAndValues", //$NON-NLS-1$
+ "attributeValue", //$NON-NLS-1$
+ "selfValue", //$NON-NLS-1$
+ "rangeOfValues", //$NON-NLS-1$
+ "maxValueCount", //$NON-NLS-1$
+ "maxImmSub", //$NON-NLS-1$
+ "restrictedBy", //$NON-NLS-1$
+ "classes", //$NON-NLS-1$
+ "grantsAndDenials", //$NON-NLS-1$
+ "allUsers", //$NON-NLS-1$
+ "thisEntry", //$NON-NLS-1$
+ "name", //$NON-NLS-1$
+ "userGroup", //$NON-NLS-1$
+ "subtree", //$NON-NLS-1$
+ "type", //$NON-NLS-1$
+ "valuesIn", //$NON-NLS-1$
+ "none", //$NON-NLS-1$
+ "simple", //$NON-NLS-1$
+ "strong" }; //$NON-NLS-1$
+
+ /** Keywords for grant values */
+ public static final String[] aciGrantValues = new String[]
+ { "grantAdd", //$NON-NLS-1$
+ "grantDiscloseOnError", //$NON-NLS-1$
+ "grantRead", //$NON-NLS-1$
+ "grantRemove", //$NON-NLS-1$
+ "grantBrowse", //$NON-NLS-1$
+ "grantExport", //$NON-NLS-1$
+ "grantImport", //$NON-NLS-1$
+ "grantModify", //$NON-NLS-1$
+ "grantRename", //$NON-NLS-1$
+ "grantReturnDN", //$NON-NLS-1$
+ "grantCompare", //$NON-NLS-1$
+ "grantFilterMatch", //$NON-NLS-1$
+ "grantInvoke", }; //$NON-NLS-1$
+
+ /** Keywords for deny values */
+ public static final String[] aciDenyValues = new String[]
+ { "denyAdd", //$NON-NLS-1$
+ "denyDiscloseOnError", //$NON-NLS-1$
+ "denyRead", //$NON-NLS-1$
+ "denyRemove", //$NON-NLS-1$
+ "denyBrowse", //$NON-NLS-1$
+ "denyExport", //$NON-NLS-1$
+ "denyImport", //$NON-NLS-1$
+ "denyModify", //$NON-NLS-1$
+ "denyRename", //$NON-NLS-1$
+ "denyReturnDN", //$NON-NLS-1$
+ "denyCompare", //$NON-NLS-1$
+ "denyFilterMatch", //$NON-NLS-1$
+ "denyInvoke" }; //$NON-NLS-1$
+
+
+ /**
+ * Creates a new instance of AciCodeScanner.
+ *
+ * @param provider
+ * the provider
+ */
+ public ACICodeScanner( ACITextAttributeProvider provider )
+ {
+ List<IRule> rules = new ArrayList<IRule>();
+
+ IToken keyword = new Token( provider.getAttribute( ACITextAttributeProvider.KEYWORD_ATTRIBUTE ) );
+ IToken undefined = new Token( provider.getAttribute( ACITextAttributeProvider.DEFAULT_ATTRIBUTE ) );
+ IToken string = new Token( provider.getAttribute( ACITextAttributeProvider.STRING_ATTRIBUTE ) );
+ IToken grantValue = new Token( provider.getAttribute( ACITextAttributeProvider.GRANT_VALUE ) );
+ IToken denyValue = new Token( provider.getAttribute( ACITextAttributeProvider.DENY_VALUE ) );
+ IToken identification = new Token( provider.getAttribute( ACITextAttributeProvider.IDENTIFICATION_ATTRIBUTE ) );
+ IToken precedence = new Token( provider.getAttribute( ACITextAttributeProvider.PRECEDENCE_ATTRIBUTE ) );
+ IToken authenticationLevel = new Token( provider
+ .getAttribute( ACITextAttributeProvider.AUTHENTICATIONLEVEL_ATTRIBUTE ) );
+ IToken itemOrUserFirst = new Token( provider.getAttribute( ACITextAttributeProvider.ITEMORUSERFIRST_ATTRIBUTE ) );
+ IToken user = new Token( provider.getAttribute( ACITextAttributeProvider.USER_ATTRIBUTE ) );
+
+ // Rules for Strings
+ rules.add( new SingleLineRule( "\"", "\"", string, '\0', true ) ); //$NON-NLS-1$ //$NON-NLS-2$
+ rules.add( new SingleLineRule( "'", "'", string, '\0', true ) ); //$NON-NLS-1$ //$NON-NLS-2$
+ // Generic rule for whitespaces
+ rules.add( new WhitespaceRule( new IWhitespaceDetector()
+ {
+ /**
+ * Indicates if the given character is a whitespace
+ * @param c the character to analyse
+ * @return <code>true</code> if the character is to be considered as a whitespace, <code>false</code> if not.
+ * @see org.eclipse.jface.text.rules.IWhitespaceDetector#isWhitespace(char)
+ */
+ public boolean isWhitespace( char c )
+ {
+ return Character.isWhitespace( c );
+ }
+ } ) );
+
+ // If the word isn't in the List, returns undefined
+ WordRule wr = new WordRule( new AciWordDetector(), undefined );
+
+ // Adding Keywords
+ for ( int i = 0; i < aciKeywords.length; ++i )
+ {
+ wr.addWord( aciKeywords[i], keyword );
+ }
+
+ // Adding GrantValues
+ for ( int i = 0; i < aciGrantValues.length; ++i )
+ {
+ wr.addWord( aciGrantValues[i], grantValue );
+ }
+
+ // Adding DenyValues
+ for ( int i = 0; i < aciDenyValues.length; ++i )
+ {
+ wr.addWord( aciDenyValues[i], denyValue );
+ }
+
+ // Adding itemOrUserFirstSectionPartition
+ for ( int i = 0; i < itemOrUserFirstSectionPartition.length; ++i )
+ {
+ wr.addWord( itemOrUserFirstSectionPartition[i], itemOrUserFirst );
+ }
+
+ // Adding User
+ for ( int i = 0; i < userSection.length; ++i )
+ {
+ wr.addWord( userSection[i], user );
+ }
+
+ wr.addWord( identificationTagPartition, identification );
+
+ wr.addWord( precedencePartition, precedence );
+
+ wr.addWord( authenticationLevelPartition, authenticationLevel );
+
+ rules.add( wr );
+
+ // Conversion de la List en tableau pour la passer à la méthode setRules
+ IRule[] param = new IRule[rules.size()];
+ rules.toArray( param );
+ setRules( param );
+ }
+
+ /**
+ * This class implements a word detector for ACI Items
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ static class AciWordDetector implements IWordDetector
+ {
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isWordPart( char c )
+ {
+ return ( Character.isLetterOrDigit( c ) || c == '_' || c == '$' || c == '#' || c == '@' || c == '~'
+ || c == '.' || c == '?' );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isWordStart( char c )
+ {
+ return ( Character.isLetter( c ) || c == '.' || c == '_' || c == '?' || c == '$' );
+ }
+ }
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACIContentAssistProcessor.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACIContentAssistProcessor.java
new file mode 100644
index 0000000..bdb219d
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACIContentAssistProcessor.java
@@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.sourceeditor;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.directory.studio.aciitemeditor.ACIITemConstants;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+import org.eclipse.jface.text.templates.Template;
+import org.eclipse.jface.text.templates.TemplateCompletionProcessor;
+import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.swt.graphics.Image;
+
+
+/**
+ * This class implements the Content Assist Processor for ACI Item
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIContentAssistProcessor extends TemplateCompletionProcessor
+{
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public ICompletionProposal[] computeCompletionProposals( ITextViewer viewer, int offset )
+ {
+ List<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>();
+
+ // Add context dependend template proposals
+ ICompletionProposal[] templateProposals = super.computeCompletionProposals( viewer, offset );
+ if ( templateProposals != null )
+ {
+ proposalList.addAll( Arrays.asList( templateProposals ) );
+ }
+
+ return ( ICompletionProposal[] ) proposalList.toArray( new ICompletionProposal[0] );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public IContextInformation[] computeContextInformation( ITextViewer viewer, int offset )
+ {
+ return null;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getCompletionProposalAutoActivationCharacters()
+ */
+ public char[] getCompletionProposalAutoActivationCharacters()
+ {
+
+ char[] chars = new char[52];
+ for ( int i = 0; i < 26; i++ )
+ {
+ chars[i] = ( char ) ( 'a' + i );
+ }
+ for ( int i = 0; i < 26; i++ )
+ {
+ chars[i + 26] = ( char ) ( 'A' + i );
+ }
+
+ return chars;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getContextInformationAutoActivationCharacters()
+ */
+ public char[] getContextInformationAutoActivationCharacters()
+ {
+ return null;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getContextInformationValidator()
+ */
+ public IContextInformationValidator getContextInformationValidator()
+ {
+ return null;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getErrorMessage()
+ */
+ public String getErrorMessage()
+ {
+ return null;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getContextType(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
+ */
+ @Override
+ protected TemplateContextType getContextType( ITextViewer viewer, IRegion region )
+ {
+ return Activator.getDefault().getAciTemplateContextTypeRegistry().getContextType(
+ ACIITemConstants.ACI_ITEM_TEMPLATE_ID );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getImage(org.eclipse.jface.text.templates.Template)
+ */
+ @Override
+ protected Image getImage( Template template )
+ {
+ return null;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getTemplates(java.lang.String)
+ */
+ @Override
+ protected Template[] getTemplates( String contextTypeId )
+ {
+ return Activator.getDefault().getAciTemplateStore().getTemplates( contextTypeId );
+ }
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACIFormattingStrategy.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACIFormattingStrategy.java
new file mode 100644
index 0000000..43a8869
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACIFormattingStrategy.java
@@ -0,0 +1,308 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.sourceeditor;
+
+import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
+import org.eclipse.jface.text.formatter.IFormattingStrategy;
+import org.eclipse.jface.text.source.ISourceViewer;
+
+/**
+ * This class implements the formatting strategy for the ACI Item Editor.
+ * <ul>
+ * <li>New line after a comma
+ * <li>New line after a opened left curly
+ * </ul>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIFormattingStrategy implements IFormattingStrategy
+{
+
+ /** The Constant INDENT_STRING. */
+ public static final String INDENT_STRING = " "; //$NON-NLS-1$
+
+ /** The Constant NEWLINE. */
+ public static final String NEWLINE = BrowserCoreConstants.LINE_SEPARATOR;
+
+ /** The source viewer. */
+ private ISourceViewer sourceViewer;
+
+
+ /**
+ * Creates a new instance of ACIFormattingStrategy.
+ *
+ * @param sourceViewer the source viewer
+ */
+ public ACIFormattingStrategy( ISourceViewer sourceViewer )
+ {
+ this.sourceViewer = sourceViewer;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String format( String content, boolean isLineStart, String indentation, int[] positions )
+ {
+ String oldContent = sourceViewer.getDocument().get();
+ String newContent = internFormat ( oldContent );
+ sourceViewer.getDocument().set( newContent );
+
+ return null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void formatterStarts( String initialIndentation )
+ {
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void formatterStops()
+ {
+ }
+
+ private String internFormat( String content )
+ {
+ StringBuffer sb = new StringBuffer();
+
+ // flag to track if a new line was started
+ boolean newLineStarted = true;
+
+ // flag to track if we are within a quoted string
+ boolean inQuotedString = false;
+
+ // flag to track if the current expression is appended in one-line mode
+ boolean oneLineMode = false;
+
+ // the current indent
+ int indent = 0;
+
+ int contentLength = content.length();
+ for (int i=0; i<contentLength; i++)
+ {
+ char c = content.charAt( i );
+
+ // track quotes
+ if( c == '"')
+ {
+ inQuotedString = !inQuotedString;
+ }
+
+ if( c == '{' && !inQuotedString )
+ {
+ // check one-line mode
+ oneLineMode = checkInOneLine(i, content);
+
+ if(oneLineMode)
+ {
+ // no new line in one-line mode
+ sb.append( c );
+ newLineStarted = false;
+ }
+ else
+ {
+ // start a new line, but avoid blank lines if there are multiple opened curlies
+ if( !newLineStarted )
+ {
+ sb.append( NEWLINE );
+ for ( int x = 0; x < indent; x++ )
+ {
+ sb.append( INDENT_STRING );
+ }
+ }
+
+ // append the curly
+ sb.append( c );
+
+ // start a new line and increment indent
+ sb.append( NEWLINE );
+ newLineStarted = true;
+ indent++;
+ for ( int x = 0; x < indent; x++ )
+ {
+ sb.append( INDENT_STRING );
+ }
+ }
+ }
+ else if (c == '}' && !inQuotedString )
+ {
+ if(oneLineMode)
+ {
+ // no new line in one-line mode
+ sb.append( c );
+ newLineStarted = false;
+
+ // closed curly indicates end of one-line mode
+ oneLineMode = false;
+ }
+ else
+ {
+ // decrement indent
+ indent--;
+
+ // start a new line, but avoid blank lines if there are multiple closed curlies
+ if( newLineStarted )
+ {
+ // delete one indent
+ sb.delete( sb.length()-INDENT_STRING.length(), sb.length() );
+ }
+ else
+ {
+ sb.append( NEWLINE );
+ for ( int x = 0; x < indent; x++ )
+ {
+ sb.append( INDENT_STRING );
+ }
+ }
+
+ // append the curly
+ sb.append( c );
+
+ // start a new line
+ sb.append( NEWLINE );
+ newLineStarted = true;
+ for ( int x = 0; x < indent; x++ )
+ {
+ sb.append( INDENT_STRING );
+ }
+ }
+ }
+ else if (c == ',' && !inQuotedString )
+ {
+ // start new line on comma
+ if(oneLineMode)
+ {
+ sb.append( c );
+ newLineStarted = false;
+ }
+ else
+ {
+ sb.append( c );
+
+ sb.append( NEWLINE );
+ newLineStarted = true;
+
+ for ( int x = 0; x < indent; x++ )
+ {
+ sb.append( INDENT_STRING );
+ }
+ }
+ }
+ else if ( Character.isWhitespace( c ) )
+ {
+ char c1 = 'A';
+ if(i+1 < contentLength )
+ {
+ c1 = content.charAt( i+1 );
+ }
+
+ if( newLineStarted )
+ {
+ // ignore space after starting a new line
+ }
+ else if (c == '\n' || c == '\r' )
+ {
+ // ignore new lines
+ }
+ else if( Character.isWhitespace( c1 ) || c1 == '\n' || c1 == '\r' )
+ {
+ // compress whitespaces
+ }
+ else
+ {
+ sb.append( c );
+ }
+ }
+
+ else
+ {
+ // default case: append the char
+ sb.append( c );
+ newLineStarted = false;
+ }
+ }
+
+ return sb.toString();
+ }
+
+
+ /**
+ * Checks if an expression could be appended in one line. That is
+ * if the expression starting at index i doesn't contain nested
+ * expressions and only one comma.
+ *
+ * @param i the starting index of the expression
+ * @param content the content
+ *
+ * @return true, if the expression could be appended in one line
+ */
+ private boolean checkInOneLine( int i, String content )
+ {
+ // flag to track if we are within a quoted string
+ boolean inQuote = false;
+
+ // counter for commas
+ int commaCounter = 0;
+
+ int contentLength = content.length();
+ for ( int k=i+1; k<contentLength; k++)
+ {
+ char c = content.charAt( k );
+
+ // track quotes
+ if( c == '"')
+ {
+ inQuote = !inQuote;
+ }
+
+ // open curly indicates nested expression
+ if( ( c == '{' ) && !inQuote )
+ {
+ return false;
+ }
+
+ // closing curly indicates end of expression
+ if ( c == '}' && !inQuote )
+ {
+ return true;
+ }
+
+ // allow only single comma in an expression in one line
+ if (c == ',' && !inQuote )
+ {
+ commaCounter++;
+ if(commaCounter > 1)
+ {
+ return false;
+ }
+ }
+ }
+
+ return false;
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACISourceViewerConfiguration.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACISourceViewerConfiguration.java
new file mode 100644
index 0000000..4cc9bdb
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACISourceViewerConfiguration.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.sourceeditor;
+
+
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.formatter.ContentFormatter;
+import org.eclipse.jface.text.formatter.IContentFormatter;
+import org.eclipse.jface.text.formatter.IFormattingStrategy;
+import org.eclipse.jface.text.presentation.IPresentationReconciler;
+import org.eclipse.jface.text.presentation.PresentationReconciler;
+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+
+
+/**
+ * This class enables the features of the editor (Syntax coloring, code completion, etc.)
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACISourceViewerConfiguration extends SourceViewerConfiguration
+{
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ public IPresentationReconciler getPresentationReconciler( ISourceViewer sourceViewer )
+ {
+ PresentationReconciler reconciler = new PresentationReconciler();
+ reconciler.setDocumentPartitioning( getConfiguredDocumentPartitioning( sourceViewer ) );
+
+ // Creating the damager/repairer for code
+ DefaultDamagerRepairer dr = new DefaultDamagerRepairer( Activator.getDefault().getAciCodeScanner() );
+ reconciler.setDamager( dr, IDocument.DEFAULT_CONTENT_TYPE );
+ reconciler.setRepairer( dr, IDocument.DEFAULT_CONTENT_TYPE );
+
+ return reconciler;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentAssistant(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ public IContentAssistant getContentAssistant( ISourceViewer sourceViewer )
+ {
+ // ContentAssistant assistant = new ContentAssistant();
+ ContentAssistant assistant = new DialogContentAssistant();
+ IContentAssistProcessor aciContentAssistProcessor = new ACIContentAssistProcessor();
+
+ assistant.setContentAssistProcessor( aciContentAssistProcessor, IDocument.DEFAULT_CONTENT_TYPE );
+ assistant.setDocumentPartitioning( "org.apache.directory.studio.aci" ); //$NON-NLS-1$
+ assistant.enableAutoActivation( true );
+ assistant.setAutoActivationDelay( 500 );
+ assistant.setProposalPopupOrientation( IContentAssistant.PROPOSAL_STACKED );
+ assistant.setContextInformationPopupOrientation( IContentAssistant.CONTEXT_INFO_ABOVE );
+
+ return assistant;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentFormatter(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ public IContentFormatter getContentFormatter( ISourceViewer sourceViewer )
+ {
+ ContentFormatter formatter = new ContentFormatter();
+ IFormattingStrategy formattingStrategy = new ACIFormattingStrategy( sourceViewer );
+ formatter.enablePartitionAwareFormatting( false );
+ formatter.setFormattingStrategy( formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE );
+ return formatter;
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java
new file mode 100644
index 0000000..63b9b97
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.sourceeditor;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ * This class provides the TextAttributes elements for each kind of attribute
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACITextAttributeProvider
+{
+ public static final String DEFAULT_ATTRIBUTE = "__pos_aci_default_attribute"; //$NON-NLS-1$
+ public static final String KEYWORD_ATTRIBUTE = "__pos_aci_keyword_attribute"; //$NON-NLS-1$
+ public static final String STRING_ATTRIBUTE = "__pos_aci_string_attribute"; //$NON-NLS-1$
+ public static final String GRANT_DENY_ATTRIBUTE = "__pos_aci_grant_deny_attribute"; //$NON-NLS-1$
+ public static final String IDENTIFICATION_ATTRIBUTE = "__pos_aci_identification_attribute"; //$NON-NLS-1$
+ public static final String PRECEDENCE_ATTRIBUTE = "__pos_aci_precedence_attribute"; //$NON-NLS-1$
+ public static final String AUTHENTICATIONLEVEL_ATTRIBUTE = "__pos_aci_authenticationlevel_attribute"; //$NON-NLS-1$
+ public static final String ITEMORUSERFIRST_ATTRIBUTE = "__pos_aci_itemoruserfirst_attribute"; //$NON-NLS-1$
+ public static final String USER_ATTRIBUTE = "__pos_aci_user_attribute"; //$NON-NLS-1$
+
+ public static final String GRANT_VALUE = "__pos_aci_grant_value"; //$NON-NLS-1$
+ public static final String DENY_VALUE = "__pos_aci_deny_value"; //$NON-NLS-1$
+
+ private Map<String, TextAttribute> attributes = new HashMap<String, TextAttribute>();
+
+
+ /**
+ * Creates a new instance of AciTextAttributeProvider.
+ */
+ public ACITextAttributeProvider()
+ {
+ attributes.put( DEFAULT_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(), new RGB( 0, 0, 0 ) ) ) );
+
+ attributes.put( KEYWORD_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(), new RGB( 127, 0, 85 ) ),
+ null, SWT.BOLD ) );
+
+ attributes.put( STRING_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(), new RGB( 0, 0, 255 ) ) ) );
+
+ attributes.put( GRANT_DENY_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(), new RGB( 125, 125,
+ 125 ) ) ) );
+
+ attributes.put( GRANT_VALUE, new TextAttribute( new Color( Display.getCurrent(), new RGB( 0, 150, 0 ) ) ) );
+ attributes.put( DENY_VALUE, new TextAttribute( new Color( Display.getCurrent(), new RGB( 150, 0, 0 ) ) ) );
+
+ attributes.put( IDENTIFICATION_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(), new RGB( 125, 0,
+ 0 ) ), null, SWT.BOLD ) );
+
+ attributes.put( PRECEDENCE_ATTRIBUTE, new TextAttribute(
+ new Color( Display.getCurrent(), new RGB( 0, 0, 125 ) ), null, SWT.BOLD ) );
+
+ attributes.put( AUTHENTICATIONLEVEL_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(), new RGB( 0,
+ 125, 0 ) ), null, SWT.BOLD ) );
+
+ attributes.put( ITEMORUSERFIRST_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(), new RGB( 125, 0,
+ 125 ) ), null, SWT.BOLD ) );
+
+ attributes.put( USER_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(), new RGB( 0, 122, 255 ) ),
+ null, SWT.BOLD ) );
+
+ }
+
+
+ /**
+ * Gets the correct TextAttribute for the given type
+ *
+ * @param type
+ * the type of element
+ * @return
+ * the correct TextAttribute for the given type
+ */
+ public TextAttribute getAttribute( String type )
+ {
+ TextAttribute attr = ( TextAttribute ) attributes.get( type );
+ if ( attr == null )
+ {
+ attr = ( TextAttribute ) attributes.get( DEFAULT_ATTRIBUTE );
+ }
+ return attr;
+ }
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/DialogContentAssistant.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/DialogContentAssistant.java
new file mode 100644
index 0000000..671c668
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/DialogContentAssistant.java
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.sourceeditor;
+
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.jface.contentassist.ComboContentAssistSubjectAdapter;
+import org.eclipse.jface.contentassist.SubjectControlContentAssistant;
+import org.eclipse.jface.contentassist.TextContentAssistSubjectAdapter;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.IHandlerActivation;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+
+
+/**
+ * This class implements the Content Assistant Dialog used in the ACI Item
+ * Source Editor for displaying proposals
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class DialogContentAssistant extends SubjectControlContentAssistant implements FocusListener
+{
+ private Control control;
+
+ private IHandlerActivation handlerActivation;
+
+ private boolean possibleCompletionsVisible;
+
+
+ /**
+ * Creates a new instance of DialogContentAssistant.
+ */
+ public DialogContentAssistant()
+ {
+ super();
+ this.possibleCompletionsVisible = false;
+ }
+
+
+ /**
+ * Installs content assist support on the given subject.
+ *
+ * @param text
+ * the one who requests content assist
+ */
+ public void install( Text text )
+ {
+ this.control = text;
+ this.control.addFocusListener( this );
+ super.install( new TextContentAssistSubjectAdapter( text ) );
+ }
+
+
+ /**
+ * Installs content assist support on the given subject.
+ *
+ * @param combo
+ * the one who requests content assist
+ */
+ public void install( Combo combo )
+ {
+ this.control = combo;
+ this.control.addFocusListener( this );
+ super.install( new ComboContentAssistSubjectAdapter( combo ) );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.ContentAssistant#install(org.eclipse.jface.text.ITextViewer)
+ */
+ public void install( ITextViewer viewer )
+ {
+ this.control = viewer.getTextWidget();
+ this.control.addFocusListener( this );
+
+ // stop traversal (ESC) if popup is shown
+ this.control.addTraverseListener( new TraverseListener()
+ {
+ public void keyTraversed( TraverseEvent e )
+ {
+ if ( possibleCompletionsVisible )
+ {
+ e.doit = false;
+ }
+ }
+ } );
+
+ super.install( viewer );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.ContentAssistant#uninstall()
+ */
+ public void uninstall()
+ {
+ if ( this.handlerActivation != null )
+ {
+ IHandlerService handlerService = ( IHandlerService ) PlatformUI.getWorkbench().getAdapter(
+ IHandlerService.class );
+ handlerService.deactivateHandler( this.handlerActivation );
+ this.handlerActivation = null;
+ }
+
+ if ( this.control != null )
+ {
+ this.control.removeFocusListener( this );
+ }
+
+ super.uninstall();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.ContentAssistant#restoreCompletionProposalPopupSize()
+ */
+ protected Point restoreCompletionProposalPopupSize()
+ {
+ possibleCompletionsVisible = true;
+ return super.restoreCompletionProposalPopupSize();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.ContentAssistant#showPossibleCompletions()
+ */
+ public String showPossibleCompletions()
+ {
+ possibleCompletionsVisible = true;
+ return super.showPossibleCompletions();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.ContentAssistant#possibleCompletionsClosed()
+ */
+ protected void possibleCompletionsClosed()
+ {
+ this.possibleCompletionsVisible = false;
+ super.possibleCompletionsClosed();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ public void focusGained( FocusEvent e )
+ {
+ IHandlerService handlerService = ( IHandlerService ) PlatformUI.getWorkbench().getAdapter(
+ IHandlerService.class );
+ if ( handlerService != null )
+ {
+ IHandler handler = new org.eclipse.core.commands.AbstractHandler()
+ {
+ public Object execute( ExecutionEvent event ) throws org.eclipse.core.commands.ExecutionException
+ {
+ showPossibleCompletions();
+ return null;
+ }
+ };
+ this.handlerActivation = handlerService.activateHandler(
+ ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, handler );
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
+ */
+ public void focusLost( FocusEvent e )
+ {
+ if ( this.handlerActivation != null )
+ {
+ IHandlerService handlerService = ( IHandlerService ) PlatformUI.getWorkbench().getAdapter(
+ IHandlerService.class );
+ handlerService.deactivateHandler( this.handlerActivation );
+ this.handlerActivation = null;
+ }
+ }
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/package-info.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/package-info.java
new file mode 100644
index 0000000..c74d091
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+/**
+ * Contains the source editor configuration.
+ */
+package org.apache.directory.studio.aciitemeditor.sourceeditor;
\ No newline at end of file
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeAndValueDialog.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeAndValueDialog.java
new file mode 100644
index 0000000..dff3afa
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeAndValueDialog.java
@@ -0,0 +1,204 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.valueeditors;
+
+
+import java.util.Arrays;
+
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.ldapbrowser.common.widgets.ListContentProposalProvider;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.fieldassist.ComboContentAdapter;
+import org.eclipse.jface.fieldassist.ContentProposalAdapter;
+import org.eclipse.jface.fieldassist.DecoratedField;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.fieldassist.IControlCreator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * This class provides a dialog to enter an attribute type and value.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AttributeTypeAndValueDialog extends Dialog
+{
+
+ /** The schema. */
+ private Schema schema;
+
+ /** The initial attribute type. */
+ private String initialAttributeType;
+
+ /** The initial value. */
+ private String initialValue;
+
+ /** The attribute type combo field. */
+ private DecoratedField attributeTypeComboField;
+
+ /** The attribute type combo. */
+ private Combo attributeTypeCombo;
+
+ /** The attribute type content proposal adapter */
+ private ContentProposalAdapter attributeTypeCPA;
+
+ /** The value text. */
+ private Text valueText;
+
+ /** The return attribute type. */
+ private String returnAttributeType;
+
+ /** The return value. */
+ private String returnValue;
+
+
+ /**
+ * Creates a new instance of AttributeTypeDialog.
+ *
+ * @param parentShell the parent shell
+ * @param schema the schema
+ * @param initialAttributeType the initial attribute type
+ * @param initialValue the initial value
+ */
+ public AttributeTypeAndValueDialog( Shell parentShell, Schema schema, String initialAttributeType,
+ String initialValue )
+ {
+ super( parentShell );
+ super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+ this.initialAttributeType = initialAttributeType;
+ this.initialValue = initialValue;
+ this.schema = schema;
+ this.returnValue = null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void configureShell( Shell shell )
+ {
+ super.configureShell( shell );
+ shell.setText( Messages.getString("AttributeTypeAndValueDialog.title") ); //$NON-NLS-1$
+ shell.setImage( Activator.getDefault().getImage( Messages.getString("AttributeTypeAndValueDialog.icon") ) ); //$NON-NLS-1$
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void createButtonsForButtonBar( Composite parent )
+ {
+ super.createButtonsForButtonBar( parent );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void okPressed()
+ {
+ returnAttributeType = attributeTypeCombo.getText();
+ returnValue = valueText.getText();
+ super.okPressed();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ // create composite
+ Composite composite = ( Composite ) super.createDialogArea( parent );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+ composite.setLayoutData( gd );
+ composite.setLayout( new GridLayout( 3, false ) );
+
+ // combo widget
+ String[] allAtNames = schema.getAttributeTypeDescriptionNames();
+ Arrays.sort( allAtNames );
+
+ final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
+ FieldDecorationRegistry.DEC_CONTENT_PROPOSAL );
+ attributeTypeComboField = new DecoratedField( composite, SWT.NONE, new IControlCreator()
+ {
+ public Control createControl( Composite parent, int style )
+ {
+ Combo combo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
+ combo.setVisibleItemCount( 20 );
+ return combo;
+ }
+ } );
+ attributeTypeComboField.addFieldDecoration( fieldDecoration, SWT.TOP | SWT.LEFT, true );
+ attributeTypeComboField.getLayoutControl().setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
+ attributeTypeCombo = ( Combo ) attributeTypeComboField.getControl();
+ attributeTypeCombo.setItems( allAtNames );
+ attributeTypeCombo.setText( initialAttributeType );
+
+ // content proposal adapter
+ attributeTypeCPA = new ContentProposalAdapter( attributeTypeCombo, new ComboContentAdapter(),
+ new ListContentProposalProvider( attributeTypeCombo.getItems() ), null, null );
+ attributeTypeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
+ attributeTypeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
+
+ BaseWidgetUtils.createLabel( composite, " = ", 1 ); //$NON-NLS-1$
+
+ valueText = BaseWidgetUtils.createText( composite, initialValue, 1 );
+
+ applyDialogFont( composite );
+ return composite;
+ }
+
+
+ /**
+ * Gets the attribute type.
+ *
+ * @return the attribute type, null if canceled
+ */
+ public String getAttributeType()
+ {
+ return returnAttributeType;
+ }
+
+
+ /**
+ * Gets the value.
+ *
+ * @return the value, null if canceled
+ */
+ public String getValue()
+ {
+ return returnValue;
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeAndValueValueEditor.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeAndValueValueEditor.java
new file mode 100644
index 0000000..9c80e12
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeAndValueValueEditor.java
@@ -0,0 +1,139 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.aciitemeditor.valueeditors;
+
+
+import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IValue;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * Implementation of IValueEditor for attribute type and value.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AttributeTypeAndValueValueEditor extends AbstractDialogStringValueEditor
+{
+
+ private static final String EMPTY = ""; //$NON-NLS-1$
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation opens the AttributeTypeDialog.
+ */
+ public boolean openDialog( Shell shell )
+ {
+ Object value = getValue();
+ if ( value != null && value instanceof AttributeTypeAndValueValueEditorRawValueWrapper )
+ {
+ AttributeTypeAndValueValueEditorRawValueWrapper wrapper = ( AttributeTypeAndValueValueEditorRawValueWrapper ) value;
+ AttributeTypeAndValueDialog dialog = new AttributeTypeAndValueDialog( shell, wrapper.schema,
+ wrapper.attributeType, wrapper.value );
+ if ( dialog.open() == TextDialog.OK && !EMPTY.equals( dialog.getAttributeType() )
+ && !EMPTY.equals( dialog.getValue() ) )
+ {
+ setValue( dialog.getAttributeType() + '=' + dialog.getValue() );
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * Returns an AttributeTypeAndValueValueEditorRawValueWrapper.
+ */
+ public Object getRawValue( IValue value )
+ {
+ return value != null ? getRawValue( value.getAttribute().getEntry().getBrowserConnection(), value.getStringValue() )
+ : null;
+ }
+
+
+ private Object getRawValue( IBrowserConnection connection, Object value )
+ {
+ Schema schema = null;
+ if ( connection != null )
+ {
+ schema = connection.getSchema();
+ }
+ if ( schema == null || value == null || !( value instanceof String ) )
+ {
+ return null;
+ }
+
+ String atavValue = ( String ) value;
+ String[] atav = atavValue.split( "=", 2 ); //$NON-NLS-1$
+ String at = atav.length > 0 ? atav[0] : EMPTY;
+ String v = atav.length > 1 ? atav[1] : EMPTY;
+ AttributeTypeAndValueValueEditorRawValueWrapper wrapper = new AttributeTypeAndValueValueEditorRawValueWrapper(
+ schema, at, v );
+ return wrapper;
+ }
+
+ /**
+ * The AttributeTypeAndValueValueEditorRawValueWrapper is used to pass contextual
+ * information to the opened AttributeTypeAndValueDialog.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class AttributeTypeAndValueValueEditorRawValueWrapper
+ {
+ /**
+ * The schema, used in AttributeTypeDialog to build the list
+ * with possible attribute types.
+ */
+ private Schema schema;
+
+ /** The attribute type, used as initial attribute type. */
+ private String attributeType;
+
+ /** The value, used as initial value. */
+ private String value;
+
+
+ /**
+ * Creates a new instance of AttributeTypeAndValueValueEditorRawValueWrapper.
+ *
+ * @param schema the schema
+ * @param attributeType the attribute type
+ * @param value the value
+ */
+ private AttributeTypeAndValueValueEditorRawValueWrapper( Schema schema, String attributeType, String value )
+ {
+ super();
+ this.schema = schema;
+ this.attributeType = attributeType;
+ this.value = value;
+ }
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeDialog.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeDialog.java
new file mode 100644
index 0000000..7a7ad77
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeDialog.java
@@ -0,0 +1,173 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.aciitemeditor.valueeditors;
+
+
+import java.util.Arrays;
+
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.ldapbrowser.common.widgets.ListContentProposalProvider;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.fieldassist.ComboContentAdapter;
+import org.eclipse.jface.fieldassist.ContentProposalAdapter;
+import org.eclipse.jface.fieldassist.DecoratedField;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.fieldassist.IControlCreator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * This class provides a dialog to enter or select an attribute type.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AttributeTypeDialog extends Dialog
+{
+
+ /** The schema. */
+ private Schema schema;
+
+ /** The initial value. */
+ private String initialValue;
+
+ /** The attribute type combo field. */
+ private DecoratedField attributeTypeComboField;
+
+ /** The attribute type combo. */
+ private Combo attributeTypeCombo;
+
+ /** The attribute type content proposal adapter */
+ private ContentProposalAdapter attributeTypeCPA;
+
+ /** The return value. */
+ private String returnValue;
+
+
+ /**
+ * Creates a new instance of AttributeTypeDialog.
+ *
+ * @param parentShell the parent shell
+ * @param schema the schema
+ * @param initialValue the initial value
+ */
+ public AttributeTypeDialog( Shell parentShell, Schema schema, String initialValue )
+ {
+ super( parentShell );
+ super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+ this.initialValue = initialValue;
+ this.schema = schema;
+ this.returnValue = null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void configureShell( Shell shell )
+ {
+ super.configureShell( shell );
+ shell.setText( Messages.getString("AttributeTypeDialog.title") ); //$NON-NLS-1$
+ shell.setImage( Activator.getDefault().getImage( Messages.getString("AttributeTypeDialog.icon") ) ); //$NON-NLS-1$
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void createButtonsForButtonBar( Composite parent )
+ {
+ super.createButtonsForButtonBar( parent );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void okPressed()
+ {
+ returnValue = attributeTypeCombo.getText();
+ super.okPressed();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ // create composite
+ Composite composite = ( Composite ) super.createDialogArea( parent );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+ composite.setLayoutData( gd );
+
+ // combo widget
+ String[] allAtNames = schema.getAttributeTypeDescriptionNames();
+ Arrays.sort( allAtNames );
+
+ final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
+ FieldDecorationRegistry.DEC_CONTENT_PROPOSAL );
+ attributeTypeComboField = new DecoratedField( composite, SWT.NONE, new IControlCreator()
+ {
+ public Control createControl( Composite parent, int style )
+ {
+ Combo combo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
+ combo.setVisibleItemCount( 20 );
+ return combo;
+ }
+ } );
+ attributeTypeComboField.addFieldDecoration( fieldDecoration, SWT.TOP | SWT.LEFT, true );
+ attributeTypeComboField.getLayoutControl().setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
+ attributeTypeCombo = ( Combo ) attributeTypeComboField.getControl();
+ attributeTypeCombo.setItems( allAtNames );
+ attributeTypeCombo.setText( initialValue );
+
+ // content proposal adapter
+ attributeTypeCPA = new ContentProposalAdapter( attributeTypeCombo, new ComboContentAdapter(),
+ new ListContentProposalProvider( attributeTypeCombo.getItems() ), null, null );
+ attributeTypeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
+ attributeTypeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
+
+ applyDialogFont( composite );
+ return composite;
+ }
+
+
+ /**
+ * Gets the attribute type.
+ *
+ * @return the attribute type, null if canceled
+ */
+ public String getAttributeType()
+ {
+ return returnValue;
+ }
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeValueEditor.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeValueEditor.java
new file mode 100644
index 0000000..e0334e8
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeValueEditor.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.aciitemeditor.valueeditors;
+
+
+import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IValue;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * Implementation of IValueEditor for attribute types.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AttributeTypeValueEditor extends AbstractDialogStringValueEditor
+{
+
+ private static final String EMPTY = ""; //$NON-NLS-1$
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation opens the AttributeTypeDialog.
+ */
+ public boolean openDialog( Shell shell )
+ {
+ Object value = getValue();
+ if ( value != null && value instanceof AttributeTypeValueEditorRawValueWrapper )
+ {
+ AttributeTypeValueEditorRawValueWrapper wrapper = ( AttributeTypeValueEditorRawValueWrapper ) value;
+ AttributeTypeDialog dialog = new AttributeTypeDialog( shell, wrapper.schema, wrapper.attributeType );
+ if ( dialog.open() == TextDialog.OK && !EMPTY.equals( dialog.getAttributeType() ) )
+ {
+ setValue( dialog.getAttributeType() );
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * Returns an AttributeTypeAndValueValueEditorRawValueWrapper.
+ */
+ public Object getRawValue( IValue value )
+ {
+ return value != null ? getRawValue( value.getAttribute().getEntry().getBrowserConnection(), value.getStringValue() )
+ : null;
+ }
+
+
+ private Object getRawValue( IBrowserConnection connection, Object value )
+ {
+ Schema schema = null;
+ if ( connection != null )
+ {
+ schema = connection.getSchema();
+ }
+ if ( schema == null || value == null || !( value instanceof String ) )
+ {
+ return null;
+ }
+
+ String atValue = ( String ) value;
+ AttributeTypeValueEditorRawValueWrapper wrapper = new AttributeTypeValueEditorRawValueWrapper( schema, atValue );
+ return wrapper;
+ }
+
+ /**
+ * The AttributeTypeValueEditorRawValueWrapper is used to pass contextual
+ * information to the opened AttributeTypeDialog.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class AttributeTypeValueEditorRawValueWrapper
+ {
+ /**
+ * The schema, used in AttributeTypeDialog to build the list
+ * with possible attribute types.
+ */
+ private Schema schema;
+
+ /** The attribute type, used as initial value in AttributeTypeDialog. */
+ private String attributeType;
+
+
+ /**
+ * Creates a new instance of AttributeTypeValueEditorRawValueWrapper.
+ *
+ * @param schema the schema
+ * @param attributeType the attribute type
+ */
+ private AttributeTypeValueEditorRawValueWrapper( Schema schema, String attributeType )
+ {
+ super();
+ this.schema = schema;
+ this.attributeType = attributeType;
+ }
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java
new file mode 100644
index 0000000..37b7940
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java
@@ -0,0 +1,232 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.valueeditors;
+
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
+import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
+import org.apache.directory.studio.ldapbrowser.common.widgets.search.EntryWidget;
+import org.apache.directory.studio.ldapbrowser.core.model.DN;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.NameException;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * This class provides a dialog to enter the Exclusion values.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+class ExclusionDialog extends Dialog
+{
+
+ /** The connection. */
+ private IBrowserConnection connection;
+
+ /** The base. */
+ private DN base;
+
+ /** The initial typ. */
+ private String initialType;
+
+ /** The inital DN */
+ private String initalDN;
+
+ /** The return type */
+ private String returnType;
+
+ /** The return DN */
+ private String returnDN;
+
+ private static final String EMPTY = ""; //$NON-NLS-1$
+ private static final String CHOP_BEFORE = "chopBefore"; //$NON-NLS-1$
+ private static final String CHOP_AFTER = "chopAfter"; //$NON-NLS-1$
+
+ // UI Fields
+ private Combo typeCombo;
+ private ComboViewer typeComboViewer;
+ private EntryWidget entryWidget;
+
+
+ /**
+ * Creates a new instance of ExclusionDialog.
+ *
+ * @param parentShell the parent shell
+ * @param connection the connection
+ * @param base the base DN
+ * @param exclusion the exclusion string
+ */
+ protected ExclusionDialog( Shell parentShell, IBrowserConnection connection, DN base, String exclusion )
+ {
+ super( parentShell );
+ this.connection = connection;
+ this.base = base;
+
+ try
+ {
+ // for example: chopAfter: "ou=A"
+ Pattern pattern = Pattern.compile( "\\s*(chopBefore|chopAfter):\\s*\"(.*)\"\\s*" ); //$NON-NLS-1$
+ Matcher matcher = pattern.matcher( exclusion );
+ initialType = matcher.matches() ? matcher.group( 1 ) : EMPTY;
+ initalDN = matcher.matches() ? matcher.group( 2 ) : EMPTY;
+ }
+ catch ( Exception e )
+ {
+ initialType = EMPTY;
+ initalDN = EMPTY;
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ protected void configureShell( Shell shell )
+ {
+ super.configureShell( shell );
+ shell.setText( Messages.getString( "ExclusionValueEditor.title" ) ); //$NON-NLS-1$
+ shell.setImage( Activator.getDefault().getImage( Messages.getString( "ExclusionValueEditor.icon" ) ) ); //$NON-NLS-1$
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ protected void okPressed()
+ {
+ returnType = typeCombo.getText();
+ returnDN = entryWidget.getDn().toString();
+
+ // save dn history
+ entryWidget.saveDialogSettings();
+
+ super.okPressed();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = ( Composite ) super.createDialogArea( parent );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+ composite.setLayoutData( gd );
+ composite.setLayout( new GridLayout( 3, false ) );
+
+ BaseWidgetUtils.createLabel( composite, Messages.getString( "ExclusionValueEditor.label.type" ), 1 ); //$NON-NLS-1$
+ typeCombo = new Combo( composite, SWT.READ_ONLY );
+ String[] types = new String[2];
+ types[0] = CHOP_BEFORE;
+ types[1] = CHOP_AFTER;
+ typeComboViewer = new ComboViewer( typeCombo );
+ typeComboViewer.setContentProvider( new ArrayContentProvider() );
+ typeComboViewer.setLabelProvider( new LabelProvider() );
+ typeComboViewer.setInput( types );
+ typeComboViewer.setSelection( new StructuredSelection( CHOP_BEFORE ), true );
+ typeComboViewer.setSelection( new StructuredSelection( initialType ), true );
+ GridData gridData = new GridData();
+ gridData.horizontalSpan = 2;
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.verticalAlignment = GridData.CENTER;
+ gridData.horizontalAlignment = GridData.BEGINNING;
+ typeCombo.setLayoutData( gridData );
+
+ BaseWidgetUtils.createLabel( composite, Messages.getString( "ExclusionValueEditor.label.rdn" ), 1 ); //$NON-NLS-1$
+ entryWidget = new EntryWidget( connection, null, base );
+ entryWidget.createWidget( composite );
+ try
+ {
+ DN dn = new DN( initalDN );
+ entryWidget.setInput( connection, dn, base );
+ }
+ catch ( NameException e )
+ {
+ }
+ entryWidget.addWidgetModifyListener( new WidgetModifyListener()
+ {
+ public void widgetModified( WidgetModifyEvent event )
+ {
+ validate();
+ }
+ } );
+
+ validate();
+
+ return composite;
+ }
+
+
+ /**
+ * Validates if the dn is valid.
+ */
+ private void validate()
+ {
+ boolean valid = entryWidget.getDn() != null && entryWidget.getDn().getRdns().length > 0;
+
+ if ( getButton( IDialogConstants.OK_ID ) != null )
+ {
+ getButton( IDialogConstants.OK_ID ).setEnabled( valid );
+ }
+ }
+
+
+ /**
+ * Get the type.
+ *
+ * @return
+ * the type, null if canceled
+ */
+ public String getType()
+ {
+ return returnType;
+ }
+
+
+ /**
+ * Gets the DN.
+ *
+ * @return
+ * the DN, null if canceled
+ */
+ public String getDN()
+ {
+ return returnDN;
+ }
+}
\ No newline at end of file
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/FilterValueEditor.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/FilterValueEditor.java
new file mode 100644
index 0000000..f58e4b8
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/FilterValueEditor.java
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.aciitemeditor.valueeditors;
+
+
+import org.apache.directory.studio.ldapbrowser.common.dialogs.FilterWidgetDialog;
+import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IValue;
+import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * Implementation of IValueEditor for LDAP filters.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class FilterValueEditor extends AbstractDialogStringValueEditor
+{
+
+ private static final String EMPTY = ""; //$NON-NLS-1$
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation opens the FilterWidgetDialog.
+ */
+ public boolean openDialog( Shell shell )
+ {
+ Object value = getValue();
+ if ( value != null && value instanceof FilterValueEditorRawValueWrapper )
+ {
+ FilterValueEditorRawValueWrapper wrapper = ( FilterValueEditorRawValueWrapper ) value;
+ FilterWidgetDialog dialog = new FilterWidgetDialog( shell, Messages
+ .getString( "FilterValueEditor.dialog.title" ), wrapper.filter, //$NON-NLS-1$
+ wrapper.connection );
+ if ( dialog.open() == TextDialog.OK && !EMPTY.equals( dialog.getFilter() ) )
+ {
+ setValue( dialog.getFilter() );
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * Returns an AttributeTypeAndValueValueEditorRawValueWrapper.
+ */
+ public Object getRawValue( IValue value )
+ {
+ return value != null ? getRawValue( value.getAttribute().getEntry().getBrowserConnection(), value.getStringValue() )
+ : null;
+ }
+
+
+ private Object getRawValue( IBrowserConnection connection, Object value )
+ {
+ if ( connection == null || value == null || !( value instanceof String ) )
+ {
+ return null;
+ }
+
+ String filterValue = ( String ) value;
+ FilterValueEditorRawValueWrapper wrapper = new FilterValueEditorRawValueWrapper( connection, filterValue );
+ return wrapper;
+ }
+
+ /**
+ * The FilterValueEditorRawValueWrapper is used to pass contextual
+ * information to the opened FilterDialog.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class FilterValueEditorRawValueWrapper
+ {
+ /**
+ * The connection, used in FilterDialog to build the list
+ * with possible attribute types.
+ */
+ private IBrowserConnection connection;
+
+ /** The filter, used as initial value in FilterDialog. */
+ private String filter;
+
+
+ /**
+ * Creates a new instance of FilterValueEditorRawValueWrapper.
+ *
+ * @param schema the schema
+ * @param attributeType the attribute type
+ */
+ private FilterValueEditorRawValueWrapper( IBrowserConnection connection, String filter )
+ {
+ this.connection = connection;
+ this.filter = filter;
+ }
+ }
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/MaxValueCountValueEditor.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/MaxValueCountValueEditor.java
new file mode 100644
index 0000000..bf0141f
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/MaxValueCountValueEditor.java
@@ -0,0 +1,343 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.aciitemeditor.valueeditors;
+
+
+import java.util.Arrays;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
+import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.ldapbrowser.common.widgets.ListContentProposalProvider;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IValue;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.fieldassist.ComboContentAdapter;
+import org.eclipse.jface.fieldassist.ContentProposalAdapter;
+import org.eclipse.jface.fieldassist.DecoratedField;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.fieldassist.IControlCreator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+
+
+/**
+ * ACI item editor specific value editor to edit the MaxValueCount protected item.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class MaxValueCountValueEditor extends AbstractDialogStringValueEditor
+{
+
+ private static final String L_CURLY_TYPE = "{ type "; //$NON-NLS-1$
+ private static final String SEP_MAXCOUNT = ", maxCount "; //$NON-NLS-1$
+ private static final String R_CURLY = " }"; //$NON-NLS-1$
+ private static final String EMPTY = ""; //$NON-NLS-1$
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation opens the MaxValueCountDialog.
+ */
+ public boolean openDialog( Shell shell )
+ {
+ Object value = getValue();
+ if ( value != null && value instanceof MaxValueCountValueEditorRawValueWrapper )
+ {
+ MaxValueCountValueEditorRawValueWrapper wrapper = ( MaxValueCountValueEditorRawValueWrapper ) value;
+ MaxValueCountDialog dialog = new MaxValueCountDialog( shell, wrapper.schema, wrapper.type, wrapper.maxCount );
+ if ( dialog.open() == TextDialog.OK && !EMPTY.equals( dialog.getType() ) && dialog.getMaxCount() > -1 )
+ {
+ setValue( L_CURLY_TYPE + dialog.getType() + SEP_MAXCOUNT + dialog.getMaxCount() + R_CURLY );
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * Returns an AttributeTypeAndValueValueEditorRawValueWrapper.
+ */
+ public Object getRawValue( IValue value )
+ {
+ return value != null ? getRawValue( value.getAttribute().getEntry().getBrowserConnection(), value.getStringValue() )
+ : null;
+ }
+
+
+ private Object getRawValue( IBrowserConnection connection, Object value )
+ {
+ Schema schema = null;
+ if ( connection != null )
+ {
+ schema = connection.getSchema();
+ }
+ if ( schema == null || value == null || !( value instanceof String ) )
+ {
+ return null;
+ }
+
+ String stringValue = ( String ) value;
+ String type = EMPTY;
+ int maxCount = 0;
+ try
+ {
+ // for example: { type userPassword, maxCount 10 }
+ Pattern pattern = Pattern.compile( "\\s*\\{\\s*type\\s*([^,]*),\\s*maxCount\\s*(\\d*)\\s*\\}\\s*" ); //$NON-NLS-1$
+ Matcher matcher = pattern.matcher( stringValue );
+ type = matcher.matches() ? matcher.group( 1 ) : EMPTY;
+ maxCount = matcher.matches() ? Integer.valueOf( matcher.group( 2 ) ) : 0;
+ }
+ catch ( Exception e )
+ {
+ }
+
+ MaxValueCountValueEditorRawValueWrapper wrapper = new MaxValueCountValueEditorRawValueWrapper( schema, type,
+ maxCount );
+ return wrapper;
+ }
+
+ /**
+ * The MaxValueCountValueEditorRawValueWrapper is used to pass contextual
+ * information to the opened MaxValueCountDialog.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class MaxValueCountValueEditorRawValueWrapper
+ {
+ /**
+ * The schema, used in MaxValueCountDialog to build the list
+ * with possible attribute types.
+ */
+ private Schema schema;
+
+ /** The attribute type, used as initial attribute type. */
+ private String type;
+
+ /** The max count, used as initial value. */
+ private int maxCount;
+
+
+ /**
+ * Creates a new instance of AttributeTypeAndValueValueEditorRawValueWrapper.
+ *
+ * @param schema the schema
+ * @param attributeType the attribute type
+ * @param value the value
+ */
+ private MaxValueCountValueEditorRawValueWrapper( Schema schema, String type, int maxCount )
+ {
+ this.schema = schema;
+ this.type = type;
+ this.maxCount = maxCount;
+ }
+ }
+
+ /**
+ * This class provides a dialog to enter the MaxValueCount values.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class MaxValueCountDialog extends Dialog
+ {
+
+ /** The schema. */
+ private Schema schema;
+
+ /** The initial attribute type. */
+ private String initialType;
+
+ /** The initial max count. */
+ private int initialMaxCount;
+
+ /** The attribute type combo field. */
+ private DecoratedField attributeTypeComboField;
+
+ /** The attribute type combo. */
+ private Combo attributeTypeCombo;
+
+ /** The attribute type content proposal adapter */
+ private ContentProposalAdapter attributeTypeCPA;
+
+ /** The max count spinner. */
+ private Spinner maxCountSpinner;
+
+ /** The return attribute type. */
+ private String returnType;
+
+ /** The return value. */
+ private int returnMaxCount;
+
+
+ /**
+ * Creates a new instance of AttributeTypeDialog.
+ *
+ * @param parentShell the parent shell
+ * @param schema the schema
+ * @param initialType the initial attribute type
+ * @param initialMaxCount the initial max count
+ */
+ public MaxValueCountDialog( Shell parentShell, Schema schema, String initialType, int initialMaxCount )
+ {
+ super( parentShell );
+ super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+ this.initialType = initialType;
+ this.initialMaxCount = initialMaxCount;
+ this.schema = schema;
+ this.returnType = null;
+ this.returnMaxCount = -1;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void configureShell( Shell shell )
+ {
+ super.configureShell( shell );
+ shell.setText( Messages.getString( "MaxValueCountValueEditor.title" ) ); //$NON-NLS-1$
+ shell.setImage( Activator.getDefault().getImage( Messages.getString( "MaxValueCountValueEditor.icon" ) ) ); //$NON-NLS-1$
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void createButtonsForButtonBar( Composite parent )
+ {
+ super.createButtonsForButtonBar( parent );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void okPressed()
+ {
+ returnType = attributeTypeCombo.getText();
+ returnMaxCount = maxCountSpinner.getSelection();
+ super.okPressed();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ // create composite
+ Composite composite = ( Composite ) super.createDialogArea( parent );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+ composite.setLayoutData( gd );
+ composite.setLayout( new GridLayout( 5, false ) );
+
+ BaseWidgetUtils.createLabel( composite, L_CURLY_TYPE, 1 );
+
+ // combo widget
+ String[] allAtNames = schema.getAttributeTypeDescriptionNames();
+ Arrays.sort( allAtNames );
+
+ final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
+ FieldDecorationRegistry.DEC_CONTENT_PROPOSAL );
+ attributeTypeComboField = new DecoratedField( composite, SWT.NONE, new IControlCreator()
+ {
+ public Control createControl( Composite parent, int style )
+ {
+ Combo combo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
+ combo.setVisibleItemCount( 20 );
+ return combo;
+ }
+ } );
+ attributeTypeComboField.addFieldDecoration( fieldDecoration, SWT.TOP | SWT.LEFT, true );
+ attributeTypeComboField.getLayoutControl()
+ .setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
+ attributeTypeCombo = ( Combo ) attributeTypeComboField.getControl();
+ attributeTypeCombo.setItems( allAtNames );
+ attributeTypeCombo.setText( initialType );
+
+ // content proposal adapter
+ attributeTypeCPA = new ContentProposalAdapter( attributeTypeCombo, new ComboContentAdapter(),
+ new ListContentProposalProvider( attributeTypeCombo.getItems() ), null, null );
+ attributeTypeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
+ attributeTypeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
+
+ BaseWidgetUtils.createLabel( composite, SEP_MAXCOUNT, 1 );
+
+ maxCountSpinner = new Spinner( composite, SWT.BORDER );
+ maxCountSpinner.setMinimum( 0 );
+ maxCountSpinner.setMaximum( Integer.MAX_VALUE );
+ maxCountSpinner.setDigits( 0 );
+ maxCountSpinner.setIncrement( 1 );
+ maxCountSpinner.setPageIncrement( 100 );
+ maxCountSpinner.setSelection( initialMaxCount );
+ maxCountSpinner.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
+
+ BaseWidgetUtils.createLabel( composite, R_CURLY, 1 );
+
+ applyDialogFont( composite );
+ return composite;
+ }
+
+
+ /**
+ * Gets the attribute type.
+ *
+ * @return the attribute type, null if canceled
+ */
+ public String getType()
+ {
+ return returnType;
+ }
+
+
+ /**
+ * Gets the max count.
+ *
+ * @return the max count, -1 if canceled
+ */
+ public int getMaxCount()
+ {
+ return returnMaxCount;
+ }
+
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/Messages.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/Messages.java
new file mode 100644
index 0000000..ec93cbf
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/Messages.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.valueeditors;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.apache.directory.studio.aciitemeditor.valueeditors.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+
+ private Messages()
+ {
+ }
+
+
+ public static String getString( String key )
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString( key );
+ }
+ catch ( MissingResourceException e )
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/RestrictedByValueEditor.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/RestrictedByValueEditor.java
new file mode 100644
index 0000000..de6f028
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/RestrictedByValueEditor.java
@@ -0,0 +1,362 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.valueeditors;
+
+
+import java.util.Arrays;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
+import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.ldapbrowser.common.widgets.ListContentProposalProvider;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IValue;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.fieldassist.ComboContentAdapter;
+import org.eclipse.jface.fieldassist.ContentProposalAdapter;
+import org.eclipse.jface.fieldassist.DecoratedField;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.fieldassist.IControlCreator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * ACI item editor specific value editor to edit the RestrictedBy protected item.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class RestrictedByValueEditor extends AbstractDialogStringValueEditor
+{
+
+ private static final String L_CURLY_TYPE = "{ type "; //$NON-NLS-1$
+ private static final String SEP_VALUESIN = ", valuesIn "; //$NON-NLS-1$
+ private static final String R_CURLY = " }"; //$NON-NLS-1$
+ private static final String EMPTY = ""; //$NON-NLS-1$
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation opens the RestrictedByDialog.
+ */
+ public boolean openDialog( Shell shell )
+ {
+ Object value = getValue();
+ if ( value != null && value instanceof RestrictedByValueEditorRawValueWrapper )
+ {
+ RestrictedByValueEditorRawValueWrapper wrapper = ( RestrictedByValueEditorRawValueWrapper ) value;
+ RestrictedByDialog dialog = new RestrictedByDialog( shell, wrapper.schema, wrapper.type, wrapper.valuesIn );
+ if ( dialog.open() == TextDialog.OK && !EMPTY.equals( dialog.getType() )
+ && !EMPTY.equals( dialog.getValuesIn() ) )
+ {
+ setValue( L_CURLY_TYPE + dialog.getType() + SEP_VALUESIN + dialog.getValuesIn() + R_CURLY );
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * Returns an AttributeTypeAndValueValueEditorRawValueWrapper.
+ */
+ public Object getRawValue( IValue value )
+ {
+ return value != null ? getRawValue( value.getAttribute().getEntry().getBrowserConnection(), value.getStringValue() )
+ : null;
+ }
+
+
+ private Object getRawValue( IBrowserConnection connection, Object value )
+ {
+ Schema schema = null;
+ if ( connection != null )
+ {
+ schema = connection.getSchema();
+ }
+ if ( schema == null || value == null || !( value instanceof String ) )
+ {
+ return null;
+ }
+
+ String stringValue = ( String ) value;
+ String type = EMPTY;
+ String valuesIn = EMPTY;
+ try
+ {
+ // for example: { type sn, valuesIn cn }
+ Pattern pattern = Pattern
+ .compile( "\\s*\\{\\s*type\\s*([^,\\s]*)\\s*,\\s*valuesIn\\s*([^,\\s]*)\\s*\\}\\s*" ); //$NON-NLS-1$
+ Matcher matcher = pattern.matcher( stringValue );
+ type = matcher.matches() ? matcher.group( 1 ) : EMPTY;
+ valuesIn = matcher.matches() ? matcher.group( 2 ) : EMPTY;
+ }
+ catch ( Throwable e )
+ {
+ e.printStackTrace();
+ }
+
+ RestrictedByValueEditorRawValueWrapper wrapper = new RestrictedByValueEditorRawValueWrapper( schema, type,
+ valuesIn );
+ return wrapper;
+ }
+
+ /**
+ * The RestrictedByValueEditorRawValueWrapper is used to pass contextual
+ * information to the opened RestrictedByDialog.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class RestrictedByValueEditorRawValueWrapper
+ {
+ /**
+ * The schema, used in RestrictedByDialog to build the list
+ * with possible attribute types.
+ */
+ private Schema schema;
+
+ /** The type, used as initial type. */
+ private String type;
+
+ /** The values in, used as initial values in. */
+ private String valuesIn;
+
+
+ /**
+ * Creates a new instance of RestrictedByValueEditorRawValueWrapper.
+ *
+ * @param schema the schema
+ * @param type the type
+ * @param valuesIn the values in
+ */
+ private RestrictedByValueEditorRawValueWrapper( Schema schema, String type, String valuesIn )
+ {
+ this.schema = schema;
+ this.type = type;
+ this.valuesIn = valuesIn;
+ }
+ }
+
+ /**
+ * This class provides a dialog to enter the RestrictedBy values.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class RestrictedByDialog extends Dialog
+ {
+
+ /** The schema. */
+ private Schema schema;
+
+ /** The initial type. */
+ private String initialType;
+
+ /** The initial values in. */
+ private String initialValuesIn;
+
+ /** The type combo field. */
+ private DecoratedField typeComboField;
+
+ /** The type combo. */
+ private Combo typeCombo;
+
+ /** The type content proposal adapter */
+ private ContentProposalAdapter typeCPA;
+
+ /** The values in combo field. */
+ private DecoratedField valuesInComboField;
+
+ /** The values in combo. */
+ private Combo valuesInCombo;
+
+ /** The values in content proposal adapter */
+ private ContentProposalAdapter valuesInCPA;
+
+ /** The return type. */
+ private String returnType;
+
+ /** The return values in. */
+ private String returnValuesIn;
+
+
+ /**
+ * Creates a new instance of RestrictedByDialog.
+ *
+ * @param parentShell the parent shell
+ * @param schema the schema
+ * @param initialType the initial type
+ * @param initialValuesIn the initial values in
+ */
+ public RestrictedByDialog( Shell parentShell, Schema schema, String initialType, String initialValuesIn )
+ {
+ super( parentShell );
+ super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+ this.initialType = initialType;
+ this.initialValuesIn = initialValuesIn;
+ this.schema = schema;
+ this.returnType = null;
+ this.returnValuesIn = null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void configureShell( Shell shell )
+ {
+ super.configureShell( shell );
+ shell.setText( Messages.getString( "RestrictedByValueEditor.title" ) ); //$NON-NLS-1$
+ shell.setImage( Activator.getDefault().getImage( Messages.getString( "RestrictedByValueEditor.icon" ) ) ); //$NON-NLS-1$
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void createButtonsForButtonBar( Composite parent )
+ {
+ super.createButtonsForButtonBar( parent );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void okPressed()
+ {
+ returnType = typeCombo.getText();
+ returnValuesIn = valuesInCombo.getText();
+ super.okPressed();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ // create composite
+ Composite composite = ( Composite ) super.createDialogArea( parent );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+ composite.setLayoutData( gd );
+ composite.setLayout( new GridLayout( 5, false ) );
+
+ BaseWidgetUtils.createLabel( composite, L_CURLY_TYPE, 1 );
+
+ // combo widget
+ String[] allAtNames = schema.getAttributeTypeDescriptionNames();
+ Arrays.sort( allAtNames );
+
+ final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
+ FieldDecorationRegistry.DEC_CONTENT_PROPOSAL );
+
+ typeComboField = new DecoratedField( composite, SWT.NONE, new IControlCreator()
+ {
+ public Control createControl( Composite parent, int style )
+ {
+ Combo combo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
+ combo.setVisibleItemCount( 20 );
+ return combo;
+ }
+ } );
+ typeComboField.addFieldDecoration( fieldDecoration, SWT.TOP | SWT.LEFT, true );
+ typeComboField.getLayoutControl().setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
+ typeCombo = ( Combo ) typeComboField.getControl();
+ typeCombo.setItems( allAtNames );
+ typeCombo.setText( initialType );
+
+ // content proposal adapter
+ typeCPA = new ContentProposalAdapter( typeCombo, new ComboContentAdapter(),
+ new ListContentProposalProvider( typeCombo.getItems() ), null, null );
+ typeCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
+ typeCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
+
+ BaseWidgetUtils.createLabel( composite, SEP_VALUESIN, 1 );
+
+ valuesInComboField = new DecoratedField( composite, SWT.NONE, new IControlCreator()
+ {
+ public Control createControl( Composite parent, int style )
+ {
+ Combo combo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
+ combo.setVisibleItemCount( 20 );
+ return combo;
+ }
+ } );
+ valuesInComboField.addFieldDecoration( fieldDecoration, SWT.TOP | SWT.LEFT, true );
+ valuesInComboField.getLayoutControl().setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
+ valuesInCombo = ( Combo ) valuesInComboField.getControl();
+ valuesInCombo.setItems( allAtNames );
+ valuesInCombo.setText( initialValuesIn );
+
+ // content proposal adapter
+ valuesInCPA = new ContentProposalAdapter( valuesInCombo, new ComboContentAdapter(),
+ new ListContentProposalProvider( valuesInCombo.getItems() ), null, null );
+ valuesInCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
+ valuesInCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
+
+ BaseWidgetUtils.createLabel( composite, R_CURLY, 1 );
+
+ applyDialogFont( composite );
+ return composite;
+ }
+
+
+ /**
+ * Gets the type.
+ *
+ * @return the type, null if canceled
+ */
+ public String getType()
+ {
+ return returnType;
+ }
+
+
+ /**
+ * Gets the values in.
+ *
+ * @return the values in, null if canceled
+ */
+ public String getValuesIn()
+ {
+ return returnValuesIn;
+ }
+
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
new file mode 100644
index 0000000..828c3a0
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
@@ -0,0 +1,749 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.valueeditors;
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.subtree.BaseSubtreeSpecification;
+import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
+import org.apache.directory.shared.ldap.subtree.SubtreeSpecificationParser;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
+import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
+import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
+import org.apache.directory.studio.ldapbrowser.common.widgets.search.EntryWidget;
+import org.apache.directory.studio.ldapbrowser.common.widgets.search.FilterWidget;
+import org.apache.directory.studio.ldapbrowser.core.model.DN;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.NameException;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * This class provides a dialog to enter the Subtree Specification value.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+class SubtreeSpecificationDialog extends Dialog
+{
+
+ /** The parser. */
+ private final SubtreeSpecificationParser parser = new SubtreeSpecificationParser( null );
+
+ /** The connection */
+ private IBrowserConnection connection;
+
+ /** The subentry's DN */
+ private DN subentryDN;
+
+ /** Flag indicating if the refinement or filter widget should be visible */
+ private boolean refinementOrFilterVisible;
+
+ /** The initial SubtreeSpecification */
+ private SubtreeSpecification subtreeSpecification;
+
+ /** The Exclusions List */
+ private List<String> exclusions;
+
+ /** The returned SubtreeSpecification */
+ private String returnValue;
+
+ // UI Fields
+ private EntryWidget entryWidget;
+ private Spinner minimumSpinner;
+ private Spinner maximumSpinner;
+ private TableViewer exclusionsTableViewer;
+ private Button exclusionsTableAddButton;
+ private Button exclusionsTableEditButton;
+ private Button exclusionsTableDeleteButton;
+ private Button refinementButton;
+ private Text refinementText;
+ private Button filterButton;
+ private FilterWidget filterWidget;
+
+
+ /**
+ * Creates a new instance of SubtreeSpecificationDialog.
+ *
+ * @param shell
+ * the shell to use
+ * @param connection
+ * the connection to use
+ * @param subentryDN
+ * the subentry's DN
+ * @param initialSubtreeSpecification
+ * the initial SubtreeSpecification
+ * @param refinementOrFilterVisible
+ * true if the refinement of filter widget should be visible
+ */
+ SubtreeSpecificationDialog( Shell shell, IBrowserConnection connection, DN subentryDN,
+ String initialSubtreeSpecification, boolean refinementOrFilterVisible )
+ {
+ super( shell );
+ this.connection = connection;
+ this.subentryDN = subentryDN;
+ this.refinementOrFilterVisible = refinementOrFilterVisible;
+
+ // parse
+ try
+ {
+ subtreeSpecification = parser.parse( initialSubtreeSpecification );
+ if ( subtreeSpecification == null )
+ {
+ subtreeSpecification = new BaseSubtreeSpecification();
+ }
+ }
+ catch ( ParseException pe )
+ {
+ // TODO
+ pe.printStackTrace();
+ subtreeSpecification = new BaseSubtreeSpecification();
+ }
+
+ exclusions = new ArrayList<String>();
+ Set chopBeforeExclusions = subtreeSpecification.getChopBeforeExclusions();
+ for ( Object chopBeforeExclusion : chopBeforeExclusions )
+ {
+ LdapDN dn = ( LdapDN ) chopBeforeExclusion;
+ exclusions.add( "chopBefore: \"" + dn.toNormName() + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ Set chopAfterExclusions = subtreeSpecification.getChopAfterExclusions();
+ for ( Object chopAfterExclusion : chopAfterExclusions )
+ {
+ LdapDN dn = ( LdapDN ) chopAfterExclusion;
+ exclusions.add( "chopAfter: \"" + dn.toNormName() + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ returnValue = null;
+ }
+
+
+ /** (non-Javadoc)
+ * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ protected void configureShell( Shell newShell )
+ {
+ super.configureShell( newShell );
+ newShell.setText( Messages.getString( "SubtreeValueEditor.title" ) ); //$NON-NLS-1$
+ newShell.setImage( Activator.getDefault().getImage( Messages.getString( "SubtreeValueEditor.icon" ) ) ); //$NON-NLS-1$
+ }
+
+
+ /** (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ protected void okPressed()
+ {
+ // set return value
+ //returnValue = buildSubreeSpecification();
+ StringBuffer sb = new StringBuffer();
+ subtreeSpecification.printToBuffer( sb );
+ returnValue = sb.toString();
+
+ // save filter and dn history
+ if ( refinementOrFilterVisible )
+ {
+ filterWidget.saveDialogSettings();
+ }
+ entryWidget.saveDialogSettings();
+
+ super.okPressed();
+ }
+
+
+ /** (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite outer = ( Composite ) super.createDialogArea( parent );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+ outer.setLayoutData( gd );
+
+ Composite composite = BaseWidgetUtils.createColumnContainer( outer, 3, 1 );
+
+ BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.base" ), 1 ); //$NON-NLS-1$
+
+ DN base = null;
+ DN suffix = null;
+ try
+ {
+ base = new DN( subtreeSpecification.getBase().toNormName() );
+ suffix = subentryDN != null ? subentryDN.getParentDn() : null;
+ }
+ catch ( NameException e )
+ {
+ }
+ entryWidget = new EntryWidget( connection, base, suffix );
+ entryWidget.createWidget( composite );
+ entryWidget.addWidgetModifyListener( new WidgetModifyListener()
+ {
+ public void widgetModified( WidgetModifyEvent event )
+ {
+ validate();
+ }
+ } );
+
+ GridData spinnersGridData = new GridData();
+ spinnersGridData.grabExcessHorizontalSpace = true;
+ spinnersGridData.verticalAlignment = GridData.CENTER;
+ spinnersGridData.horizontalSpan = 2;
+ spinnersGridData.horizontalAlignment = GridData.BEGINNING;
+ spinnersGridData.widthHint = 3 * 12;
+
+ BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.minimum" ), 1 ); //$NON-NLS-1$
+ minimumSpinner = new Spinner( composite, SWT.BORDER );
+ minimumSpinner.setMinimum( 0 );
+ minimumSpinner.setMaximum( Integer.MAX_VALUE );
+ minimumSpinner.setDigits( 0 );
+ minimumSpinner.setIncrement( 1 );
+ minimumSpinner.setPageIncrement( 100 );
+ minimumSpinner.setSelection( subtreeSpecification.getMinBaseDistance() );
+ minimumSpinner.setLayoutData( spinnersGridData );
+ minimumSpinner.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent event )
+ {
+ validate();
+ }
+ } );
+
+ BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.maximum" ), 1 ); //$NON-NLS-1$
+ maximumSpinner = new Spinner( composite, SWT.BORDER );
+ maximumSpinner.setMinimum( 0 );
+ maximumSpinner.setMaximum( Integer.MAX_VALUE );
+ maximumSpinner.setDigits( 0 );
+ maximumSpinner.setIncrement( 1 );
+ maximumSpinner.setPageIncrement( 100 );
+ maximumSpinner.setSelection( subtreeSpecification.getMaxBaseDistance() );
+ maximumSpinner.setLayoutData( spinnersGridData );
+ maximumSpinner.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent event )
+ {
+ validate();
+ }
+ } );
+
+ createExclusionsTable( composite );
+
+ if ( refinementOrFilterVisible )
+ {
+ BaseWidgetUtils.createSpacer( composite, 3 );
+ createRefinementOrFilterWidgets( composite );
+ }
+
+ applyDialogFont( outer );
+
+ initFromInput();
+
+ validate();
+
+ return outer;
+ }
+
+
+ /**
+ * Initializes the Value Editor from the input.
+ */
+ private void initFromInput()
+ {
+
+ }
+
+
+ /**
+ * Creates the Exclusions Table.
+ *
+ * @param composite
+ * the composite
+ */
+ private void createExclusionsTable( Composite composite )
+ {
+ GridData tableGridData = new GridData();
+ tableGridData.grabExcessHorizontalSpace = true;
+ tableGridData.verticalAlignment = GridData.FILL;
+ tableGridData.horizontalAlignment = GridData.FILL;
+ tableGridData.heightHint = 100;
+
+ BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.exclusions" ), 1 ); //$NON-NLS-1$
+ Table exclusionsTable = new Table( composite, SWT.BORDER );
+ exclusionsTable.setHeaderVisible( false );
+ exclusionsTable.setLayoutData( tableGridData );
+ exclusionsTable.setLinesVisible( false );
+ exclusionsTableViewer = new TableViewer( exclusionsTable );
+ exclusionsTableViewer.setContentProvider( new ArrayContentProvider() );
+ exclusionsTableViewer.setLabelProvider( new LabelProvider() );
+ exclusionsTableViewer.setInput( exclusions );
+ exclusionsTableViewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ valueSelectedExclusionsTable();
+ }
+ } );
+ exclusionsTableViewer.addDoubleClickListener( new IDoubleClickListener()
+ {
+ public void doubleClick( DoubleClickEvent event )
+ {
+ editValueExclusionsTable();
+ }
+ } );
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.marginWidth = 0;
+ gridLayout.marginHeight = 0;
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.CENTER;
+ gridData.grabExcessHorizontalSpace = false;
+ gridData.grabExcessVerticalSpace = false;
+ gridData.verticalAlignment = GridData.FILL;
+
+ Composite buttonComposite = new Composite( composite, SWT.NONE );
+ buttonComposite.setLayoutData( gridData );
+ buttonComposite.setLayout( gridLayout );
+
+ GridData buttonGridData = new GridData();
+ buttonGridData.horizontalAlignment = GridData.FILL;
+ buttonGridData.grabExcessHorizontalSpace = false;
+ buttonGridData.verticalAlignment = GridData.BEGINNING;
+ buttonGridData.widthHint = Activator.getButtonWidth( buttonComposite );
+
+ exclusionsTableAddButton = new Button( buttonComposite, SWT.PUSH );
+ exclusionsTableAddButton.setText( Messages.getString( "SubtreeValueEditor.button.add" ) ); //$NON-NLS-1$
+ exclusionsTableAddButton.setLayoutData( buttonGridData );
+ exclusionsTableAddButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ addValueExclusionsTable();
+ }
+ } );
+
+ exclusionsTableEditButton = new Button( buttonComposite, SWT.PUSH );
+ exclusionsTableEditButton.setText( Messages.getString( "SubtreeValueEditor.button.edit" ) ); //$NON-NLS-1$
+ exclusionsTableEditButton.setLayoutData( buttonGridData );
+ exclusionsTableEditButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ editValueExclusionsTable();
+ }
+ } );
+ exclusionsTableEditButton.setEnabled( false );
+
+ exclusionsTableDeleteButton = new Button( buttonComposite, SWT.PUSH );
+ exclusionsTableDeleteButton.setText( Messages.getString( "SubtreeValueEditor.button.delete" ) ); //$NON-NLS-1$
+ exclusionsTableDeleteButton.setLayoutData( buttonGridData );
+ exclusionsTableDeleteButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ deleteValueExclusionsTable();
+ }
+ } );
+ exclusionsTableDeleteButton.setEnabled( false );
+ }
+
+
+ /**
+ * Creates the refinement or filter widgets
+ *
+ * @param composite
+ * the composite
+ */
+ private void createRefinementOrFilterWidgets( Composite parent )
+ {
+ // Messages.getString( "SubtreeValueEditor.label.exclusions" )
+ BaseWidgetUtils.createLabel( parent, Messages
+ .getString( "SubtreeValueEditor.SubtreeValueEditor.label.refinementOrFilter" ), 1 ); //$NON-NLS-1$
+
+ Composite composite = BaseWidgetUtils.createColumnContainer( parent, 2, 2 );
+
+ // refinement redio button
+ refinementButton = BaseWidgetUtils.createRadiobutton( composite, Messages
+ .getString( "SubtreeValueEditor.SubtreeValueEditor.label.refinement" ), 2 ); //$NON-NLS-1$
+
+ // refinement text
+ refinementText = new Text( composite, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.horizontalSpan = 2;
+ gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+ gd.heightHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH / 6 );
+ refinementText.setLayoutData( gd );
+ try
+ {
+ StringBuffer refinementBuffer = new StringBuffer();
+ if ( subtreeSpecification.getRefinement() != null )
+ {
+ subtreeSpecification.getRefinement().printRefinementToBuffer( refinementBuffer );
+ }
+ refinementText.setText( refinementBuffer.toString().trim() );
+ refinementText.setEnabled( true );
+ refinementButton.setSelection( true );
+ }
+ catch ( UnsupportedOperationException e )
+ {
+ // thrown if the ExprNode doesn't represent a valid refinement
+ refinementText.setText( "" ); //$NON-NLS-1$
+ refinementText.setEnabled( false );
+ refinementButton.setSelection( false );
+ }
+
+ // filter radio button
+ filterButton = BaseWidgetUtils.createRadiobutton( composite, Messages
+ .getString( "SubtreeValueEditor.SubtreeValueEditor.label.filter" ), 2 ); //$NON-NLS-1$
+
+ // filter widget
+ StringBuffer filterBuffer = new StringBuffer();
+ if ( subtreeSpecification.getRefinement() != null )
+ {
+ subtreeSpecification.getRefinement().printToBuffer( filterBuffer );
+ }
+ filterWidget = new FilterWidget( connection, filterBuffer.toString().trim() );
+ filterWidget.createWidget( composite );
+ filterButton.setSelection( !refinementButton.getSelection() );
+ filterWidget.setEnabled( !refinementButton.getSelection() );
+
+ // add listeners
+ refinementButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent arg0 )
+ {
+ refinementText.setEnabled( true );
+ //filterButton.setSelection( false );
+ filterWidget.setEnabled( false );
+ validate();
+ }
+ } );
+ refinementText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent event )
+ {
+ validate();
+ }
+ } );
+ filterButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent arg0 )
+ {
+ //refinementButton.setSelection( false );
+ refinementText.setEnabled( false );
+ filterWidget.setEnabled( true );
+ validate();
+ }
+ } );
+ filterWidget.addWidgetModifyListener( new WidgetModifyListener()
+ {
+ public void widgetModified( WidgetModifyEvent event )
+ {
+ validate();
+ }
+ } );
+ }
+
+
+ /**
+ * Validates if the composed subtree specification is valid.
+ */
+ private void validate()
+ {
+ boolean valid = true;
+
+ DN base = entryWidget.getDn();
+ valid &= base != null;
+
+ String ss = buildSubreeSpecification();
+
+ try
+ {
+ subtreeSpecification = parser.parse( ss );
+ valid &= true;
+ }
+ catch ( ParseException pe )
+ {
+ subtreeSpecification = null;
+ valid &= false;
+ }
+
+ if ( refinementOrFilterVisible && filterButton.getSelection() )
+ {
+ valid &= filterWidget.getFilter() != null;
+ }
+
+ if ( getButton( IDialogConstants.OK_ID ) != null )
+ {
+ getButton( IDialogConstants.OK_ID ).setEnabled( valid );
+ }
+
+ //System.out.println("1:" + ss);
+ //StringBuffer sb = new StringBuffer();
+ //subtreeSpecification.printToBuffer( sb );
+ //System.out.println("2:" + sb.toString());
+ }
+
+
+ private String buildSubreeSpecification()
+ {
+ // build subtree specification tree
+ StringBuffer sb = new StringBuffer();
+ sb.append( "{" ); //$NON-NLS-1$
+
+ // Adding base
+ DN base = entryWidget.getDn();
+ if ( base != null && !SubtreeValueEditor.EMPTY.equals( base.toString() ) )
+ {
+ sb.append( " base \"" + base.toString() + "\"," ); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ // Adding Minimum
+ int minimum = minimumSpinner.getSelection();
+ if ( minimum != 0 )
+ {
+ sb.append( " minimum " + minimum + "," ); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ // Adding Maximum
+ int maximum = maximumSpinner.getSelection();
+ if ( maximum != 0 )
+ {
+ sb.append( " maximum " + maximum + "," ); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ // Adding Exclusions
+ if ( !exclusions.isEmpty() )
+ {
+ sb.append( " specificExclusions {" ); //$NON-NLS-1$
+
+ for ( Iterator<String> it = exclusions.iterator(); it.hasNext(); )
+ {
+ sb.append( " " + it.next() ); //$NON-NLS-1$
+
+ if ( it.hasNext() )
+ {
+ sb.append( "," ); //$NON-NLS-1$
+ }
+ }
+
+ sb.append( " }," ); //$NON-NLS-1$
+ }
+
+ // Add Refinement or Filter
+ String refinementOrFilter = ""; //$NON-NLS-1$
+ if ( refinementOrFilterVisible )
+ {
+ if ( refinementButton.getSelection() )
+ {
+ refinementOrFilter = refinementText.getText();
+ }
+ else
+ {
+ refinementOrFilter = filterWidget.getFilter();
+ }
+ }
+ else
+ {
+ refinementOrFilter = ""; //$NON-NLS-1$
+ }
+ if ( refinementOrFilter != null && !SubtreeValueEditor.EMPTY.equals( refinementOrFilter ) )
+ {
+ sb.append( " specificationFilter " + refinementOrFilter + "," ); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ // Removing the last ','
+ if ( sb.charAt( sb.length() - 1 ) == ',' )
+ {
+ sb.deleteCharAt( sb.length() - 1 );
+ }
+
+ sb.append( " }" ); //$NON-NLS-1$
+
+ return sb.toString();
+ }
+
+
+ /**
+ * Called when value is selected in Exclusions table viewer.
+ * Updates the enabled/disabled state of the buttons.
+ */
+ private void valueSelectedExclusionsTable()
+ {
+ String value = getSelectedValueExclusionsTable();
+
+ if ( value == null )
+ {
+ exclusionsTableEditButton.setEnabled( false );
+ exclusionsTableDeleteButton.setEnabled( false );
+ }
+ else
+ {
+ exclusionsTableEditButton.setEnabled( true );
+ exclusionsTableDeleteButton.setEnabled( true );
+ }
+ }
+
+
+ /**
+ * Retuns the current selection in the Exclusions table viewer.
+ *
+ * @return
+ * the value that is selected in the Exclusions table viewer, or null.
+ */
+ private String getSelectedValueExclusionsTable()
+ {
+ String value = null;
+
+ IStructuredSelection selection = ( IStructuredSelection ) exclusionsTableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ Object element = selection.getFirstElement();
+ if ( element instanceof String )
+ {
+ value = ( String ) element;
+ }
+ }
+
+ return value;
+ }
+
+
+ /**
+ * Opens the editor and adds the new Exclusion value to the list.
+ */
+ private void addValueExclusionsTable()
+ {
+ DN chopBase = null;
+ try
+ {
+ chopBase = new DN( subtreeSpecification.getBase().toNormName() );
+ }
+ catch ( NameException e )
+ {
+ }
+ if ( subentryDN != null && subentryDN.getParentDn() != null )
+ {
+ DN suffix = subentryDN != null ? subentryDN.getParentDn() : null;
+ chopBase = new DN( chopBase, suffix );
+ }
+
+ ExclusionDialog dialog = new ExclusionDialog( getShell(), connection, chopBase, "" ); //$NON-NLS-1$
+ if ( dialog.open() == TextDialog.OK && !SubtreeValueEditor.EMPTY.equals( dialog.getType() ) && !SubtreeValueEditor.EMPTY.equals( dialog.getDN() ) )
+ {
+ String newValue = dialog.getType() + ": \"" + dialog.getDN() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
+ exclusions.add( newValue );
+ exclusionsTableViewer.refresh();
+ validate();
+ }
+ }
+
+
+ /**
+ * Opens the editor with the currently selected Exclusion
+ * value and puts the modified value into the list.
+ */
+ private void editValueExclusionsTable()
+ {
+ String oldValue = getSelectedValueExclusionsTable();
+ if ( oldValue != null )
+ {
+ DN chopBase = null;
+ try
+ {
+ chopBase = new DN( subtreeSpecification.getBase().toNormName() );
+ }
+ catch ( NameException e )
+ {
+ }
+ if ( subentryDN != null && subentryDN.getParentDn() != null )
+ {
+ DN suffix = subentryDN != null ? subentryDN.getParentDn() : null;
+ chopBase = new DN( chopBase, suffix );
+ }
+
+ ExclusionDialog dialog = new ExclusionDialog( getShell(), connection, chopBase, oldValue );
+ if ( dialog.open() == TextDialog.OK && !SubtreeValueEditor.EMPTY.equals( dialog.getType() )
+ && !SubtreeValueEditor.EMPTY.equals( dialog.getDN() ) )
+ {
+ String newValue = dialog.getType() + ": \"" + dialog.getDN() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
+ exclusions.remove( oldValue );
+ exclusions.add( newValue );
+ exclusionsTableViewer.refresh();
+ validate();
+ }
+ }
+ }
+
+
+ /**
+ * Deletes the currently selected Exclusion value from list.
+ */
+ private void deleteValueExclusionsTable()
+ {
+ String value = getSelectedValueExclusionsTable();
+ if ( value != null )
+ {
+ exclusions.remove( value );
+ exclusionsTableViewer.refresh();
+ validate();
+ }
+ }
+
+
+ /**
+ * Gets the subtree specification value or null if canceled.
+ *
+ * @return the subtree specification value or null if canceled
+ */
+ public String getSubtreeSpecificationValue()
+ {
+ return returnValue;
+ }
+}
\ No newline at end of file
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java
new file mode 100644
index 0000000..b34ba66
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java
@@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.valueeditors;
+
+
+
+import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
+import org.apache.directory.studio.ldapbrowser.core.model.DN;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IValue;
+import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
+import org.apache.directory.studio.valueeditors.ValueEditorManager;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * ACI item editor specific value editor to edit the SubtreeSpecification.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SubtreeValueEditor extends AbstractDialogStringValueEditor
+{
+ static final String EMPTY = ""; //$NON-NLS-1$
+
+ private boolean refinementOrFilterVisible;
+
+
+ /**
+ * Default constructor, used by the {@link ValueEditorManager}.
+ */
+ public SubtreeValueEditor()
+ {
+ this.refinementOrFilterVisible = true;
+ }
+
+
+ /**
+ * Default constructor, used by the {@link ValueEditorManager}.
+ *
+ * @param refinementOrFilterVisible true if the refinement or filter widget should be visible
+ */
+ public SubtreeValueEditor( boolean refinementOrFilterVisible )
+ {
+ this.refinementOrFilterVisible = refinementOrFilterVisible;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.valueeditors.AbstractDialogValueEditor#openDialog(org.eclipse.swt.widgets.Shell)
+ */
+ protected boolean openDialog( Shell shell )
+ {
+ Object value = getValue();
+ if ( value != null && value instanceof SubtreeSpecificationValueWrapper )
+ {
+ SubtreeSpecificationValueWrapper wrapper = ( SubtreeSpecificationValueWrapper ) value;
+
+ SubtreeSpecificationDialog dialog = new SubtreeSpecificationDialog( shell, wrapper.connection,
+ wrapper.subentryDN, wrapper.subtreeSpecification, refinementOrFilterVisible );
+ if ( dialog.open() == TextDialog.OK && dialog.getSubtreeSpecificationValue() != null )
+ {
+ setValue( dialog.getSubtreeSpecificationValue() );
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor#getRawValue(org.apache.directory.studio.ldapbrowser.core.model.IValue)
+ */
+ public Object getRawValue( IValue value )
+ {
+ Object o = super.getRawValue( value );
+ if ( o != null && o instanceof String )
+ {
+ IBrowserConnection connection = value.getAttribute().getEntry().getBrowserConnection();
+ DN dn = value.getAttribute().getEntry().getDn();
+ return new SubtreeSpecificationValueWrapper( connection, dn, value.getStringValue() );
+ }
+
+ return null;
+ }
+
+
+ /**
+ * The SubtreeSpecificationValueWrapper is used to pass contextual
+ * information to the opened SubtreeSpecificationDialog.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class SubtreeSpecificationValueWrapper
+ {
+ /** The connection, used in DnDialog to browse for an entry */
+ private IBrowserConnection connection;
+
+ /** The subentry's DN */
+ private DN subentryDN;
+
+ /** The subtreeSpecification */
+ private String subtreeSpecification;
+
+
+ /**
+ * Creates a new instance of SubtreeSpecificationValueWrapper.
+ *
+ * @param connection
+ * the connection
+ * @param subentryDn
+ * the DN of the subentry
+ * @param subtreeSpecification
+ * the subtreeSpecification
+ */
+ private SubtreeSpecificationValueWrapper( IBrowserConnection connection, DN subentryDN, String subtreeSpecification )
+ {
+ this.connection = connection;
+ this.subentryDN = subentryDN;
+ this.subtreeSpecification = subtreeSpecification;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString()
+ {
+ return subtreeSpecification == null ? "" : subtreeSpecification; //$NON-NLS-1$
+ }
+
+ }
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/package-info.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/package-info.java
new file mode 100644
index 0000000..ff51694
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+/**
+ * Contains all ACI item editor specific inner value editors.
+ */
+package org.apache.directory.studio.aciitemeditor.valueeditors;
\ No newline at end of file
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java
new file mode 100644
index 0000000..b6d7bc8
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGeneralComposite.java
@@ -0,0 +1,393 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.TypedEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * This is used to edit general ACI item properties:
+ * <ul>
+ * <li>identification tag
+ * <li>precedence
+ * <li>authentication level
+ * <li>selection for userFirst or itemFirst
+ * </ul>
+ *
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIItemGeneralComposite extends Composite
+{
+ /** The inner composite for all the content */
+ private Composite composite = null;
+
+ /** The identification tag label */
+ private Label identificationTagLabel = null;
+
+ /** The identification tag text field */
+ private Text identificationTagText = null;
+
+ /** The precedence label */
+ private Label precedenceLabel = null;
+
+ /** The spinner to select a valid precedence between 0 and 255 */
+ private Spinner precedenceSpinner = null;
+
+ /** The authentication level label */
+ private Label authenticationLevelLabel = null;
+
+ /** The combo to select a valid uthentication level */
+ private Combo authenticationLevelCombo = null;
+
+ /**
+ * The combo viewer is attached to authenticationLevelCombo to work with
+ * AuthenticationLevel objects rather than Strings
+ */
+ private ComboViewer authenticationLevelComboViewer = null;
+
+ /** The user or item first label */
+ private Label userOrItemFirstLabel = null;
+
+ /** The user first radio button */
+ private Button userFirstRadioButton = null;
+
+ /** The item first radio button */
+ private Button itemFirstRadioButton = null;
+
+ /** The list with listers */
+ private List<WidgetModifyListener> listenerList = new ArrayList<WidgetModifyListener>();
+
+
+ /**
+ * Creates a new instance of ACIItemGeneralComposite.
+ *
+ * @param parent
+ * @param style
+ */
+ public ACIItemGeneralComposite( Composite parent, int style )
+ {
+ super( parent, style );
+
+ GridLayout layout = new GridLayout();
+ layout.horizontalSpacing = 0;
+ layout.verticalSpacing = 0;
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ setLayout( layout );
+
+ GridData layoutData = new GridData();
+ layoutData.horizontalAlignment = GridData.FILL;
+ layoutData.grabExcessHorizontalSpace = true;
+ layoutData.verticalAlignment = GridData.CENTER;
+ setLayoutData( layoutData );
+
+ createComposite();
+ }
+
+
+ /**
+ * This method initializes composite
+ *
+ */
+ private void createComposite()
+ {
+
+ GridData identificationTagGridData = new GridData();
+ identificationTagGridData.grabExcessHorizontalSpace = true;
+ identificationTagGridData.verticalAlignment = GridData.CENTER;
+ identificationTagGridData.horizontalSpan = 2;
+ identificationTagGridData.horizontalAlignment = GridData.FILL;
+
+ GridData precedenceGridData = new GridData();
+ precedenceGridData.grabExcessHorizontalSpace = true;
+ precedenceGridData.verticalAlignment = GridData.CENTER;
+ precedenceGridData.horizontalSpan = 2;
+ precedenceGridData.horizontalAlignment = GridData.BEGINNING;
+ precedenceGridData.widthHint = 3 * 12;
+
+ GridData authenticationLevelGridData = new GridData();
+ authenticationLevelGridData.grabExcessHorizontalSpace = true;
+ authenticationLevelGridData.verticalAlignment = GridData.CENTER;
+ authenticationLevelGridData.horizontalSpan = 2;
+ authenticationLevelGridData.horizontalAlignment = GridData.FILL;
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 3;
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.verticalAlignment = GridData.CENTER;
+
+ composite = new Composite( this, SWT.NONE );
+ composite.setLayout( gridLayout );
+ composite.setLayoutData( gridData );
+
+ identificationTagLabel = new Label( composite, SWT.NONE );
+ identificationTagLabel.setText( Messages.getString( "ACIItemGeneralComposite.idTag.label" ) ); //$NON-NLS-1$
+ identificationTagText = new Text( composite, SWT.BORDER );
+ identificationTagText.setLayoutData( identificationTagGridData );
+ identificationTagText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent event )
+ {
+ fire( event );
+ }
+ } );
+
+ precedenceLabel = new Label( composite, SWT.NONE );
+ precedenceLabel.setText( Messages.getString( "ACIItemGeneralComposite.precedence.label" ) ); //$NON-NLS-1$
+ precedenceSpinner = new Spinner( composite, SWT.BORDER );
+ precedenceSpinner.setMinimum( 0 );
+ precedenceSpinner.setMaximum( 255 );
+ precedenceSpinner.setDigits( 0 );
+ precedenceSpinner.setIncrement( 1 );
+ precedenceSpinner.setPageIncrement( 10 );
+ precedenceSpinner.setSelection( 0 );
+ precedenceSpinner.setLayoutData( precedenceGridData );
+ precedenceSpinner.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent event )
+ {
+ fire( event );
+ }
+ } );
+
+ authenticationLevelLabel = new Label( composite, SWT.NONE );
+ authenticationLevelLabel.setText( Messages.getString( "ACIItemGeneralComposite.authLevel.label" ) ); //$NON-NLS-1$
+ authenticationLevelCombo = new Combo( composite, SWT.READ_ONLY );
+ authenticationLevelCombo.setLayoutData( authenticationLevelGridData );
+ AuthenticationLevel[] authenticationLevels = new AuthenticationLevel[3];
+ authenticationLevels[0] = AuthenticationLevel.NONE;
+ authenticationLevels[1] = AuthenticationLevel.SIMPLE;
+ authenticationLevels[2] = AuthenticationLevel.STRONG;
+ authenticationLevelComboViewer = new ComboViewer( authenticationLevelCombo );
+ authenticationLevelComboViewer.setContentProvider( new ArrayContentProvider() );
+ authenticationLevelComboViewer.setLabelProvider( new LabelProvider() );
+ authenticationLevelComboViewer.setInput( authenticationLevels );
+ authenticationLevelComboViewer.setSelection( new StructuredSelection( AuthenticationLevel.NONE ) );
+ authenticationLevelCombo.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent event )
+ {
+ fire( event );
+ }
+ } );
+
+ userOrItemFirstLabel = new Label( composite, SWT.NONE );
+ userOrItemFirstLabel.setText( Messages.getString( "ACIItemGeneralComposite.userOrItemFirst.label" ) ); //$NON-NLS-1$
+ userFirstRadioButton = new Button( composite, SWT.RADIO );
+ userFirstRadioButton.setText( Messages.getString( "ACIItemGeneralComposite.userFirst.label" ) ); //$NON-NLS-1$
+ userFirstRadioButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent event )
+ {
+ fire( event );
+ }
+ } );
+ itemFirstRadioButton = new Button( composite, SWT.RADIO );
+ itemFirstRadioButton.setText( Messages.getString( "ACIItemGeneralComposite.itemFirst.label" ) ); //$NON-NLS-1$
+ itemFirstRadioButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent event )
+ {
+ fire( event );
+ }
+ } );
+
+ }
+
+
+ /**
+ * Add the listener to the list of listeners.
+ *
+ * @param listener
+ */
+ public void addWidgetModifyListener( WidgetModifyListener listener )
+ {
+ checkWidget();
+ if ( listener == null )
+ SWT.error( SWT.ERROR_NULL_ARGUMENT );
+ listenerList.add( listener );
+ }
+
+
+ /**
+ * Removes the listener from the list of listeners.
+ *
+ * @param listener
+ */
+ public void removeWidgetModifyListener( WidgetModifyListener listener )
+ {
+ checkWidget();
+ if ( listener == null )
+ SWT.error( SWT.ERROR_NULL_ARGUMENT );
+ listenerList.remove( listener );
+ }
+
+
+ /**
+ * Fires WidgetModifyEvents.
+ *
+ * @param event the original event
+ */
+ private void fire( TypedEvent event )
+ {
+ for ( WidgetModifyListener listener : listenerList )
+ {
+ listener.widgetModified( new WidgetModifyEvent( this ) );
+ }
+ }
+
+
+ /**
+ * Returns the identification tag.
+ *
+ * @return the identification tag
+ */
+ public String getIdentificationTag()
+ {
+ return identificationTagText.getText();
+ }
+
+
+ /**
+ * Sets the identification tag
+ *
+ * @param identificationTag the identification tag
+ */
+ public void setIdentificationTag( String identificationTag )
+ {
+ identificationTagText.setText( identificationTag );
+ }
+
+
+ /**
+ * Returns the selected precedence.
+ *
+ * @return the selected precedence
+ */
+ public int getPrecedence()
+ {
+ return precedenceSpinner.getSelection();
+ }
+
+
+ /**
+ * Sets the precedence
+ *
+ * @param precedence the precedence
+ */
+ public void setPrecedence( int precedence )
+ {
+ precedenceSpinner.setSelection( precedence );
+ }
+
+
+ /**
+ * Returns the selected authentication level.
+ *
+ * @return the selected authentication level
+ */
+ public AuthenticationLevel getAuthenticationLevel()
+ {
+ IStructuredSelection selection = ( IStructuredSelection ) authenticationLevelComboViewer.getSelection();
+ return ( AuthenticationLevel ) selection.getFirstElement();
+ }
+
+
+ /**
+ * Sets the authentication level.
+ *
+ * @param authenticationLevel the authentication level
+ */
+ public void setAuthenticationLevel( AuthenticationLevel authenticationLevel )
+ {
+ IStructuredSelection selection = new StructuredSelection( authenticationLevel );
+ authenticationLevelComboViewer.setSelection( selection );
+ }
+
+
+ /**
+ * Returns true if user first is selected.
+ *
+ * @return true if user first is selected
+ */
+ public boolean isUserFirst()
+ {
+ return userFirstRadioButton.getSelection();
+ }
+
+
+ /**
+ * Selects user first.
+ */
+ public void setUserFirst()
+ {
+ userFirstRadioButton.setSelection( true );
+ itemFirstRadioButton.setSelection( false );
+ }
+
+
+ /**
+ * Returns true if item first is selected.
+ *
+ * @return true if item first is selected
+ */
+ public boolean isItemFirst()
+ {
+ return itemFirstRadioButton.getSelection();
+ }
+
+
+ /**
+ * Selects item first.
+ */
+ public void setItemFirst()
+ {
+ itemFirstRadioButton.setSelection( true );
+ userFirstRadioButton.setSelection( false );
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGrantsAndDenialsComposite.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGrantsAndDenialsComposite.java
new file mode 100644
index 0000000..aa7badf
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemGrantsAndDenialsComposite.java
@@ -0,0 +1,780 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
+
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.directory.shared.ldap.aci.GrantAndDenial;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.CheckboxCellEditor;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+
+
+/**
+ * This composite contains GUI elements to edit ACI item grants and denials.
+
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIItemGrantsAndDenialsComposite extends Composite
+{
+
+ /** The description label */
+ private Label label = null;
+
+ /** The tree control for the tree viewer */
+ private Tree tree = null;
+
+ /** The tree viewer containing all grants and denials */
+ private TreeViewer treeViewer = null;
+
+ /** The composite containing the buttons */
+ private Composite buttonComposite = null;
+
+ /** The grant all button */
+ private Button grantAllButton = null;
+
+ /** The deny all button */
+ private Button denyAllButton = null;
+
+ /** The deselect all button */
+ private Button deselectAllButton = null;
+
+ /** The undo button */
+ private Button undoButton = null;
+
+ /** The redo button */
+ private Button redoButton = null;
+
+ /** Colum 1 */
+ private static String PERMISSION = Messages.getString( "ACIItemGrantsAndDenialsComposite.column1.header" ); //$NON-NLS-1$
+
+ /** Colum2 */
+ private static String STATE = Messages.getString( "ACIItemGrantsAndDenialsComposite.column2.header" ); //$NON-NLS-1$
+
+ /** The colums */
+ private static String[] COLUMNS = new String[]
+ { PERMISSION, STATE };
+
+ /** The undo/redo stack size */
+ private static final int MAX_STACK_SIZE = 25;
+
+ /** Used as input for the tree viewer */
+ private GrantAndDenialCategory[] grantAndDenialCategories = new GrantAndDenialCategory[]
+ {
+ new GrantAndDenialCategory(
+ Messages.getString( "ACIItemGrantsAndDenialsComposite.category.read" ), true, new GrantAndDenialWrapper[] //$NON-NLS-1$
+ {
+ new GrantAndDenialWrapper( GrantAndDenial.GRANT_BROWSE, GrantAndDenial.DENY_BROWSE ),
+ new GrantAndDenialWrapper( GrantAndDenial.GRANT_READ, GrantAndDenial.DENY_READ ),
+ new GrantAndDenialWrapper( GrantAndDenial.GRANT_COMPARE, GrantAndDenial.DENY_COMPARE ),
+ new GrantAndDenialWrapper( GrantAndDenial.GRANT_FILTER_MATCH, GrantAndDenial.DENY_FILTER_MATCH ),
+ new GrantAndDenialWrapper( GrantAndDenial.GRANT_RETURN_DN, GrantAndDenial.DENY_RETURN_DN ) } ),
+ new GrantAndDenialCategory(
+ Messages.getString( "ACIItemGrantsAndDenialsComposite.category.modify" ), true, new GrantAndDenialWrapper[] //$NON-NLS-1$
+ { new GrantAndDenialWrapper( GrantAndDenial.GRANT_ADD, GrantAndDenial.DENY_ADD ),
+ new GrantAndDenialWrapper( GrantAndDenial.GRANT_MODIFY, GrantAndDenial.DENY_MODIFY ),
+ new GrantAndDenialWrapper( GrantAndDenial.GRANT_REMOVE, GrantAndDenial.DENY_REMOVE ),
+ new GrantAndDenialWrapper( GrantAndDenial.GRANT_RENAME, GrantAndDenial.DENY_RENAME ) } ),
+ new GrantAndDenialCategory(
+ Messages.getString( "ACIItemGrantsAndDenialsComposite.category.advanced" ), false, new GrantAndDenialWrapper[] //$NON-NLS-1$
+ {
+ new GrantAndDenialWrapper( GrantAndDenial.GRANT_EXPORT, GrantAndDenial.DENY_EXPORT ),
+ new GrantAndDenialWrapper( GrantAndDenial.GRANT_IMPORT, GrantAndDenial.DENY_IMPORT ),
+ new GrantAndDenialWrapper( GrantAndDenial.GRANT_INVOKE, GrantAndDenial.DENY_INVOKE ),
+ new GrantAndDenialWrapper( GrantAndDenial.GRANT_DISCLOSE_ON_ERROR,
+ GrantAndDenial.DENY_DISCLOSE_ON_ERROR ) } ) };
+
+ /**
+ * A GrantAndDenialCategory is used to categorize grants and denials in a tree.
+ */
+ private class GrantAndDenialCategory
+ {
+ /** The category name, displayed in tree */
+ private String name;
+
+ /** The initial expanded state */
+ private boolean expanded;
+
+ /** The grants and denials wrappers display under this category */
+ private GrantAndDenialWrapper[] grantAndDenialWrappers;
+
+
+ /**
+ * Creates a new instance of GrantAndDenialCategory.
+ *
+ * @param name the category name, displayed in tree
+ * @param expanded true if category should be initially expanded
+ * @param grantAndDenialWrappers the grants and denials wrappers display under this category
+ */
+ private GrantAndDenialCategory( String name, boolean expanded, GrantAndDenialWrapper[] grantAndDenialWrappers )
+ {
+ this.name = name;
+ this.expanded = expanded;
+ this.grantAndDenialWrappers = grantAndDenialWrappers;
+ }
+ }
+
+ /**
+ * A GrantAndDenialWrapper is used to display grants and denials in tree and to
+ * track the current state (not specified, grant or deny). Additional it provides
+ * undo/redo functionality.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class GrantAndDenialWrapper
+ {
+ /** The grant */
+ private GrantAndDenial grant;
+
+ /** The denial */
+ private GrantAndDenial denial;
+
+ /** The current state: null=not specified, grant or denial */
+ private GrantAndDenial activeGrantAndDenial;
+
+ /** List containing previous states of activeGrandAndDenial */
+ private List<GrantAndDenial> undoStack;
+
+ /** List containing "future" states of activeGrandAndDenial */
+ private List<GrantAndDenial> redoStack;
+
+
+ /**
+ * Creates a new instance of GrantAndDenialWrapper.
+ *
+ * @param grant
+ * @param denial
+ */
+ private GrantAndDenialWrapper( GrantAndDenial grant, GrantAndDenial denial )
+ {
+ this.grant = grant;
+ this.denial = denial;
+ this.activeGrantAndDenial = null;
+ undoStack = new LinkedList<GrantAndDenial>();
+ redoStack = new LinkedList<GrantAndDenial>();
+ }
+ }
+
+
+ /**
+ * Creates a new instance of ACIItemGrantsAndDenialsComposite.
+ *
+ * @param parent
+ * @param style
+ */
+ public ACIItemGrantsAndDenialsComposite( Composite parent, int style )
+ {
+ super( parent, style );
+
+ GridLayout layout = new GridLayout();
+ layout.makeColumnsEqualWidth = false;
+ layout.numColumns = 2;
+ setLayout( layout );
+
+ GridData layoutData = new GridData();
+ layoutData.grabExcessHorizontalSpace = true;
+ layoutData.grabExcessVerticalSpace = true;
+ layoutData.horizontalAlignment = GridData.FILL;
+ layoutData.verticalAlignment = GridData.FILL;
+ setLayoutData( layoutData );
+
+ GridData labelGridData = new GridData();
+ labelGridData.horizontalSpan = 2;
+ labelGridData.verticalAlignment = GridData.CENTER;
+ labelGridData.grabExcessHorizontalSpace = true;
+ labelGridData.horizontalAlignment = GridData.FILL;
+
+ label = new Label( this, SWT.NONE );
+ label.setText( Messages.getString( "ACIItemGrantsAndDenialsComposite.description" ) ); //$NON-NLS-1$
+ label.setLayoutData( labelGridData );
+
+ createTree();
+
+ createButtonComposite();
+ }
+
+
+ /**
+ * This method initializes tree
+ *
+ */
+ private void createTree()
+ {
+ GridData tableGridData = new GridData( GridData.FILL_BOTH );
+ tableGridData.grabExcessHorizontalSpace = true;
+ tableGridData.grabExcessVerticalSpace = true;
+ tableGridData.verticalAlignment = GridData.FILL;
+ tableGridData.horizontalAlignment = GridData.FILL;
+ //tableGridData.heightHint = 100;
+
+ tree = new Tree( this, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION
+ | SWT.HIDE_SELECTION );
+ tree.setHeaderVisible( true );
+ tree.setLayoutData( tableGridData );
+ tree.setLinesVisible( true );
+
+ TreeColumn c1 = new TreeColumn( tree, SWT.LEFT, 0 );
+ c1.setText( COLUMNS[0] );
+ c1.setWidth( 160 );
+ TreeColumn c2 = new TreeColumn( tree, SWT.LEFT, 1 );
+ c2.setText( COLUMNS[1] );
+ c2.setWidth( 80 );
+ // TreeColumn c3 = new TreeColumn( tree, SWT.LEFT, 2 );
+ // c3.setText( " " ); //$NON-NLS-1$
+ // c3.setWidth( 0 );
+
+ treeViewer = new TreeViewer( tree );
+ treeViewer.setUseHashlookup( true );
+
+ treeViewer.setColumnProperties( COLUMNS );
+
+ ICellModifier cellModifier = new GrantsAndDenialsCellModifier();
+ treeViewer.setCellModifier( cellModifier );
+ CellEditor[] cellEditors = new CellEditor[]
+ { null, new CheckboxCellEditor( tree ), null };
+ treeViewer.setCellEditors( cellEditors );
+
+ treeViewer.setContentProvider( new GrantsAndDenialsContentProvider() );
+ treeViewer.setLabelProvider( new GrantsAndDenialsLabelProvider() );
+ treeViewer.setInput( grantAndDenialCategories );
+
+ // set expanded state
+ List<GrantAndDenialCategory> expandedList = new ArrayList<GrantAndDenialCategory>();
+ for ( GrantAndDenialCategory grantAndDenialCategory : grantAndDenialCategories )
+ {
+ if ( grantAndDenialCategory.expanded )
+ {
+ expandedList.add( grantAndDenialCategory );
+ }
+ }
+ treeViewer.setExpandedElements( expandedList.toArray() );
+ }
+
+
+ /**
+ * This method initializes buttonComposite
+ *
+ */
+ private void createButtonComposite()
+ {
+ GridData deselectAllButtonGridData = new GridData();
+ deselectAllButtonGridData.horizontalAlignment = GridData.FILL;
+ deselectAllButtonGridData.grabExcessHorizontalSpace = false;
+ deselectAllButtonGridData.verticalAlignment = GridData.BEGINNING;
+ deselectAllButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData denyAllButtonGridData = new GridData();
+ denyAllButtonGridData.horizontalAlignment = GridData.FILL;
+ denyAllButtonGridData.grabExcessHorizontalSpace = false;
+ denyAllButtonGridData.verticalAlignment = GridData.BEGINNING;
+ denyAllButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData grantAllButtonGridData = new GridData();
+ grantAllButtonGridData.horizontalAlignment = GridData.FILL;
+ grantAllButtonGridData.grabExcessHorizontalSpace = false;
+ grantAllButtonGridData.verticalAlignment = GridData.BEGINNING;
+ grantAllButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData undoButtonGridData = new GridData();
+ undoButtonGridData.horizontalAlignment = GridData.FILL;
+ undoButtonGridData.grabExcessHorizontalSpace = false;
+ undoButtonGridData.verticalAlignment = GridData.BEGINNING;
+ undoButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData redoButtonGridData = new GridData();
+ redoButtonGridData.horizontalAlignment = GridData.FILL;
+ redoButtonGridData.grabExcessHorizontalSpace = false;
+ redoButtonGridData.verticalAlignment = GridData.BEGINNING;
+ redoButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.marginWidth = 0;
+ gridLayout.marginHeight = 0;
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.CENTER;
+ gridData.grabExcessHorizontalSpace = false;
+ gridData.grabExcessVerticalSpace = false;
+ gridData.verticalAlignment = GridData.FILL;
+
+ buttonComposite = new Composite( this, SWT.NONE );
+ buttonComposite.setLayoutData( gridData );
+ buttonComposite.setLayout( gridLayout );
+
+ grantAllButton = new Button( buttonComposite, SWT.NONE );
+ grantAllButton.setText( Messages.getString( "ACIItemGrantsAndDenialsComposite.grantAll.button" ) ); //$NON-NLS-1$
+ grantAllButton.setLayoutData( grantAllButtonGridData );
+ grantAllButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ backup();
+ for ( GrantAndDenialCategory grantAndDenialCategory : grantAndDenialCategories )
+ {
+ for ( GrantAndDenialWrapper grantAndDenialWrapper : grantAndDenialCategory.grantAndDenialWrappers )
+ {
+ grantAndDenialWrapper.activeGrantAndDenial = grantAndDenialWrapper.grant;
+ }
+ }
+ treeViewer.refresh();
+ }
+ } );
+
+ denyAllButton = new Button( buttonComposite, SWT.NONE );
+ denyAllButton.setText( Messages.getString( "ACIItemGrantsAndDenialsComposite.denyAll.button" ) ); //$NON-NLS-1$
+ denyAllButton.setLayoutData( denyAllButtonGridData );
+ denyAllButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ backup();
+ for ( GrantAndDenialCategory grantAndDenialCategory : grantAndDenialCategories )
+ {
+ for ( GrantAndDenialWrapper grantAndDenialWrapper : grantAndDenialCategory.grantAndDenialWrappers )
+ {
+ grantAndDenialWrapper.activeGrantAndDenial = grantAndDenialWrapper.denial;
+ }
+ }
+ treeViewer.refresh();
+ }
+ } );
+
+ deselectAllButton = new Button( buttonComposite, SWT.NONE );
+ deselectAllButton.setText( Messages.getString( "ACIItemGrantsAndDenialsComposite.deselectAll.button" ) ); //$NON-NLS-1$
+ deselectAllButton.setLayoutData( deselectAllButtonGridData );
+ deselectAllButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ backup();
+ for ( GrantAndDenialCategory grantAndDenialCategory : grantAndDenialCategories )
+ {
+ for ( GrantAndDenialWrapper grantAndDenialWrapper : grantAndDenialCategory.grantAndDenialWrappers )
+ {
+ grantAndDenialWrapper.activeGrantAndDenial = null;
+ }
+ }
+ treeViewer.refresh();
+ }
+ } );
+
+ undoButton = new Button( buttonComposite, SWT.NONE );
+ undoButton.setText( Messages.getString( "ACIItemGrantsAndDenialsComposite.undo.button" ) ); //$NON-NLS-1$
+ undoButton.setLayoutData( undoButtonGridData );
+ undoButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ undo();
+ treeViewer.refresh();
+ }
+ } );
+ undoButton.setEnabled( false );
+
+ redoButton = new Button( buttonComposite, SWT.NONE );
+ redoButton.setText( Messages.getString( "ACIItemGrantsAndDenialsComposite.redo.button" ) ); //$NON-NLS-1$
+ redoButton.setLayoutData( redoButtonGridData );
+ redoButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ redo();
+ treeViewer.refresh();
+ }
+ } );
+ redoButton.setEnabled( false );
+
+ }
+
+ /**
+ * The ICellModifier user for this tree viewer.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class GrantsAndDenialsCellModifier implements ICellModifier
+ {
+
+ /**
+ * Only GrantAndDenialWrappers and the STATE colum is modifyable.
+ *
+ * @param element the element
+ * @param property the property
+ *
+ * @return true, if can modify
+ */
+ public boolean canModify( Object element, String property )
+ {
+ if ( element instanceof GrantAndDenialWrapper )
+ {
+ return property.equals( STATE );
+ }
+
+ return false;
+ }
+
+
+ /**
+ * The used CheckboxCellEditor accepts only Booleans.
+ *
+ * @param element the element
+ * @param property the property
+ *
+ * @return the value
+ */
+ public Object getValue( Object element, String property )
+ {
+ if ( element instanceof GrantAndDenialWrapper )
+ {
+ if ( property.equals( STATE ) )
+ {
+ return new Boolean( true );
+ }
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Performs the tree-state transtion.
+ *
+ * @param element the element
+ * @param value the value
+ * @param property the property
+ */
+ public void modify( Object element, String property, Object value )
+ {
+ if ( element != null && element instanceof Item )
+ {
+ element = ( ( Item ) element ).getData();
+ }
+
+ if ( element instanceof GrantAndDenialWrapper )
+ {
+ GrantAndDenialWrapper grantAndDenialWrapper = ( GrantAndDenialWrapper ) element;
+
+ if ( property.equals( STATE ) )
+ {
+ backup();
+ if ( grantAndDenialWrapper.activeGrantAndDenial == null )
+ {
+ grantAndDenialWrapper.activeGrantAndDenial = grantAndDenialWrapper.grant;
+ }
+ else if ( grantAndDenialWrapper.activeGrantAndDenial == grantAndDenialWrapper.grant )
+ {
+ grantAndDenialWrapper.activeGrantAndDenial = grantAndDenialWrapper.denial;
+ }
+ else if ( grantAndDenialWrapper.activeGrantAndDenial == grantAndDenialWrapper.denial )
+ {
+ grantAndDenialWrapper.activeGrantAndDenial = null;
+ }
+ }
+ }
+
+ treeViewer.refresh();
+ }
+
+ }
+
+ /**
+ * The content provider used for this tree viewer.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class GrantsAndDenialsContentProvider extends ArrayContentProvider implements ITreeContentProvider
+ {
+
+ /**
+ * Only GrantAndDenialCategories have children.
+ *
+ * @param parentElement the parent element
+ *
+ * @return the children
+ */
+ public Object[] getChildren( Object parentElement )
+ {
+ if ( parentElement instanceof GrantAndDenialCategory )
+ {
+ GrantAndDenialCategory cat = ( GrantAndDenialCategory ) parentElement;
+ return cat.grantAndDenialWrappers;
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Not used.
+ *
+ * @param element the element
+ *
+ * @return the parent
+ */
+ public Object getParent( Object element )
+ {
+ return null;
+ }
+
+
+ /**
+ * Only GrantAndDenialCategories have children.
+ *
+ * @param element the element
+ *
+ * @return true, if has children
+ */
+ public boolean hasChildren( Object element )
+ {
+ return ( element instanceof GrantAndDenialCategory );
+ }
+
+ }
+
+ /**
+ * The label provider used for this tree viewer.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class GrantsAndDenialsLabelProvider extends LabelProvider implements ITableLabelProvider
+ {
+
+ /**
+ * The STATE is displayed as image.
+ *
+ * @param element the element
+ * @param columnIndex the column index
+ *
+ * @return the column image
+ */
+ public Image getColumnImage( Object element, int columnIndex )
+ {
+ if ( element instanceof GrantAndDenialWrapper )
+ {
+ GrantAndDenialWrapper grantAndDenialWrapper = ( GrantAndDenialWrapper ) element;
+ switch ( columnIndex )
+ {
+ case 0:
+ return null;
+ case 1:
+ if ( grantAndDenialWrapper.activeGrantAndDenial == null )
+ {
+ return Activator.getDefault().getImage(
+ Messages.getString( "ACIItemGrantsAndDenialsComposite.unspecified.icon" ) ); //$NON-NLS-1$
+ }
+ else if ( grantAndDenialWrapper.activeGrantAndDenial == grantAndDenialWrapper.grant )
+ {
+ return Activator.getDefault().getImage(
+ Messages.getString( "ACIItemGrantsAndDenialsComposite.grant.icon" ) ); //$NON-NLS-1$
+ }
+ else if ( grantAndDenialWrapper.activeGrantAndDenial == grantAndDenialWrapper.denial )
+ {
+ return Activator.getDefault().getImage(
+ Messages.getString( "ACIItemGrantsAndDenialsComposite.deny.icon" ) ); //$NON-NLS-1$
+ }
+ case 2:
+ return null;
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ * Returns GrantAndDenialCategory name or the MicroOperation name.
+ *
+ * @param element the element
+ * @param columnIndex the column index
+ *
+ * @return the column text
+ */
+ public String getColumnText( Object element, int columnIndex )
+ {
+ if ( element instanceof GrantAndDenialCategory )
+ {
+ if ( columnIndex == 0 )
+ {
+ GrantAndDenialCategory cat = ( GrantAndDenialCategory ) element;
+ return cat.name;
+ }
+ }
+ else if ( element instanceof GrantAndDenialWrapper )
+ {
+ if ( columnIndex == 0 )
+ {
+ GrantAndDenialWrapper wrapper = ( GrantAndDenialWrapper ) element;
+ return wrapper.grant.getMicroOperation().getName();
+ }
+ }
+
+ return ""; //$NON-NLS-1$
+ }
+
+ }
+
+
+ /**
+ * Sets the grants and denials.
+ *
+ * @param grantsAndDenials
+ */
+ public void setGrantsAndDenials( Collection<GrantAndDenial> grantsAndDenials )
+ {
+ for ( GrantAndDenial grantAndDenial : grantsAndDenials )
+ {
+ for ( GrantAndDenialCategory grantAndDenialCategory : grantAndDenialCategories )
+ {
+ for ( GrantAndDenialWrapper grantAndDenialWrapper : grantAndDenialCategory.grantAndDenialWrappers )
+ {
+ if ( grantAndDenialWrapper.grant == grantAndDenial )
+ {
+ grantAndDenialWrapper.activeGrantAndDenial = grantAndDenialWrapper.grant;
+ }
+ else if ( grantAndDenialWrapper.denial == grantAndDenial )
+ {
+ grantAndDenialWrapper.activeGrantAndDenial = grantAndDenialWrapper.denial;
+ }
+ }
+ }
+ }
+
+ treeViewer.refresh();
+ }
+
+
+ /**
+ * Returns the grants and denials as selected by the user.
+ *
+ * @return the grants and denials
+ * @throws ParseException
+ */
+ public Collection<GrantAndDenial> getGrantsAndDenials() throws ParseException
+ {
+ Collection<GrantAndDenial> grantsAndDenials = new ArrayList<GrantAndDenial>();
+
+ for ( GrantAndDenialCategory grantAndDenialCategory : grantAndDenialCategories )
+ {
+ for ( GrantAndDenialWrapper grantAndDenialWrapper : grantAndDenialCategory.grantAndDenialWrappers )
+ {
+ if ( grantAndDenialWrapper.activeGrantAndDenial != null )
+ {
+ grantsAndDenials.add( grantAndDenialWrapper.activeGrantAndDenial );
+ }
+ }
+ }
+
+ return grantsAndDenials;
+ }
+
+
+ /**
+ * Undos the last modification.
+ */
+ private void undo()
+ {
+ for ( GrantAndDenialCategory grantAndDenialCategory : grantAndDenialCategories )
+ {
+ for ( GrantAndDenialWrapper grantAndDenialWrapper : grantAndDenialCategory.grantAndDenialWrappers )
+ {
+ if ( grantAndDenialWrapper.undoStack.size() > 0 )
+ {
+ grantAndDenialWrapper.redoStack.add( 0, grantAndDenialWrapper.activeGrantAndDenial );
+ grantAndDenialWrapper.activeGrantAndDenial = grantAndDenialWrapper.undoStack.remove( 0 );
+ }
+
+ undoButton.setEnabled( !grantAndDenialWrapper.undoStack.isEmpty() );
+ redoButton.setEnabled( !grantAndDenialWrapper.redoStack.isEmpty() );
+ }
+ }
+ }
+
+
+ /**
+ * Redos the last modification
+ */
+ private void redo()
+ {
+ for ( GrantAndDenialCategory grantAndDenialCategory : grantAndDenialCategories )
+ {
+ for ( GrantAndDenialWrapper grantAndDenialWrapper : grantAndDenialCategory.grantAndDenialWrappers )
+ {
+ if ( grantAndDenialWrapper.redoStack.size() > 0 )
+ {
+ grantAndDenialWrapper.undoStack.add( 0, grantAndDenialWrapper.activeGrantAndDenial );
+ grantAndDenialWrapper.activeGrantAndDenial = grantAndDenialWrapper.redoStack.remove( 0 );
+ }
+
+ undoButton.setEnabled( !grantAndDenialWrapper.undoStack.isEmpty() );
+ redoButton.setEnabled( !grantAndDenialWrapper.redoStack.isEmpty() );
+ }
+ }
+ }
+
+
+ /**
+ * Saves the current state to the undo stack.
+ */
+ private void backup()
+ {
+ for ( GrantAndDenialCategory grantAndDenialCategory : grantAndDenialCategories )
+ {
+ for ( GrantAndDenialWrapper grantAndDenialWrapper : grantAndDenialCategory.grantAndDenialWrappers )
+ {
+ if ( grantAndDenialWrapper.undoStack.size() == MAX_STACK_SIZE )
+ {
+ grantAndDenialWrapper.undoStack.remove( grantAndDenialWrapper.undoStack.size() - 1 );
+ }
+ grantAndDenialWrapper.undoStack.add( 0, grantAndDenialWrapper.activeGrantAndDenial );
+ grantAndDenialWrapper.redoStack.clear();
+
+ undoButton.setEnabled( !grantAndDenialWrapper.undoStack.isEmpty() );
+ redoButton.setEnabled( !grantAndDenialWrapper.redoStack.isEmpty() );
+ }
+ }
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java
new file mode 100644
index 0000000..bf73bb2
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemItemPermissionsComposite.java
@@ -0,0 +1,513 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.directory.shared.ldap.aci.GrantAndDenial;
+import org.apache.directory.shared.ldap.aci.ItemPermission;
+import org.apache.directory.shared.ldap.aci.UserClass;
+import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.aciitemeditor.dialogs.ItemPermissionDialog;
+import org.apache.directory.studio.aciitemeditor.model.UserClassWrapper;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+
+
+/**
+ * This composite contains GUI elements to add, edit and delete ACI item permissions.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIItemItemPermissionsComposite extends Composite
+{
+
+ /** The context. */
+ private ACIItemValueWithContext context;
+
+ /** The inner composite for all the content */
+ private Composite composite = null;
+
+ /** The description label */
+ private Label label = null;
+
+ /** The table control for the table viewer */
+ private Table table = null;
+
+ /** The table viewer containing all item classes */
+ private TableViewer tableViewer = null;
+
+ /** The composite containing the buttons */
+ private Composite buttonComposite = null;
+
+ /** The add button */
+ private Button addButton = null;
+
+ /** The edit button */
+ private Button editButton = null;
+
+ /** The delete button */
+ private Button deleteButton = null;
+
+ /** The selected item permissions, input of the table viewer */
+ private List<ItemPermissionWrapper> itemPermissionWrappers = new ArrayList<ItemPermissionWrapper>();
+
+ /**
+ * ItemPermissionWrappers are used as input of the table viewer.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class ItemPermissionWrapper
+ {
+ /** The item permission bean. */
+ private ItemPermission itemPermission;
+
+
+ /**
+ * Creates a new instance of ItemPermissionWrapper.
+ *
+ * @param itemClassClass
+ */
+ private ItemPermissionWrapper( ItemPermission itemPermission )
+ {
+ this.itemPermission = itemPermission;
+ }
+
+
+ /**
+ * Returns a user-friedly string, displayed in the table.
+ *
+ * @return the string
+ */
+ public String toString()
+ {
+ if ( itemPermission == null )
+ {
+ return "<UNKNOWN>"; //$NON-NLS-1$
+ }
+ else
+ {
+ StringBuffer buffer = new StringBuffer();
+ if ( itemPermission.getPrecedence() > -1 )
+ {
+ buffer.append( '(' );
+ buffer.append( itemPermission.getPrecedence() );
+ buffer.append( ')' );
+ buffer.append( ' ' );
+ }
+ for ( Iterator<UserClass> it = ( ( Collection<UserClass> ) itemPermission.getUserClasses() ).iterator(); it
+ .hasNext(); )
+ {
+ UserClass uc = it.next();
+ String s = UserClassWrapper.classToDisplayMap.get( uc.getClass() );
+ buffer.append( s );
+
+ if ( it.hasNext() )
+ {
+ buffer.append( ',' );
+ }
+ }
+ buffer.append( ':' );
+ buffer.append( ' ' );
+ for ( Iterator<GrantAndDenial> it = ( ( Collection<GrantAndDenial> ) itemPermission
+ .getGrantsAndDenials() ).iterator(); it.hasNext(); )
+ {
+ GrantAndDenial gd = it.next();
+ buffer.append( gd.isGrant() ? '+' : '-' );
+ buffer.append( gd.getMicroOperation().getName() );
+
+ if ( it.hasNext() )
+ {
+ buffer.append( ',' );
+ }
+ }
+
+ String s = buffer.toString();
+ s = s.replace( '\r', ' ' );
+ s = s.replace( '\n', ' ' );
+ if ( s.length() > 50 )
+ {
+ String temp = s;
+ s = temp.substring( 0, 25 );
+ s = s + "..."; //$NON-NLS-1$
+ s = s + temp.substring( temp.length() - 25, temp.length() );
+ }
+ return s;
+ }
+ }
+ }
+
+
+ /**
+ *
+ * Creates a new instance of ACIItemItemPermissionsComposite.
+ *
+ * @param parent
+ * @param style
+ */
+ public ACIItemItemPermissionsComposite( Composite parent, int style )
+ {
+ super( parent, style );
+
+ GridLayout layout = new GridLayout();
+ layout.horizontalSpacing = 0;
+ layout.verticalSpacing = 0;
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ setLayout( layout );
+
+ GridData layoutData = new GridData();
+ layoutData.horizontalAlignment = GridData.FILL;
+ layoutData.grabExcessHorizontalSpace = true;
+ layoutData.verticalAlignment = GridData.CENTER;
+ setLayoutData( layoutData );
+
+ createComposite();
+ }
+
+
+ /**
+ * This method initializes composite
+ *
+ */
+ private void createComposite()
+ {
+
+ GridData labelGridData = new GridData();
+ labelGridData.horizontalSpan = 2;
+ labelGridData.verticalAlignment = GridData.CENTER;
+ labelGridData.grabExcessHorizontalSpace = true;
+ labelGridData.horizontalAlignment = GridData.FILL;
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.makeColumnsEqualWidth = false;
+ gridLayout.numColumns = 2;
+
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.verticalSpan = 1;
+ gridData.verticalAlignment = GridData.BEGINNING;
+
+ composite = new Composite( this, SWT.NONE );
+ composite.setLayoutData( gridData );
+ composite.setLayout( gridLayout );
+
+ label = new Label( composite, SWT.NONE );
+ label.setText( Messages.getString( "ACIItemItemPermissionsComposite.description" ) ); //$NON-NLS-1$
+ label.setLayoutData( labelGridData );
+
+ createTable();
+
+ createButtonComposite();
+ }
+
+
+ /**
+ * This method initializes table and table viewer
+ *
+ */
+ private void createTable()
+ {
+ GridData tableGridData = new GridData();
+ tableGridData.grabExcessHorizontalSpace = true;
+ tableGridData.verticalAlignment = GridData.FILL;
+ tableGridData.horizontalAlignment = GridData.FILL;
+ //tableGridData.heightHint = 100;
+
+ table = new Table( composite, SWT.BORDER );
+ table.setHeaderVisible( false );
+ table.setLayoutData( tableGridData );
+ table.setLinesVisible( false );
+ tableViewer = new TableViewer( table );
+ tableViewer.setContentProvider( new ArrayContentProvider() );
+ tableViewer.setLabelProvider( new LabelProvider() );
+ tableViewer.setInput( itemPermissionWrappers );
+
+ tableViewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ itemPermissionSelected();
+ }
+ } );
+
+ tableViewer.addDoubleClickListener( new IDoubleClickListener()
+ {
+ public void doubleClick( DoubleClickEvent event )
+ {
+ editItemPermission();
+ }
+ } );
+ }
+
+
+ /**
+ * This method initializes buttons
+ *
+ */
+ private void createButtonComposite()
+ {
+ GridData deleteButtonGridData = new GridData();
+ deleteButtonGridData.horizontalAlignment = GridData.FILL;
+ deleteButtonGridData.grabExcessHorizontalSpace = false;
+ deleteButtonGridData.verticalAlignment = GridData.BEGINNING;
+ deleteButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData editButtonGridData = new GridData();
+ editButtonGridData.horizontalAlignment = GridData.FILL;
+ editButtonGridData.grabExcessHorizontalSpace = false;
+ editButtonGridData.verticalAlignment = GridData.BEGINNING;
+ editButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData addButtonGridData = new GridData();
+ addButtonGridData.horizontalAlignment = GridData.FILL;
+ addButtonGridData.grabExcessHorizontalSpace = false;
+ addButtonGridData.verticalAlignment = GridData.BEGINNING;
+ addButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.marginWidth = 0;
+ gridLayout.marginHeight = 0;
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.CENTER;
+ gridData.grabExcessHorizontalSpace = false;
+ gridData.grabExcessVerticalSpace = false;
+ gridData.verticalAlignment = GridData.FILL;
+
+ buttonComposite = new Composite( composite, SWT.NONE );
+ buttonComposite.setLayoutData( gridData );
+ buttonComposite.setLayout( gridLayout );
+
+ addButton = new Button( buttonComposite, SWT.NONE );
+ addButton.setText( Messages.getString( "ACIItemItemPermissionsComposite.add.button" ) ); //$NON-NLS-1$
+ addButton.setLayoutData( addButtonGridData );
+ addButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ addItemPermission();
+ }
+ } );
+
+ editButton = new Button( buttonComposite, SWT.NONE );
+ editButton.setText( Messages.getString( "ACIItemItemPermissionsComposite.edit.button" ) ); //$NON-NLS-1$
+ editButton.setLayoutData( editButtonGridData );
+ editButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ editItemPermission();
+ }
+ } );
+ editButton.setEnabled( false );
+
+ deleteButton = new Button( buttonComposite, SWT.NONE );
+ deleteButton.setText( Messages.getString( "ACIItemItemPermissionsComposite.delete.button" ) ); //$NON-NLS-1$
+ deleteButton.setLayoutData( deleteButtonGridData );
+ deleteButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ deleteItemPermission();
+ }
+ } );
+ deleteButton.setEnabled( false );
+
+ }
+
+
+ /**
+ * Shows or hides this composite.
+ *
+ * @param visible true if visible
+ */
+ public void setVisible( boolean visible )
+ {
+ super.setVisible( visible );
+ ( ( GridData ) getLayoutData() ).heightHint = visible ? -1 : 0;
+ }
+
+
+ /**
+ * Sets the context.
+ *
+ * @param context the context
+ */
+ public void setContext( ACIItemValueWithContext context )
+ {
+ this.context = context;
+ }
+
+
+ /**
+ * Sets the item permissions.
+ *
+ * @param itemPermissions
+ */
+ public void setItemPermissions( Collection<ItemPermission> itemPermissions )
+ {
+ itemPermissionWrappers.clear();
+
+ for ( ItemPermission itemPermission : itemPermissions )
+ {
+ ItemPermissionWrapper itemPermissionWrapper = new ItemPermissionWrapper( itemPermission );
+
+ itemPermissionWrappers.add( itemPermissionWrapper );
+ }
+
+ tableViewer.refresh();
+ }
+
+
+ /**
+ * Returns the item permissions as selected by the user.
+ *
+ * @return the item permissions
+ */
+ public Collection<ItemPermission> getItemPermissions()
+ {
+ Collection<ItemPermission> itemPermissions = new ArrayList<ItemPermission>();
+
+ for ( ItemPermissionWrapper itemPermissionWrapper : itemPermissionWrappers )
+ {
+ itemPermissions.add( itemPermissionWrapper.itemPermission );
+ }
+
+ return itemPermissions;
+ }
+
+
+ /**
+ *
+ * @return the item permission that is selected in the table viewer, or null.
+ */
+ private ItemPermissionWrapper getSelectedItemPermissionWrapper()
+ {
+ ItemPermissionWrapper itemPermissionWrapper = null;
+
+ IStructuredSelection selection = ( IStructuredSelection ) tableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ Object element = selection.getFirstElement();
+ if ( element instanceof ItemPermissionWrapper )
+ {
+ itemPermissionWrapper = ( ItemPermissionWrapper ) element;
+ }
+ }
+
+ return itemPermissionWrapper;
+ }
+
+
+ /**
+ * Opens the ItemPermissionDialog and adds the composed
+ * item permission to the list.
+ */
+ private void addItemPermission()
+ {
+ ItemPermissionDialog dialog = new ItemPermissionDialog( getShell(), null, context );
+ if ( dialog.open() == ItemPermissionDialog.OK && dialog.getItemPermission() != null )
+ {
+ ItemPermissionWrapper itemPermissionWrapper = new ItemPermissionWrapper( dialog.getItemPermission() );
+ itemPermissionWrappers.add( itemPermissionWrapper );
+
+ tableViewer.refresh();
+ }
+ }
+
+
+ /**
+ * Opens the ItemPermissionDialog with the currently selected
+ * item permission and puts the modified item permission into the list.
+ */
+ private void editItemPermission()
+ {
+ ItemPermissionWrapper oldItemPermissionWrapper = getSelectedItemPermissionWrapper();
+ if ( oldItemPermissionWrapper != null )
+ {
+ ItemPermissionDialog dialog = new ItemPermissionDialog( getShell(),
+ oldItemPermissionWrapper.itemPermission, context );
+ if ( dialog.open() == ItemPermissionDialog.OK )
+ {
+ oldItemPermissionWrapper.itemPermission = dialog.getItemPermission();
+ tableViewer.refresh();
+ }
+ }
+ }
+
+
+ /**
+ * Deletes the currently selected item permission from list.
+ */
+ private void deleteItemPermission()
+ {
+ ItemPermissionWrapper itemPermissionWrapper = getSelectedItemPermissionWrapper();
+ if ( itemPermissionWrapper != null )
+ {
+ itemPermissionWrappers.remove( itemPermissionWrapper );
+ tableViewer.refresh();
+ }
+ }
+
+
+ /**
+ * Called when an item permission is selected in table viewer.
+ * Updates the enabled/disabled state of the buttons.
+ */
+ private void itemPermissionSelected()
+ {
+ ItemPermissionWrapper itemPermissionWrapper = getSelectedItemPermissionWrapper();
+
+ if ( itemPermissionWrapper == null )
+ {
+ editButton.setEnabled( false );
+ deleteButton.setEnabled( false );
+ }
+ else
+ {
+ editButton.setEnabled( true );
+ deleteButton.setEnabled( true );
+ }
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java
new file mode 100644
index 0000000..46fb60f
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemProtectedItemsComposite.java
@@ -0,0 +1,546 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
+
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.directory.shared.ldap.aci.ProtectedItem;
+import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.aciitemeditor.dialogs.MultiValuedDialog;
+import org.apache.directory.studio.aciitemeditor.model.ProtectedItemWrapper;
+import org.apache.directory.studio.aciitemeditor.model.ProtectedItemWrapperFactory;
+import org.apache.directory.studio.ldapbrowser.core.internal.model.Attribute;
+import org.apache.directory.studio.ldapbrowser.core.internal.model.Value;
+import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
+import org.apache.directory.studio.ldapbrowser.core.model.IValue;
+import org.apache.directory.studio.ldapbrowser.core.model.ModelModificationException;
+import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+
+
+/**
+ * This composite contains GUI elements to edit ACI item protected items.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIItemProtectedItemsComposite extends Composite
+{
+
+ /** The context. */
+ private ACIItemValueWithContext context;
+
+ /** The inner composite for all the content */
+ private Composite composite = null;
+
+ /** The description label */
+ private Label label = null;
+
+ /** The table control for the table viewer */
+ private Table table = null;
+
+ /** The table viewer containing all protected items */
+ private CheckboxTableViewer tableViewer = null;
+
+ /** The composite containing the buttons */
+ private Composite buttonComposite = null;
+
+ /** The edit button */
+ private Button editButton = null;
+
+ /** The select all button */
+ private Button selectAllButton = null;
+
+ /** The deselect all button */
+ private Button deselectAllButton = null;
+
+ /** The reverse button */
+ private Button reverseSelectionButton = null;
+
+ /** The possible protected items, used as input for the table viewer */
+ private ProtectedItemWrapper[] protectedItemWrappers = ProtectedItemWrapperFactory.createProtectedItemWrappers();
+
+
+ /**
+ * Creates a new instance of ACIItemProtectedItemsComposite.
+ *
+ * @param parent
+ * @param style
+ */
+ public ACIItemProtectedItemsComposite( Composite parent, int style )
+ {
+ super( parent, style );
+
+ GridLayout layout = new GridLayout();
+ layout.horizontalSpacing = 0;
+ layout.verticalSpacing = 0;
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ setLayout( layout );
+
+ GridData layoutData = new GridData();
+ layoutData.horizontalAlignment = GridData.FILL;
+ layoutData.grabExcessHorizontalSpace = true;
+ layoutData.verticalAlignment = GridData.CENTER;
+ setLayoutData( layoutData );
+
+ createComposite();
+ }
+
+
+ /**
+ * This method initializes composite
+ *
+ */
+ private void createComposite()
+ {
+
+ GridData labelGridData = new GridData();
+ labelGridData.horizontalSpan = 2;
+ labelGridData.verticalAlignment = GridData.CENTER;
+ labelGridData.grabExcessHorizontalSpace = true;
+ labelGridData.horizontalAlignment = GridData.FILL;
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.makeColumnsEqualWidth = false;
+ gridLayout.numColumns = 2;
+
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.verticalSpan = 1;
+ gridData.verticalAlignment = GridData.BEGINNING;
+
+ composite = new Composite( this, SWT.NONE );
+ composite.setLayoutData( gridData );
+ composite.setLayout( gridLayout );
+
+ label = new Label( composite, SWT.NONE );
+ label.setText( Messages.getString( "ACIItemProtectedItemsComposite.description" ) ); //$NON-NLS-1$
+ label.setLayoutData( labelGridData );
+
+ createTable();
+
+ createButtonComposite();
+ }
+
+
+ /**
+ * This method initializes table and table viewer
+ *
+ */
+ private void createTable()
+ {
+ GridData tableGridData = new GridData();
+ tableGridData.grabExcessHorizontalSpace = true;
+ tableGridData.verticalAlignment = GridData.FILL;
+ tableGridData.horizontalAlignment = GridData.FILL;
+ //tableGridData.heightHint = 100;
+
+ table = new Table( composite, SWT.BORDER | SWT.CHECK );
+ table.setHeaderVisible( false );
+ table.setLayoutData( tableGridData );
+ table.setLinesVisible( false );
+ tableViewer = new CheckboxTableViewer( table );
+ tableViewer.setContentProvider( new ArrayContentProvider() );
+ tableViewer.setLabelProvider( new ProtectedItemsLabelProvider() );
+ tableViewer.setInput( protectedItemWrappers );
+
+ tableViewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ protectedItemSelected();
+ }
+ } );
+ tableViewer.addCheckStateListener( new ICheckStateListener()
+ {
+ public void checkStateChanged( CheckStateChangedEvent event )
+ {
+ protectedItemChecked();
+ }
+ } );
+ tableViewer.addDoubleClickListener( new IDoubleClickListener()
+ {
+ public void doubleClick( DoubleClickEvent event )
+ {
+ if ( editButton.isEnabled() )
+ {
+ editProtectedItem();
+ }
+ }
+ } );
+ }
+
+
+ /**
+ * This method initializes buttons
+ *
+ */
+ private void createButtonComposite()
+ {
+ GridData reverseSelectionButtonGridData = new GridData();
+ reverseSelectionButtonGridData.horizontalAlignment = GridData.FILL;
+ reverseSelectionButtonGridData.grabExcessHorizontalSpace = false;
+ reverseSelectionButtonGridData.verticalAlignment = GridData.BEGINNING;
+ reverseSelectionButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData deselectAllButtonGridData = new GridData();
+ deselectAllButtonGridData.horizontalAlignment = GridData.FILL;
+ deselectAllButtonGridData.grabExcessHorizontalSpace = false;
+ deselectAllButtonGridData.verticalAlignment = GridData.BEGINNING;
+ deselectAllButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData selectAllButtonGridData = new GridData();
+ selectAllButtonGridData.horizontalAlignment = GridData.FILL;
+ selectAllButtonGridData.grabExcessHorizontalSpace = false;
+ selectAllButtonGridData.verticalAlignment = GridData.BEGINNING;
+ selectAllButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData editButtonGridData = new GridData();
+ editButtonGridData.horizontalAlignment = GridData.FILL;
+ editButtonGridData.grabExcessHorizontalSpace = false;
+ editButtonGridData.verticalAlignment = GridData.BEGINNING;
+ editButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.marginWidth = 0;
+ gridLayout.marginHeight = 0;
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.CENTER;
+ gridData.grabExcessHorizontalSpace = false;
+ gridData.grabExcessVerticalSpace = false;
+ gridData.verticalAlignment = GridData.FILL;
+
+ buttonComposite = new Composite( composite, SWT.NONE );
+ buttonComposite.setLayoutData( gridData );
+ buttonComposite.setLayout( gridLayout );
+
+ editButton = new Button( buttonComposite, SWT.NONE );
+ editButton.setText( Messages.getString( "ACIItemProtectedItemsComposite.edit.button" ) ); //$NON-NLS-1$
+ editButton.setLayoutData( editButtonGridData );
+ editButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ editProtectedItem();
+ }
+ } );
+ editButton.setEnabled( false );
+
+ selectAllButton = new Button( buttonComposite, SWT.NONE );
+ selectAllButton.setText( Messages.getString( "ACIItemProtectedItemsComposite.selectAll.button" ) ); //$NON-NLS-1$
+ selectAllButton.setLayoutData( selectAllButtonGridData );
+ selectAllButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ tableViewer.setCheckedElements( protectedItemWrappers );
+ refreshTable();
+ }
+ } );
+
+ deselectAllButton = new Button( buttonComposite, SWT.NONE );
+ deselectAllButton.setText( Messages.getString( "ACIItemProtectedItemsComposite.deselectAll.button" ) ); //$NON-NLS-1$
+ deselectAllButton.setLayoutData( deselectAllButtonGridData );
+ deselectAllButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ tableViewer.setCheckedElements( new ProtectedItem[0] );
+ refreshTable();
+ }
+ } );
+
+ reverseSelectionButton = new Button( buttonComposite, SWT.NONE );
+ reverseSelectionButton.setText( Messages.getString( "ACIItemProtectedItemsComposite.revers.button" ) ); //$NON-NLS-1$
+ reverseSelectionButton.setLayoutData( reverseSelectionButtonGridData );
+ reverseSelectionButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ List<Object> elements = new ArrayList<Object>();
+ elements.addAll( Arrays.asList( protectedItemWrappers ) );
+ elements.removeAll( Arrays.asList( tableViewer.getCheckedElements() ) );
+ tableViewer.setCheckedElements( elements.toArray() );
+ refreshTable();
+ }
+ } );
+
+ }
+
+ /**
+ * The label provider used for this table viewer.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class ProtectedItemsLabelProvider extends LabelProvider
+ {
+
+ /**
+ * Returns the error icon if the protected item is checked and invalid.
+ *
+ * @param element the element
+ *
+ * @return the image
+ */
+ public Image getImage( Object element )
+ {
+ if ( element instanceof ProtectedItemWrapper )
+ {
+ ProtectedItemWrapper wrapper = ( ProtectedItemWrapper ) element;
+ if ( tableViewer.getChecked( wrapper ) )
+ {
+ try
+ {
+ wrapper.getProtectedItem();
+ }
+ catch ( ParseException e )
+ {
+ return Activator.getDefault().getImage(
+ Messages.getString( "ACIItemProtectedItemsComposite.error.icon" ) ); //$NON-NLS-1$
+ }
+ }
+ }
+
+ return null;
+ }
+ }
+
+
+ /**
+ * Sets the context.
+ *
+ * @param context the context
+ */
+ public void setContext( ACIItemValueWithContext context )
+ {
+ this.context = context;
+ }
+
+
+ /**
+ * Sets the protected items.
+ *
+ * @param protectedItems
+ */
+ public void setProtectedItems( Collection<ProtectedItem> protectedItems )
+ {
+ // reset first
+ for ( ProtectedItemWrapper protectedItemWrapper : protectedItemWrappers )
+ {
+ tableViewer.setChecked( protectedItemWrapper, false );
+ }
+
+ for ( ProtectedItem item : protectedItems )
+ {
+ for ( ProtectedItemWrapper protectedItemWrapper : protectedItemWrappers )
+ {
+
+ if ( protectedItemWrapper.getClazz() == item.getClass() )
+ {
+ protectedItemWrapper.setProtectedItem( item );
+ tableViewer.setChecked( protectedItemWrapper, true );
+ }
+ }
+ }
+
+ refreshTable();
+ }
+
+
+ /**
+ * Returns the protected items as selected by the user.
+ *
+ * @return the protected items
+ * @throws ParseException if the protected items or its values are not valid.
+ */
+ public Collection<ProtectedItem> getProtectedItems() throws ParseException
+ {
+
+ Collection<ProtectedItem> protectedItems = new ArrayList<ProtectedItem>();
+
+ for ( ProtectedItemWrapper protectedItemWrapper : protectedItemWrappers )
+ {
+ if ( tableViewer.getChecked( protectedItemWrapper ) )
+ {
+ ProtectedItem protectedItem = protectedItemWrapper.getProtectedItem();
+ protectedItems.add( protectedItem );
+ }
+ }
+
+ return protectedItems;
+ }
+
+
+ /**
+ * Shows or hides this composite.
+ *
+ * @param visible true if visible
+ */
+ public void setVisible( boolean visible )
+ {
+ super.setVisible( visible );
+ ( ( GridData ) getLayoutData() ).heightHint = visible ? -1 : 0;
+ }
+
+
+ /**
+ *
+ * @return the protected item that is selected in the table viewer, or null.
+ */
+ private ProtectedItemWrapper getSelectedProtectedItemWrapper()
+ {
+ ProtectedItemWrapper protectedItemWrapper = null;
+
+ IStructuredSelection selection = ( IStructuredSelection ) tableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ Object element = selection.getFirstElement();
+ if ( element instanceof ProtectedItemWrapper )
+ {
+ protectedItemWrapper = ( ProtectedItemWrapper ) element;
+ }
+ }
+
+ return protectedItemWrapper;
+ }
+
+
+ /**
+ * Called, when a protected item is selected in the table viewer.
+ * - enables/disables the edit button
+ *
+ */
+ private void protectedItemSelected()
+ {
+ ProtectedItemWrapper protectedItemWrapper = getSelectedProtectedItemWrapper();
+
+ if ( protectedItemWrapper == null || !protectedItemWrapper.isEditable() )
+ {
+ editButton.setEnabled( false );
+ }
+ else
+ {
+ editButton.setEnabled( true );
+ }
+ }
+
+
+ /**
+ * Called, when a protected item checkbox is checked or unchecked.
+ */
+ private void protectedItemChecked()
+ {
+ refreshTable();
+ }
+
+
+ /**
+ * Called, when pushing the edit button. Opens the text editor.
+ *
+ */
+ private void editProtectedItem()
+ {
+ ProtectedItemWrapper protectedItemWrapper = getSelectedProtectedItemWrapper();
+
+ AbstractDialogStringValueEditor valueEditor = protectedItemWrapper.getValueEditor();
+ if ( valueEditor != null )
+ {
+ if ( protectedItemWrapper.isMultivalued() )
+ {
+ MultiValuedDialog dialog = new MultiValuedDialog( getShell(), protectedItemWrapper.getDisplayName(),
+ protectedItemWrapper.getValues(), context, valueEditor );
+ dialog.open();
+ refreshTable();
+ }
+ else
+ {
+ List<String> values = protectedItemWrapper.getValues();
+ String oldValue = values.isEmpty() ? null : values.get( 0 );
+ if ( oldValue == null )
+ {
+ oldValue = ""; //$NON-NLS-1$
+ }
+
+ try
+ {
+ IAttribute attribute = new Attribute( context.getEntry(), "" ); //$NON-NLS-1$
+ IValue value = new Value( attribute, oldValue ); //$NON-NLS-1$
+ Object oldRawValue = valueEditor.getRawValue( value ); //$NON-NLS-1$
+
+ CellEditor cellEditor = valueEditor.getCellEditor();
+ cellEditor.setValue( oldRawValue );
+ cellEditor.activate();
+ Object newRawValue = cellEditor.getValue();
+
+ if ( newRawValue != null )
+ {
+ String newValue = ( String ) valueEditor.getStringOrBinaryValue( newRawValue );
+
+ values.clear();
+ values.add( newValue );
+ tableViewer.refresh();
+ }
+ }
+ catch ( ModelModificationException e )
+ {
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Refreshes the table viewer.
+ */
+ private void refreshTable()
+ {
+ tableViewer.refresh();
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
new file mode 100644
index 0000000..cd3eae4
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemSourceEditorComposite.java
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
+
+
+import java.text.ParseException;
+
+import org.apache.directory.shared.ldap.aci.ACIItem;
+import org.apache.directory.shared.ldap.aci.ACIItemParser;
+import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.aciitemeditor.sourceeditor.ACISourceViewerConfiguration;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * This composite contains the source editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIItemSourceEditorComposite extends Composite
+{
+
+ /** The source editor */
+ private SourceViewer sourceEditor;
+
+ /** The source editor configuration. */
+ private SourceViewerConfiguration configuration;
+
+
+ /**
+ * Creates a new instance of ACIItemSourceEditorComposite.
+ *
+ * @param parent
+ * @param style
+ */
+ public ACIItemSourceEditorComposite( Composite parent, int style )
+ {
+ super( parent, style );
+ setLayout( new FillLayout() );
+
+ createSourceEditor();
+ }
+
+
+ /**
+ * Creates and configures the source editor.
+ *
+ */
+ private void createSourceEditor()
+ {
+ // create source editor
+ sourceEditor = new SourceViewer( this, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL );
+
+ // setup basic configuration
+ configuration = new ACISourceViewerConfiguration();
+ sourceEditor.configure( configuration );
+
+ // set text font
+ Font font = JFaceResources.getFont( JFaceResources.TEXT_FONT );
+ sourceEditor.getTextWidget().setFont( font );
+
+ // setup document
+ IDocument document = new Document();
+ sourceEditor.setDocument( document );
+ }
+
+
+ /**
+ * Sets the input to the source editor.
+ * A syntax check is performed before setting the input, an
+ * invalid syntax causes a ParseException.
+ *
+ * @param input the valid string representation of the ACI item
+ * @throws ParseException it the syntax check fails.
+ */
+ public void setInput( String input ) throws ParseException
+ {
+ ACIItemParser parser = Activator.getDefault().getACIItemParser();
+ parser.parse( input );
+
+ forceSetInput( input );
+ }
+
+
+ /**
+ * Set the input to the source editor without a syntax check.
+ *
+ * @param input The string representation of the ACI item, may be invalid
+ */
+ public void forceSetInput( String input )
+ {
+ sourceEditor.getDocument().set( input );
+
+ // format
+ IRegion region = new Region( 0, sourceEditor.getDocument().getLength() );
+ configuration.getContentFormatter( sourceEditor ).format( sourceEditor.getDocument(), region );
+
+ }
+
+
+ /**
+ * Returns the string representation of the ACI item.
+ * A syntax check is performed before returning the input, an
+ * invalid syntax causes a ParseException.
+ *
+ * @return the valid string representation of the ACI item
+ * @throws ParseException it the syntax check fails.
+ */
+ public String getInput() throws ParseException
+ {
+ String input = forceGetInput();
+
+ // strip new lines
+ input = input.replaceAll( "\\n", " " ); //$NON-NLS-1$ //$NON-NLS-2$
+ input = input.replaceAll( "\\r", " " ); //$NON-NLS-1$ //$NON-NLS-2$
+
+ ACIItemParser parser = Activator.getDefault().getACIItemParser();
+ ACIItem aciItem = parser.parse( input );
+
+ StringBuffer buffer = new StringBuffer();
+ if ( aciItem != null )
+ {
+ aciItem.printToBuffer( buffer );
+ }
+ return buffer.toString();
+ }
+
+
+ /**
+ * Returns the string representation of the ACI item without syntax check.
+ * In other words only the text in the source editor is returned.
+ *
+ * @return the string representation of the ACI item, may be invalid
+ */
+ public String forceGetInput()
+ {
+ return sourceEditor.getDocument().get();
+ }
+
+
+ /**
+ * Sets the context.
+ *
+ * @param context the context
+ */
+ public void setContext( ACIItemValueWithContext context )
+ {
+
+ }
+
+
+ /**
+ * Formats the content.
+ */
+ public void format()
+ {
+ IRegion region = new Region( 0, sourceEditor.getDocument().getLength() );
+ configuration.getContentFormatter( sourceEditor ).format( sourceEditor.getDocument(), region );
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemTabFolderComposite.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemTabFolderComposite.java
new file mode 100644
index 0000000..8ca3383
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemTabFolderComposite.java
@@ -0,0 +1,296 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
+
+
+import java.text.ParseException;
+
+import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+
+
+/**
+ * This composite contains the tabs with visual and source editor.
+ * It also manages the synchronization between these two tabs.
+ *
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIItemTabFolderComposite extends Composite
+{
+
+ /** The index of the visual tab */
+ public static final int VISUAL_TAB_INDEX = 0;
+
+ /** The index of the source tab */
+ public static final int SOURCE_TAB_INDEX = 1;
+
+ /** The tab folder */
+ private TabFolder tabFolder;
+
+ /** The visual tab */
+ private TabItem visualTab;
+
+ /** The inner container of the visual tab */
+ private Composite visualContainer;
+
+ /** The visual editor composite */
+ private ACIItemVisualEditorComposite visualComposite;
+
+ /** Tehe source tab */
+ private TabItem sourceTab;
+
+ /** The inner container of the visual tab */
+ private Composite sourceContainer;
+
+ /** The source editor composite */
+ private ACIItemSourceEditorComposite sourceComposite;
+
+
+ /**
+ * Creates a new instance of TabFolderComposite.
+ *
+ * @param parent
+ * @param style
+ */
+ public ACIItemTabFolderComposite( Composite parent, int style )
+ {
+ super( parent, style );
+ setLayoutData( new GridData( GridData.FILL_BOTH ) );
+ GridLayout layout = new GridLayout( 1, false );
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ setLayout( layout );
+
+ createTabFolder();
+
+ createVisualTab();
+
+ createSourceTab();
+
+ initListeners();
+ }
+
+
+ /**
+ * Initializes the listeners.
+ *
+ */
+ private void initListeners()
+ {
+ tabFolder.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ tabSelected();
+ }
+ } );
+ }
+
+
+ /**
+ * Creates the source tab and configures the source editor.
+ *
+ */
+ private void createSourceTab()
+ {
+ // create inner container
+ sourceContainer = new Composite( tabFolder, SWT.BORDER );
+ sourceContainer.setLayout( new FillLayout() );
+
+ // create source editor
+ sourceComposite = new ACIItemSourceEditorComposite( sourceContainer, SWT.NONE );
+
+ // create tab
+ sourceTab = new TabItem( tabFolder, SWT.NONE, SOURCE_TAB_INDEX );
+ sourceTab.setText( Messages.getString( "ACIItemTabFolderComposite.source.tab" ) ); //$NON-NLS-1$
+ sourceTab.setControl( sourceContainer );
+ }
+
+
+ /**
+ * Creates the visual tab and the GUI editor.
+ *
+ */
+ private void createVisualTab()
+ {
+ // create inner container
+ visualContainer = new Composite( tabFolder, SWT.NONE );
+ visualContainer.setLayout( new FillLayout() );
+
+ // create the visual ACIItem composite
+ visualComposite = new ACIItemVisualEditorComposite( visualContainer, SWT.NONE );
+
+ // create tab
+ visualTab = new TabItem( tabFolder, SWT.NONE, VISUAL_TAB_INDEX );
+ visualTab.setText( Messages.getString( "ACIItemTabFolderComposite.visual.tab" ) ); //$NON-NLS-1$
+ visualTab.setControl( visualContainer );
+ }
+
+
+ /**
+ * Creates the tab folder and the listeners.
+ *
+ */
+ private void createTabFolder()
+ {
+ tabFolder = new TabFolder( this, SWT.TOP );
+ GridLayout mainLayout = new GridLayout();
+ mainLayout.marginWidth = 0;
+ mainLayout.marginHeight = 0;
+ tabFolder.setLayout( mainLayout );
+ tabFolder.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+ }
+
+
+ /**
+ * Called, when a tab is selected. This method manages the synchronization
+ * between visual and source editor.
+ */
+ private void tabSelected()
+ {
+ int index = tabFolder.getSelectionIndex();
+
+ if ( index == SOURCE_TAB_INDEX )
+ {
+ // switched to source tab: serialize visual and set to source
+ // on parse error: print message and return to visual tab
+ try
+ {
+ String input = visualComposite.getInput();
+ sourceComposite.setInput( input );
+ }
+ catch ( ParseException pe )
+ {
+ IStatus status = new Status( IStatus.ERROR, Activator.PLUGIN_ID, 1, Messages
+ .getString( "ACIItemTabFolderComposite.error.onVisualEditor" ), pe ); //$NON-NLS-1$
+ ErrorDialog.openError( getShell(),
+ Messages.getString( "ACIItemTabFolderComposite.error.title" ), null, status ); //$NON-NLS-1$
+ tabFolder.setSelection( VISUAL_TAB_INDEX );
+ }
+ }
+ else if ( index == VISUAL_TAB_INDEX )
+ {
+ // switched to visual tab: parse source and populate to visual
+ // on parse error: print message and return to source tab
+ try
+ {
+ String input = sourceComposite.getInput();
+ visualComposite.setInput( input );
+ }
+ catch ( ParseException pe )
+ {
+ IStatus status = new Status( IStatus.ERROR, Activator.PLUGIN_ID, 1, Messages
+ .getString( "ACIItemTabFolderComposite.error.onSourceEditor" ), pe ); //$NON-NLS-1$
+ ErrorDialog.openError( getShell(),
+ Messages.getString( "ACIItemTabFolderComposite.error.title" ), null, status ); //$NON-NLS-1$
+ tabFolder.setSelection( SOURCE_TAB_INDEX );
+ }
+ }
+ }
+
+
+ /**
+ * Sets the input to both the source editor and to the visual editor.
+ * If the syntax is invalid the source editor is activated.
+ *
+ * @param input The string representation of the ACI item
+ */
+ public void setInput( String input )
+ {
+ // set input to source editor
+ sourceComposite.forceSetInput( input );
+
+ // set input to visual editor, on parse error switch to source editor
+ try
+ {
+ visualComposite.setInput( input );
+ }
+ catch ( ParseException pe )
+ {
+ IStatus status = new Status( IStatus.ERROR, Activator.PLUGIN_ID, 1, Messages
+ .getString( "ACIItemTabFolderComposite.error.onInput" ), pe ); //$NON-NLS-1$
+ ErrorDialog.openError( getShell(),
+ Messages.getString( "ACIItemTabFolderComposite.error.title" ), null, status ); //$NON-NLS-1$
+
+ tabFolder.setSelection( SOURCE_TAB_INDEX );
+ }
+ }
+
+
+ /**
+ * Returns the string representation of the ACI item.
+ * A syntax check is performed before returning the input, an
+ * invalid syntax causes a ParseException.
+ *
+ * @return the valid string representation of the ACI item
+ * @throws ParseException it the syntax check fails.
+ */
+ public String getInput() throws ParseException
+ {
+ int index = tabFolder.getSelectionIndex();
+ if ( index == VISUAL_TAB_INDEX )
+ {
+ String input = visualComposite.getInput();
+ return input;
+ }
+ else
+ {
+ String input = sourceComposite.getInput();
+ return input;
+ }
+ }
+
+
+ /**
+ * Sets the context.
+ *
+ * @param context the context
+ */
+ public void setContext( ACIItemValueWithContext context )
+ {
+ sourceComposite.setContext( context );
+ visualComposite.setContext( context );
+ }
+
+
+ /**
+ * Formats the content.
+ */
+ public void format()
+ {
+ sourceComposite.format();
+ //visualComposite.format();
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemUserClassesComposite.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemUserClassesComposite.java
new file mode 100644
index 0000000..64f3c70
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemUserClassesComposite.java
@@ -0,0 +1,503 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
+
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.directory.shared.ldap.aci.ProtectedItem;
+import org.apache.directory.shared.ldap.aci.UserClass;
+import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.aciitemeditor.dialogs.MultiValuedDialog;
+import org.apache.directory.studio.aciitemeditor.model.UserClassWrapper;
+import org.apache.directory.studio.aciitemeditor.model.UserClassWrapperFactory;
+import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+
+
+/**
+ * This composite contains GUI elements to edit ACI item user classes.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIItemUserClassesComposite extends Composite
+{
+
+ /** The context. */
+ private ACIItemValueWithContext context;
+
+ /** The inner composite for all the content */
+ private Composite composite = null;
+
+ /** The description label */
+ private Label label = null;
+
+ /** The table control for the table viewer */
+ private Table table = null;
+
+ /** The table viewer containing all user classes */
+ private CheckboxTableViewer tableViewer = null;
+
+ /** The composite containing the buttons */
+ private Composite buttonComposite = null;
+
+ /** The edit button */
+ private Button editButton = null;
+
+ /** The select all button */
+ private Button selectAllButton = null;
+
+ /** The deselect all button */
+ private Button deselectAllButton = null;
+
+ /** The reverse button */
+ private Button reverseSelectionButton = null;
+
+ /** The possible user classes, used as input for the table viewer */
+ private UserClassWrapper[] userClassWrappers = UserClassWrapperFactory.createUserClassWrappers();
+
+
+ /**
+ * Creates a new instance of ACIItemUserClassesComposite.
+ *
+ * @param parent
+ * @param style
+ */
+ public ACIItemUserClassesComposite( Composite parent, int style )
+ {
+ super( parent, style );
+
+ GridLayout layout = new GridLayout();
+ layout.horizontalSpacing = 0;
+ layout.verticalSpacing = 0;
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ setLayout( layout );
+
+ GridData layoutData = new GridData();
+ layoutData.horizontalAlignment = GridData.FILL;
+ layoutData.grabExcessHorizontalSpace = true;
+ layoutData.verticalAlignment = GridData.CENTER;
+ setLayoutData( layoutData );
+
+ createComposite();
+ }
+
+
+ /**
+ * This method initializes composite
+ *
+ */
+ private void createComposite()
+ {
+
+ GridData labelGridData = new GridData();
+ labelGridData.horizontalSpan = 2;
+ labelGridData.verticalAlignment = GridData.CENTER;
+ labelGridData.grabExcessHorizontalSpace = true;
+ labelGridData.horizontalAlignment = GridData.FILL;
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.makeColumnsEqualWidth = false;
+ gridLayout.numColumns = 2;
+
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.verticalSpan = 1;
+ gridData.verticalAlignment = GridData.BEGINNING;
+
+ composite = new Composite( this, SWT.NONE );
+ composite.setLayoutData( gridData );
+ composite.setLayout( gridLayout );
+
+ label = new Label( composite, SWT.NONE );
+ label.setText( Messages.getString( "ACIItemUserClassesComposite.description" ) ); //$NON-NLS-1$
+ label.setLayoutData( labelGridData );
+
+ createTable();
+
+ createButtonComposite();
+ }
+
+
+ /**
+ * This method initializes table and table viewer
+ *
+ */
+ private void createTable()
+ {
+ GridData tableGridData = new GridData();
+ tableGridData.grabExcessHorizontalSpace = true;
+ tableGridData.verticalAlignment = GridData.FILL;
+ tableGridData.horizontalAlignment = GridData.FILL;
+ //tableGridData.heightHint = 100;
+
+ table = new Table( composite, SWT.BORDER | SWT.CHECK );
+ table.setHeaderVisible( false );
+ table.setLayoutData( tableGridData );
+ table.setLinesVisible( false );
+ tableViewer = new CheckboxTableViewer( table );
+ tableViewer.setContentProvider( new ArrayContentProvider() );
+ tableViewer.setLabelProvider( new UserClassesLabelProvider() );
+ tableViewer.setInput( userClassWrappers );
+
+ tableViewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ userClassSelected();
+ }
+ } );
+ tableViewer.addCheckStateListener( new ICheckStateListener()
+ {
+ public void checkStateChanged( CheckStateChangedEvent event )
+ {
+ userClassChecked();
+ }
+ } );
+ tableViewer.addDoubleClickListener( new IDoubleClickListener()
+ {
+ public void doubleClick( DoubleClickEvent event )
+ {
+ if ( editButton.isEnabled() )
+ {
+ editUserClass();
+ }
+ }
+ } );
+ }
+
+
+ /**
+ * This method initializes buttons
+ *
+ */
+ private void createButtonComposite()
+ {
+ GridData reverseSelectionButtonGridData = new GridData();
+ reverseSelectionButtonGridData.horizontalAlignment = GridData.FILL;
+ reverseSelectionButtonGridData.grabExcessHorizontalSpace = false;
+ reverseSelectionButtonGridData.verticalAlignment = GridData.BEGINNING;
+ reverseSelectionButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData deselectAllButtonGridData = new GridData();
+ deselectAllButtonGridData.horizontalAlignment = GridData.FILL;
+ deselectAllButtonGridData.grabExcessHorizontalSpace = false;
+ deselectAllButtonGridData.verticalAlignment = GridData.BEGINNING;
+ deselectAllButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData selectAllButtonGridData = new GridData();
+ selectAllButtonGridData.horizontalAlignment = GridData.FILL;
+ selectAllButtonGridData.grabExcessHorizontalSpace = false;
+ selectAllButtonGridData.verticalAlignment = GridData.BEGINNING;
+ selectAllButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData editButtonGridData = new GridData();
+ editButtonGridData.horizontalAlignment = GridData.FILL;
+ editButtonGridData.grabExcessHorizontalSpace = false;
+ editButtonGridData.verticalAlignment = GridData.BEGINNING;
+ editButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.marginWidth = 0;
+ gridLayout.marginHeight = 0;
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.CENTER;
+ gridData.grabExcessHorizontalSpace = false;
+ gridData.grabExcessVerticalSpace = false;
+ gridData.verticalAlignment = GridData.FILL;
+
+ buttonComposite = new Composite( composite, SWT.NONE );
+ buttonComposite.setLayoutData( gridData );
+ buttonComposite.setLayout( gridLayout );
+
+ editButton = new Button( buttonComposite, SWT.NONE );
+ editButton.setText( Messages.getString( "ACIItemUserClassesComposite.edit.button" ) ); //$NON-NLS-1$
+ editButton.setLayoutData( editButtonGridData );
+ editButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ editUserClass();
+ }
+ } );
+ editButton.setEnabled( false );
+
+ selectAllButton = new Button( buttonComposite, SWT.NONE );
+ selectAllButton.setText( Messages.getString( "ACIItemUserClassesComposite.selectAll.button" ) ); //$NON-NLS-1$
+ selectAllButton.setLayoutData( selectAllButtonGridData );
+ selectAllButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ tableViewer.setCheckedElements( userClassWrappers );
+ refreshTable();
+ }
+ } );
+
+ deselectAllButton = new Button( buttonComposite, SWT.NONE );
+ deselectAllButton.setText( Messages.getString( "ACIItemUserClassesComposite.deselectAll.button" ) ); //$NON-NLS-1$
+ deselectAllButton.setLayoutData( deselectAllButtonGridData );
+ deselectAllButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ tableViewer.setCheckedElements( new ProtectedItem[0] );
+ refreshTable();
+ }
+ } );
+
+ reverseSelectionButton = new Button( buttonComposite, SWT.NONE );
+ reverseSelectionButton.setText( Messages.getString( "ACIItemUserClassesComposite.revert.buton" ) ); //$NON-NLS-1$
+ reverseSelectionButton.setLayoutData( reverseSelectionButtonGridData );
+ reverseSelectionButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ List<Object> elements = new ArrayList<Object>();
+ elements.addAll( Arrays.asList( userClassWrappers ) );
+ elements.removeAll( Arrays.asList( tableViewer.getCheckedElements() ) );
+ tableViewer.setCheckedElements( elements.toArray() );
+ refreshTable();
+ }
+ } );
+
+ }
+
+ /**
+ * The label provider used for this table viewer.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class UserClassesLabelProvider extends LabelProvider
+ {
+
+ /**
+ * Returns the error icon if the user class is checked and invalid.
+ *
+ * @param element the element
+ *
+ * @return the image
+ */
+ public Image getImage( Object element )
+ {
+ if ( element instanceof UserClassWrapper )
+ {
+ UserClassWrapper wrapper = ( UserClassWrapper ) element;
+ if ( tableViewer.getChecked( wrapper ) )
+ {
+ try
+ {
+ wrapper.getUserClass();
+ }
+ catch ( ParseException e )
+ {
+ return Activator.getDefault().getImage(
+ Messages.getString( "ACIItemUserClassesComposite.error.icon" ) ); //$NON-NLS-1$
+ }
+ }
+ }
+
+ return null;
+ }
+ }
+
+
+ /**
+ * Sets the context.
+ *
+ * @param context the context
+ */
+ public void setContext( ACIItemValueWithContext context )
+ {
+ this.context = context;
+ }
+
+
+ /**
+ * Sets the user classes.
+ *
+ * @param userClasses the user classes
+ */
+ public void setUserClasses( Collection<UserClass> userClasses )
+ {
+ // reset first
+ for ( UserClassWrapper userClassWrapper : userClassWrappers )
+ {
+ tableViewer.setChecked( userClassWrapper, false );
+ }
+
+ for ( UserClass userClass : userClasses )
+ {
+ for ( UserClassWrapper userClassWrapper : userClassWrappers )
+ {
+ if ( userClassWrapper.getClazz() == userClass.getClass() )
+ {
+ userClassWrapper.setUserClass( userClass );
+ tableViewer.setChecked( userClassWrapper, true );
+ }
+ }
+ }
+
+ refreshTable();
+ }
+
+
+ /**
+ * Returns the user classes as selected by the user.
+ *
+ * @return the user classes
+ * @throws ParseException if the user classes or its values are not valid.
+ */
+ public Collection<UserClass> getUserClasses() throws ParseException
+ {
+ Collection<UserClass> userClasses = new ArrayList<UserClass>();
+
+ for ( UserClassWrapper userClassWrapper : userClassWrappers )
+ {
+ if ( tableViewer.getChecked( userClassWrapper ) )
+ {
+ UserClass userClass = userClassWrapper.getUserClass();
+ userClasses.add( userClass );
+ }
+ }
+
+ return userClasses;
+ }
+
+
+ /**
+ * Shows or hides this composite.
+ *
+ * @param visible true if visible
+ */
+ public void setVisible( boolean visible )
+ {
+ super.setVisible( visible );
+ ( ( GridData ) getLayoutData() ).heightHint = visible ? -1 : 0;
+ }
+
+
+ /**
+ *
+ * @return the user class that is selected in the table viewer, or null.
+ */
+ private UserClassWrapper getSelectedUserClassWrapper()
+ {
+ UserClassWrapper userClassWrapper = null;
+
+ IStructuredSelection selection = ( IStructuredSelection ) tableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ Object element = selection.getFirstElement();
+ if ( element instanceof UserClassWrapper )
+ {
+ userClassWrapper = ( UserClassWrapper ) element;
+ }
+ }
+
+ return userClassWrapper;
+ }
+
+
+ /**
+ * Called, when a user class is selected in the table viewer.
+ * - enables/disables the edit button
+ *
+ */
+ private void userClassSelected()
+ {
+ UserClassWrapper userClassWrapper = getSelectedUserClassWrapper();
+
+ if ( userClassWrapper == null || !userClassWrapper.isEditable() )
+ {
+ editButton.setEnabled( false );
+ }
+ else
+ {
+ editButton.setEnabled( true );
+ }
+ }
+
+
+ /**
+ * Called, when a user class checkbox is checked or unchecked.
+ *
+ */
+ private void userClassChecked()
+ {
+ refreshTable();
+ }
+
+
+ /**
+ * Called, when pushing the edit button. Opens the editor.
+ */
+ private void editUserClass()
+ {
+ UserClassWrapper userClassWrapper = getSelectedUserClassWrapper();
+
+ AbstractDialogStringValueEditor editor = userClassWrapper.getValueEditor();
+ if ( editor != null )
+ {
+ MultiValuedDialog dialog = new MultiValuedDialog( getShell(), userClassWrapper.getDisplayName(),
+ userClassWrapper.getValues(), context, editor );
+ dialog.open();
+ refreshTable();
+ }
+ }
+
+
+ /**
+ * Refreshes the table viewer.
+ */
+ private void refreshTable()
+ {
+ tableViewer.refresh();
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java
new file mode 100644
index 0000000..6a4dce5
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemUserPermissionsComposite.java
@@ -0,0 +1,512 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.directory.shared.ldap.aci.GrantAndDenial;
+import org.apache.directory.shared.ldap.aci.ProtectedItem;
+import org.apache.directory.shared.ldap.aci.UserPermission;
+import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
+import org.apache.directory.studio.aciitemeditor.Activator;
+import org.apache.directory.studio.aciitemeditor.dialogs.UserPermissionDialog;
+import org.apache.directory.studio.aciitemeditor.model.ProtectedItemWrapper;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+
+
+/**
+ * This composite contains GUI elements to add, edit and delete ACI user permissions.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIItemUserPermissionsComposite extends Composite
+{
+
+ /** The context. */
+ private ACIItemValueWithContext context;
+
+ /** The inner composite for all the content */
+ private Composite composite = null;
+
+ /** The description label */
+ private Label label = null;
+
+ /** The table control for the table viewer */
+ private Table table = null;
+
+ /** The table viewer containing all user classes */
+ private TableViewer tableViewer = null;
+
+ /** The composite containing the buttons */
+ private Composite buttonComposite = null;
+
+ /** The add button */
+ private Button addButton = null;
+
+ /** The edit button */
+ private Button editButton = null;
+
+ /** The delete button */
+ private Button deleteButton = null;
+
+ /** The selected user permissions, also input of the table viewer */
+ List<UserPermissionWrapper> userPermissionWrappers = new ArrayList<UserPermissionWrapper>();
+
+ /**
+ * UserPermissionWrapper are used as input of the table viewer.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class UserPermissionWrapper
+ {
+ /** The user permission bean. */
+ private UserPermission userPermission;
+
+
+ /**
+ * Creates a new instance of UserPermissionWrapper.
+ *
+ * @param userPermission the user permission
+ */
+ public UserPermissionWrapper( UserPermission userPermission )
+ {
+ this.userPermission = userPermission;
+ }
+
+
+ /**
+ * Returns a user-friedly string, displayed in the table.
+ *
+ * @return the string
+ */
+ public String toString()
+ {
+ if ( userPermission == null )
+ {
+ return "<UNKNOWN>"; //$NON-NLS-1$
+ }
+ else
+ {
+ StringBuffer buffer = new StringBuffer();
+ if ( userPermission.getPrecedence() > -1 )
+ {
+ buffer.append( '(' );
+ buffer.append( userPermission.getPrecedence() );
+ buffer.append( ')' );
+ buffer.append( ' ' );
+ }
+ for ( Iterator<ProtectedItem> it = ( ( Collection<ProtectedItem> ) userPermission.getProtectedItems() )
+ .iterator(); it.hasNext(); )
+ {
+ ProtectedItem item = it.next();
+ String s = ProtectedItemWrapper.classToDisplayMap.get( item.getClass() );
+ buffer.append( s );
+
+ if ( it.hasNext() )
+ {
+ buffer.append( ',' );
+ }
+ }
+ buffer.append( ':' );
+ buffer.append( ' ' );
+ for ( Iterator<GrantAndDenial> it = ( ( Collection<GrantAndDenial> ) userPermission
+ .getGrantsAndDenials() ).iterator(); it.hasNext(); )
+ {
+ GrantAndDenial gd = it.next();
+ buffer.append( gd.isGrant() ? '+' : '-' );
+ buffer.append( gd.getMicroOperation().getName() );
+
+ if ( it.hasNext() )
+ {
+ buffer.append( ',' );
+ }
+ }
+
+ String s = buffer.toString();
+ s = s.replace( '\r', ' ' );
+ s = s.replace( '\n', ' ' );
+ if ( s.length() > 50 )
+ {
+ String temp = s;
+ s = temp.substring( 0, 25 );
+ s = s + "..."; //$NON-NLS-1$
+ s = s + temp.substring( temp.length() - 25, temp.length() );
+ }
+ return s;
+ }
+ }
+ }
+
+
+ /**
+ * Creates a new instance of ACIItemUserPermissionsComposite.
+ *
+ * @param parent
+ * @param style
+ */
+ public ACIItemUserPermissionsComposite( Composite parent, int style )
+ {
+ super( parent, style );
+
+ GridLayout layout = new GridLayout();
+ layout.horizontalSpacing = 0;
+ layout.verticalSpacing = 0;
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ setLayout( layout );
+
+ GridData layoutData = new GridData();
+ layoutData.horizontalAlignment = GridData.FILL;
+ layoutData.grabExcessHorizontalSpace = true;
+ layoutData.verticalAlignment = GridData.CENTER;
+ setLayoutData( layoutData );
+
+ createComposite();
+ }
+
+
+ /**
+ * This method initializes composite
+ *
+ */
+ private void createComposite()
+ {
+
+ GridData labelGridData = new GridData();
+ labelGridData.horizontalSpan = 2;
+ labelGridData.verticalAlignment = GridData.CENTER;
+ labelGridData.grabExcessHorizontalSpace = true;
+ labelGridData.horizontalAlignment = GridData.FILL;
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.makeColumnsEqualWidth = false;
+ gridLayout.numColumns = 2;
+
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.verticalSpan = 1;
+ gridData.verticalAlignment = GridData.BEGINNING;
+
+ composite = new Composite( this, SWT.NONE );
+ composite.setLayoutData( gridData );
+ composite.setLayout( gridLayout );
+
+ label = new Label( composite, SWT.NONE );
+ label.setText( Messages.getString( "ACIItemUserPermissionsComposite.descripton" ) ); //$NON-NLS-1$
+ label.setLayoutData( labelGridData );
+
+ createTable();
+
+ createButtonComposite();
+ }
+
+
+ /**
+ * This method initializes table and table viewer
+ *
+ */
+ private void createTable()
+ {
+ GridData tableGridData = new GridData();
+ tableGridData.grabExcessHorizontalSpace = true;
+ tableGridData.verticalAlignment = GridData.FILL;
+ tableGridData.horizontalAlignment = GridData.FILL;
+ //tableGridData.heightHint = 100;
+
+ table = new Table( composite, SWT.BORDER );
+ table.setHeaderVisible( false );
+ table.setLayoutData( tableGridData );
+ table.setLinesVisible( false );
+ tableViewer = new TableViewer( table );
+ tableViewer.setContentProvider( new ArrayContentProvider() );
+ tableViewer.setLabelProvider( new LabelProvider() );
+ tableViewer.setInput( userPermissionWrappers );
+
+ tableViewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ userPermissionSelected();
+ }
+ } );
+
+ tableViewer.addDoubleClickListener( new IDoubleClickListener()
+ {
+ public void doubleClick( DoubleClickEvent event )
+ {
+ editUserPermission();
+ }
+ } );
+ }
+
+
+ /**
+ * This method initializes buttons
+ *
+ */
+ private void createButtonComposite()
+ {
+ GridData deleteButtonGridData = new GridData();
+ deleteButtonGridData.horizontalAlignment = GridData.FILL;
+ deleteButtonGridData.grabExcessHorizontalSpace = false;
+ deleteButtonGridData.verticalAlignment = GridData.BEGINNING;
+ deleteButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData editButtonGridData = new GridData();
+ editButtonGridData.horizontalAlignment = GridData.FILL;
+ editButtonGridData.grabExcessHorizontalSpace = false;
+ editButtonGridData.verticalAlignment = GridData.BEGINNING;
+ editButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridData addButtonGridData = new GridData();
+ addButtonGridData.horizontalAlignment = GridData.FILL;
+ addButtonGridData.grabExcessHorizontalSpace = false;
+ addButtonGridData.verticalAlignment = GridData.BEGINNING;
+ addButtonGridData.widthHint = Activator.getButtonWidth( this );
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.marginWidth = 0;
+ gridLayout.marginHeight = 0;
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.CENTER;
+ gridData.grabExcessHorizontalSpace = false;
+ gridData.grabExcessVerticalSpace = false;
+ gridData.verticalAlignment = GridData.FILL;
+
+ buttonComposite = new Composite( composite, SWT.NONE );
+ buttonComposite.setLayoutData( gridData );
+ buttonComposite.setLayout( gridLayout );
+
+ addButton = new Button( buttonComposite, SWT.NONE );
+ addButton.setText( Messages.getString( "ACIItemUserPermissionsComposite.add.button" ) ); //$NON-NLS-1$
+ addButton.setLayoutData( addButtonGridData );
+ addButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ addUserPermission();
+ }
+ } );
+
+ editButton = new Button( buttonComposite, SWT.NONE );
+ editButton.setText( Messages.getString( "ACIItemUserPermissionsComposite.edit.button" ) ); //$NON-NLS-1$
+ editButton.setLayoutData( editButtonGridData );
+ editButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ editUserPermission();
+ }
+ } );
+ editButton.setEnabled( false );
+
+ deleteButton = new Button( buttonComposite, SWT.NONE );
+ deleteButton.setText( Messages.getString( "ACIItemUserPermissionsComposite.delete.button" ) ); //$NON-NLS-1$
+ deleteButton.setLayoutData( deleteButtonGridData );
+ deleteButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ deleteUserPermission();
+ }
+ } );
+ deleteButton.setEnabled( false );
+
+ }
+
+
+ /**
+ * Shows or hides this composite.
+ *
+ * @param visible true if visible
+ */
+ public void setVisible( boolean visible )
+ {
+ super.setVisible( visible );
+ ( ( GridData ) getLayoutData() ).heightHint = visible ? -1 : 0;
+ }
+
+
+ /**
+ * Sets the context.
+ *
+ * @param context the context
+ */
+ public void setContext( ACIItemValueWithContext context )
+ {
+ this.context = context;
+ }
+
+
+ /**
+ * Sets the user permissions.
+ *
+ * @param userPermissions
+ */
+ public void setUserPermissions( Collection<UserPermission> userPermissions )
+ {
+ userPermissionWrappers.clear();
+
+ for ( UserPermission userPermission : userPermissions )
+ {
+ UserPermissionWrapper userPermissionWrapper = new UserPermissionWrapper( userPermission );
+
+ userPermissionWrappers.add( userPermissionWrapper );
+ }
+
+ tableViewer.refresh();
+ }
+
+
+ /**
+ * Returns the user permissions as selected by the user.
+ *
+ * @return the user permissions
+ */
+ public Collection<UserPermission> getUserPermissions()
+ {
+ Collection<UserPermission> userPermissions = new ArrayList<UserPermission>();
+
+ for ( UserPermissionWrapper userPermissionWrapper : userPermissionWrappers )
+ {
+ userPermissions.add( userPermissionWrapper.userPermission );
+ }
+
+ return userPermissions;
+ }
+
+
+ /**
+ *
+ * @return the user permission that is selected in the table viewer, or null.
+ */
+ private UserPermissionWrapper getSelectedUserPermissionWrapper()
+ {
+ UserPermissionWrapper userPermissionWrapper = null;
+
+ IStructuredSelection selection = ( IStructuredSelection ) tableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ Object element = selection.getFirstElement();
+ if ( element instanceof UserPermissionWrapper )
+ {
+ userPermissionWrapper = ( UserPermissionWrapper ) element;
+ }
+ }
+
+ return userPermissionWrapper;
+ }
+
+
+ /**
+ * Opens the UserPermissionDialog and adds the composed
+ * user permission to the list.
+ */
+ private void addUserPermission()
+ {
+ UserPermissionDialog dialog = new UserPermissionDialog( getShell(), null, context );
+ if ( dialog.open() == UserPermissionDialog.OK && dialog.getUserPermission() != null )
+ {
+ UserPermissionWrapper userPermissionWrapper = new UserPermissionWrapper( dialog.getUserPermission() );
+ userPermissionWrappers.add( userPermissionWrapper );
+
+ tableViewer.refresh();
+ }
+ }
+
+
+ /**
+ * Opens the UserPermissionDialog with the currently selected
+ * user permission and puts the modified user permission into the list.
+ */
+ private void editUserPermission()
+ {
+ UserPermissionWrapper oldUserPermissionWrapper = getSelectedUserPermissionWrapper();
+ if ( oldUserPermissionWrapper != null )
+ {
+ UserPermissionDialog dialog = new UserPermissionDialog( getShell(),
+ oldUserPermissionWrapper.userPermission, context );
+ if ( dialog.open() == UserPermissionDialog.OK )
+ {
+ oldUserPermissionWrapper.userPermission = dialog.getUserPermission();
+ tableViewer.refresh();
+ }
+ }
+ }
+
+
+ /**
+ * Deletes the currently selected user permission from list.
+ */
+ private void deleteUserPermission()
+ {
+ UserPermissionWrapper userPermissionWrapper = getSelectedUserPermissionWrapper();
+ if ( userPermissionWrapper != null )
+ {
+ userPermissionWrappers.remove( userPermissionWrapper );
+ tableViewer.refresh();
+ }
+ }
+
+
+ /**
+ * Called when an user permission is selected in table viewer.
+ * Updates the enabled/disabled state of the buttons.
+ */
+ private void userPermissionSelected()
+ {
+ UserPermissionWrapper userPermissionWrapper = getSelectedUserPermissionWrapper();
+
+ if ( userPermissionWrapper == null )
+ {
+ editButton.setEnabled( false );
+ deleteButton.setEnabled( false );
+ }
+ else
+ {
+ editButton.setEnabled( true );
+ deleteButton.setEnabled( true );
+ }
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java
new file mode 100644
index 0000000..4e79e37
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/ACIItemVisualEditorComposite.java
@@ -0,0 +1,262 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
+
+
+import java.text.ParseException;
+import java.util.Collection;
+
+import org.apache.directory.shared.ldap.aci.ACIItem;
+import org.apache.directory.shared.ldap.aci.ACIItemParser;
+import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
+import org.apache.directory.shared.ldap.aci.ItemFirstACIItem;
+import org.apache.directory.shared.ldap.aci.UserFirstACIItem;
+import org.apache.directory.studio.aciitemeditor.ACIItemValueWithContext;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * This is the main widget of the ACI item visual editor. It manages
+ * the lifecyle of all other ACI item widgets. In particular it
+ * shows/hides the userFirst and itemFirst widgets depending on
+ * the user's selection.
+ * <p>
+ * It extends ScrolledComposite.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ACIItemVisualEditorComposite extends ScrolledComposite implements WidgetModifyListener
+{
+
+ /** The inner composite for all the content */
+ private Composite composite = null;
+
+ /** The general composite contains id-tag, precedence, auth-level, userFirst/itemFirst */
+ private ACIItemGeneralComposite generalComposite = null;
+
+ /** The user classes composite used for userFirst selection */
+ private ACIItemUserClassesComposite userFirstUserClassesComposite = null;
+
+ /** The user permission composite used for userFirst selection */
+ private ACIItemUserPermissionsComposite userFirstUserPermissionsComposite = null;
+
+ /** The protected items composite used for itemFirst selection */
+ private ACIItemProtectedItemsComposite itemFirstProtectedItemsComposite = null;
+
+ /** The item permission composite used for itemFirst selection */
+ private ACIItemItemPermissionsComposite itemFirstItemPermissionsComposite = null;
+
+
+ /**
+ * Creates a new instance of ACIItemComposite.
+ *
+ * @param parent
+ * @param style
+ */
+ public ACIItemVisualEditorComposite( Composite parent, int style )
+ {
+ super( parent, style | SWT.H_SCROLL | SWT.V_SCROLL );
+ setExpandHorizontal( true );
+ setExpandVertical( true );
+
+ createComposite();
+
+ setContent( composite );
+ setMinSize( composite.computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
+ }
+
+
+ /**
+ * This method initializes the inner composite with all contained widgets.
+ *
+ */
+ private void createComposite()
+ {
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 1;
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.verticalAlignment = GridData.CENTER;
+
+ composite = new Composite( this, SWT.NONE );
+ composite.setLayout( gridLayout );
+ composite.setLayoutData( gridData );
+
+ generalComposite = new ACIItemGeneralComposite( composite, SWT.NONE );
+ generalComposite.addWidgetModifyListener( this );
+
+ userFirstUserClassesComposite = new ACIItemUserClassesComposite( composite, SWT.NONE );
+ userFirstUserPermissionsComposite = new ACIItemUserPermissionsComposite( composite, SWT.NONE );
+
+ itemFirstProtectedItemsComposite = new ACIItemProtectedItemsComposite( composite, SWT.NONE );
+ itemFirstItemPermissionsComposite = new ACIItemItemPermissionsComposite( composite, SWT.NONE );
+
+ widgetModified( null );
+ }
+
+
+ /**
+ * This method is called from the contained ACIItemXXXComposites
+ * when they are modified.
+ *
+ * @param event the event
+ */
+ public void widgetModified( WidgetModifyEvent event )
+ {
+ // switch userFirst / itemFirst
+ if ( generalComposite.isItemFirst() && !generalComposite.isUserFirst()
+ && !itemFirstProtectedItemsComposite.isVisible() )
+ {
+ userFirstUserClassesComposite.setVisible( false );
+ userFirstUserPermissionsComposite.setVisible( false );
+ itemFirstProtectedItemsComposite.setVisible( true );
+ itemFirstItemPermissionsComposite.setVisible( true );
+
+ setMinSize( composite.computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
+ layout( true, true );
+ }
+ else if ( generalComposite.isUserFirst() && !generalComposite.isItemFirst()
+ && !userFirstUserClassesComposite.isVisible() )
+ {
+ userFirstUserClassesComposite.setVisible( true );
+ userFirstUserPermissionsComposite.setVisible( true );
+ itemFirstProtectedItemsComposite.setVisible( false );
+ itemFirstItemPermissionsComposite.setVisible( false );
+
+ setMinSize( composite.computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
+ layout( true, true );
+ }
+ else if ( !generalComposite.isItemFirst() && !generalComposite.isUserFirst() )
+ {
+ userFirstUserClassesComposite.setVisible( false );
+ userFirstUserPermissionsComposite.setVisible( false );
+ itemFirstProtectedItemsComposite.setVisible( false );
+ itemFirstItemPermissionsComposite.setVisible( false );
+
+ setMinSize( composite.computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
+ layout( true, true );
+ }
+
+ }
+
+
+ /**
+ * Sets the input. The given ACI Item string is parsed and
+ * populated to the GUI elements.
+ *
+ *
+ * @param input The string representation of the ACI item
+ * @throws ParseException if the syntax is invalid
+ */
+ public void setInput( String input ) throws ParseException
+ {
+ ACIItemParser parser = new ACIItemParser( null );
+ ACIItem aciItem = parser.parse( input );
+
+ if ( aciItem != null )
+ {
+ generalComposite.setIdentificationTag( aciItem.getIdentificationTag() );
+ generalComposite.setPrecedence( aciItem.getPrecedence() );
+ generalComposite.setAuthenticationLevel( aciItem.getAuthenticationLevel() );
+
+ if ( aciItem instanceof ItemFirstACIItem )
+ {
+ ItemFirstACIItem itemFirstACI = ( ItemFirstACIItem ) aciItem;
+ generalComposite.setItemFirst();
+ itemFirstProtectedItemsComposite.setProtectedItems( itemFirstACI.getProtectedItems() );
+ itemFirstItemPermissionsComposite.setItemPermissions( itemFirstACI.getItemPermissions() );
+ }
+ else if ( aciItem instanceof UserFirstACIItem )
+ {
+ UserFirstACIItem userFirstACI = ( UserFirstACIItem ) aciItem;
+ generalComposite.setUserFirst();
+ userFirstUserClassesComposite.setUserClasses( userFirstACI.getUserClasses() );
+ userFirstUserPermissionsComposite.setUserPermissions( userFirstACI.getUserPermission() );
+ }
+ }
+
+ // force userFirst/itemFirst switch
+ widgetModified( null );
+
+ }
+
+
+ /**
+ * Returns the string representation of the ACI item as defined in GUI.
+ *
+ *
+ * @return the string representation of the ACI item
+ * @throws ParseException if the syntax is invalid
+ */
+ public String getInput() throws ParseException
+ {
+ String identificationTag = generalComposite.getIdentificationTag();
+ int precedence = generalComposite.getPrecedence();
+ AuthenticationLevel authenticationLevel = generalComposite.getAuthenticationLevel();
+
+ ACIItem aciItem = null;
+ if ( generalComposite.isUserFirst() )
+ {
+ Collection userClasses = userFirstUserClassesComposite.getUserClasses();
+ Collection userPermissions = userFirstUserPermissionsComposite.getUserPermissions();
+ aciItem = new UserFirstACIItem( identificationTag, precedence, authenticationLevel, userClasses,
+ userPermissions );
+ }
+ else if ( generalComposite.isItemFirst() )
+ {
+ Collection protectedItems = itemFirstProtectedItemsComposite.getProtectedItems();
+ Collection itemPermissions = itemFirstItemPermissionsComposite.getItemPermissions();
+ aciItem = new ItemFirstACIItem( identificationTag, precedence, authenticationLevel, protectedItems,
+ itemPermissions );
+ }
+ else
+ {
+ aciItem = null;
+ }
+
+ StringBuffer buffer = new StringBuffer();
+ if ( aciItem != null )
+ {
+ aciItem.printToBuffer( buffer );
+ }
+ return buffer.toString();
+ }
+
+
+ /**
+ * Sets the context.
+ *
+ * @param context the context
+ */
+ public void setContext( ACIItemValueWithContext context )
+ {
+ itemFirstProtectedItemsComposite.setContext( context );
+ itemFirstItemPermissionsComposite.setContext( context );
+ userFirstUserClassesComposite.setContext( context );
+ userFirstUserPermissionsComposite.setContext( context );
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/Messages.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/Messages.java
new file mode 100644
index 0000000..5b137e5
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/Messages.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.apache.directory.studio.aciitemeditor.widgets.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+
+ private Messages()
+ {
+ }
+
+
+ public static String getString( String key )
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString( key );
+ }
+ catch ( MissingResourceException e )
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/WidgetModifyEvent.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/WidgetModifyEvent.java
new file mode 100644
index 0000000..c1ca88e
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/WidgetModifyEvent.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
+
+
+import java.util.EventObject;
+
+
+/**
+ * A WidgetModifyEvent contains details of the widget modification.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class WidgetModifyEvent extends EventObject
+{
+
+ private static final long serialVersionUID = 2421335730580648878L;
+
+
+ /**
+ * Creates a new instance of WidgetModifyEvent.
+ *
+ * @param source the object on which the event initially occurred
+ */
+ public WidgetModifyEvent( Object source )
+ {
+ super( source );
+ }
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/WidgetModifyListener.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/WidgetModifyListener.java
new file mode 100644
index 0000000..9ce326c
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/WidgetModifyListener.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
+
+
+/**
+ * A widget modify listeners gets informed if a widget was modified.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface WidgetModifyListener
+{
+
+ /**
+ * Informs this listener that a widget was modified
+ *
+ * @param event
+ */
+ public void widgetModified( WidgetModifyEvent event );
+
+}
diff --git a/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/package-info.java b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/package-info.java
new file mode 100644
index 0000000..2793a49
--- /dev/null
+++ b/studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/widgets/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+/**
+ * Contains the composed widgets of the ACI item editor dialog.
+ */
+package org.apache.directory.studio.aciitemeditor.widgets;
\ No newline at end of file
diff --git a/studio-aciitemeditor/src/main/resources/org/apache/directory/studio/aciitemeditor/dialogs/messages.properties b/studio-aciitemeditor/src/main/resources/org/apache/directory/studio/aciitemeditor/dialogs/messages.properties
new file mode 100644
index 0000000..af71b6b
--- /dev/null
+++ b/studio-aciitemeditor/src/main/resources/org/apache/directory/studio/aciitemeditor/dialogs/messages.properties
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+ACIItemDialog.dialog.text=ACI Item Editor
+ACIItemDialog.dialog.icon=resources/icons/aciitemeditor.gif
+ACIItemDialog.error.title=Syntax Error
+ACIItemDialog.button.format=Format
+ACIItemDialog.syntaxOk.title=Syntax ok
+ACIItemDialog.syntaxOk.text=Syntax ok
+ACIItemDialog.error.invalidSyntax=Invalid syntax.
+ACIItemDialog.button.checkSyntax=Check Syntax
+ItemPermissionDialog.dialog.text=Item Permission Editor
+ItemPermissionDialog.dialog.icon=resources/icons/aciitemeditor.gif
+ItemPermissionDialog.error.invalidItemPermission=Invalid Item Permission
+ItemPermissionDialog.precedence.label=Precedence:
+UserPermissionDialog.dialog.text=User Permission Editor
+UserPermissionDialog.dialog.icon=resources/icons/aciitemeditor.gif
+UserPermissionDialog.error.invalidUserPermission=Invalid User Permission
+UserPermissionDialog.precedence.label=Precedence:
+MultiValuedDialog.dialog.titlePrefix=Edit
+MultiValuedDialog.dialog.icon=resources/icons/aciitemeditor.gif
+MultiValuedDialog.button.add=Add...
+MultiValuedDialog.button.edit=Edit...
+MultiValuedDialog.button.delete=Delete
diff --git a/studio-aciitemeditor/src/main/resources/org/apache/directory/studio/aciitemeditor/model/messages.properties b/studio-aciitemeditor/src/main/resources/org/apache/directory/studio/aciitemeditor/model/messages.properties
new file mode 100644
index 0000000..73ad903
--- /dev/null
+++ b/studio-aciitemeditor/src/main/resources/org/apache/directory/studio/aciitemeditor/model/messages.properties
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+UserClassWrapper.userClass.name.label=Name
+UserClassWrapper.userClass.allUsers.label=All Users
+UserClassWrapper.userClass.thisEntry.label=This Entry
+UserClassWrapper.userClass.userGroup.label=User Group
+UserClassWrapper.userClass.subtree.label=Subtree
+UserClassWrapper.error.message=Invalid user class "{0}" with value "{1}"
+
+ProtectedItemWrapper.protectedItem.entry.label=Entry
+ProtectedItemWrapper.protectedItem.allUserAttributeTypes.label=All User Attribute Types
+ProtectedItemWrapper.protectedItem.attributeType.label=Attribute Type
+ProtectedItemWrapper.protectedItem.allAttributeValues.label=All Attribute Values
+ProtectedItemWrapper.protectedItem.allUserAttributeTypesAndValues.label=All User Attribute Types and Values
+ProtectedItemWrapper.protectedItem.attributeValue.label=Attribute Value
+ProtectedItemWrapper.protectedItem.selfValue.label=Self Value
+ProtectedItemWrapper.protectedItem.rangeOfValues.label=Range of Values
+ProtectedItemWrapper.protectedItem.maxValueCount.label=Max. Value Count
+ProtectedItemWrapper.protectedItem.maxImmSub.label=Max. Number of Immediate Subordinates
+ProtectedItemWrapper.protectedItem.restrictedBy.label=Restricted by
+ProtectedItemWrapper.protectedItem.classes.label=Classes
+ProtectedItemWrapper.error.message=Invalid protected item "{0}" with value "{1}"
\ No newline at end of file
diff --git a/studio-aciitemeditor/src/main/resources/org/apache/directory/studio/aciitemeditor/valueeditors/messages.properties b/studio-aciitemeditor/src/main/resources/org/apache/directory/studio/aciitemeditor/valueeditors/messages.properties
new file mode 100644
index 0000000..d23f00a
--- /dev/null
+++ b/studio-aciitemeditor/src/main/resources/org/apache/directory/studio/aciitemeditor/valueeditors/messages.properties
@@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+RestrictedByValueEditor.icon=resources/icons/attributetypeeditor.png
+RestrictedByValueEditor.title=Restricted By Editor
+SubtreeValueEditor.title=Subtree Editor
+SubtreeValueEditor.icon=resources/icons/subtreeeditor.png
+SubtreeValueEditor.label.base=Base:
+SubtreeValueEditor.label.minimum=Minimum:
+SubtreeValueEditor.label.maximum=Maximum:
+SubtreeValueEditor.label.exclusions=Exclusions:
+SubtreeValueEditor.SubtreeValueEditor.label.filter=Filter
+SubtreeValueEditor.button.add=Add...
+SubtreeValueEditor.button.edit=Edit...
+SubtreeValueEditor.button.delete=Delete
+MaxValueCountValueEditor.title=Max Value Count Editor
+MaxValueCountValueEditor.icon=resources/icons/attributetypeeditor.png
+FilterValueEditor.dialog.title=Filter Editor
+ExclusionValueEditor.title=Exclusion Editor
+ExclusionValueEditor.icon=resources/icons/subtreeeditor.png
+ExclusionValueEditor.label.type=Type:
+ExclusionValueEditor.label.rdn=RDN:
+AttributeTypeDialog.title=Attribute Type Editor
+AttributeTypeAndValueDialog.title=Attribute Type and Value Editor
+AttributeTypeAndValueDialog.icon=resources/icons/attributetypeeditor.png
+AttributeTypeDialog.icon=resources/icons/attributetypeeditor.png
+SubtreeValueEditor.SubtreeValueEditor.label.refinementOrFilter=Refinement or Filter:
+SubtreeValueEditor.SubtreeValueEditor.label.refinement=Refinement
diff --git a/studio-aciitemeditor/src/main/resources/org/apache/directory/studio/aciitemeditor/widgets/messages.properties b/studio-aciitemeditor/src/main/resources/org/apache/directory/studio/aciitemeditor/widgets/messages.properties
new file mode 100644
index 0000000..a00de6d
--- /dev/null
+++ b/studio-aciitemeditor/src/main/resources/org/apache/directory/studio/aciitemeditor/widgets/messages.properties
@@ -0,0 +1,62 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+ACIItemGeneralComposite.idTag.label=Identification Tag:
+ACIItemTabFolderComposite.source.tab=Source
+ACIItemTabFolderComposite.visual.tab=Visual Editor
+ACIItemTabFolderComposite.error.onVisualEditor=Invalid syntax, switching back to visual editor.
+ACIItemTabFolderComposite.error.title=Syntax Error
+ACIItemTabFolderComposite.error.onSourceEditor=Invalid syntax, switching back to source editor.
+ACIItemTabFolderComposite.error.onInput=Invalid syntax, activating source editor.
+ACIItemGeneralComposite.precedence.label=Precedence:
+ACIItemUserClassesComposite.revert.buton=Revert
+ACIItemGeneralComposite.authLevel.label=Authentication Level:
+ACIItemGeneralComposite.userOrItemFirst.label=User or Item first:
+ACIItemItemPermissionsComposite.delete.button=Delete
+ACIItemGeneralComposite.userFirst.label=User First
+ACIItemGeneralComposite.itemFirst.label=Item First
+ACIItemUserClassesComposite.description=User Classes:
+ACIItemUserClassesComposite.edit.button=Edit...
+ACIItemUserClassesComposite.error.icon=resources/icons/error.gif
+ACIItemGrantsAndDenialsComposite.column1.header=Right
+ACIItemGrantsAndDenialsComposite.column2.header=Grant/Deny
+ACIItemGrantsAndDenialsComposite.category.read=Read Rights
+ACIItemUserClassesComposite.deselectAll.button=Deselect All
+ACIItemGrantsAndDenialsComposite.category.modify=Modification Rights
+ACIItemGrantsAndDenialsComposite.category.advanced=Advanced Rights
+ACIItemGrantsAndDenialsComposite.description=Grants and Denials:
+ACIItemGrantsAndDenialsComposite.grantAll.button=Grant All
+ACIItemGrantsAndDenialsComposite.denyAll.button=Deny All
+ACIItemProtectedItemsComposite.selectAll.button=Select All
+ACIItemGrantsAndDenialsComposite.deselectAll.button=Deselect All
+ACIItemGrantsAndDenialsComposite.undo.button=Undo
+ACIItemGrantsAndDenialsComposite.redo.button=Redo
+ACIItemProtectedItemsComposite.revers.button=Revert
+ACIItemGrantsAndDenialsComposite.unspecified.icon=resources/icons/checkbox_unchecked.gif
+ACIItemProtectedItemsComposite.deselectAll.button=Deselect All
+ACIItemGrantsAndDenialsComposite.grant.icon=resources/icons/checkbox_grant.gif
+ACIItemItemPermissionsComposite.description=Item Permissions:
+ACIItemItemPermissionsComposite.edit.button=Edit...
+ACIItemGrantsAndDenialsComposite.deny.icon=resources/icons/checkbox_deny.gif
+ACIItemItemPermissionsComposite.add.button=Add...
+ACIItemProtectedItemsComposite.description=Protected Items:
+ACIItemProtectedItemsComposite.edit.button=Edit...
+ACIItemProtectedItemsComposite.error.icon=resources/icons/error.gif
+ACIItemUserPermissionsComposite.descripton=User Permissions:
+ACIItemUserPermissionsComposite.add.button=Add...
+ACIItemUserClassesComposite.selectAll.button=Select All
+ACIItemUserPermissionsComposite.edit.button=Edit...
+ACIItemUserPermissionsComposite.delete.button=Delete
diff --git a/studio-apacheds-configuration-feature/.project b/studio-apacheds-configuration-feature/.project
new file mode 100644
index 0000000..6368ec4
--- /dev/null
+++ b/studio-apacheds-configuration-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>studio-apacheds-configuration-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/studio-apacheds-configuration-feature/META-INF/LICENSE.txt b/studio-apacheds-configuration-feature/META-INF/LICENSE.txt
new file mode 100755
index 0000000..d645695
--- /dev/null
+++ b/studio-apacheds-configuration-feature/META-INF/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/studio-apacheds-configuration-feature/META-INF/MANIFEST.MF b/studio-apacheds-configuration-feature/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8dff69a
--- /dev/null
+++ b/studio-apacheds-configuration-feature/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Apache Directory Studio Apache DS Configuration Feature
+Bundle-SymbolicName: org.apache.directory.studio.apacheds.configuration.feature;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Eclipse-LazyStart: true
+Bundle-Vendor: Apache Software Foundation
diff --git a/studio-apacheds-configuration-feature/META-INF/NOTICE.txt b/studio-apacheds-configuration-feature/META-INF/NOTICE.txt
new file mode 100644
index 0000000..e442cd5
--- /dev/null
+++ b/studio-apacheds-configuration-feature/META-INF/NOTICE.txt
Binary files differ
diff --git a/studio-apacheds-configuration-feature/build.properties b/studio-apacheds-configuration-feature/build.properties
new file mode 100644
index 0000000..64f93a9
--- /dev/null
+++ b/studio-apacheds-configuration-feature/build.properties
@@ -0,0 +1 @@
+bin.includes = feature.xml
diff --git a/studio-apacheds-configuration-feature/build.xml b/studio-apacheds-configuration-feature/build.xml
new file mode 100644
index 0000000..d71af3e
--- /dev/null
+++ b/studio-apacheds-configuration-feature/build.xml
@@ -0,0 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<project default="feature">
+ <import file="../studio-build/build.xml"/>
+</project>
diff --git a/studio-apacheds-configuration-feature/feature.properties b/studio-apacheds-configuration-feature/feature.properties
new file mode 100644
index 0000000..61065b1
--- /dev/null
+++ b/studio-apacheds-configuration-feature/feature.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+project.name=Apache Directory Studio Apache DS Configuration
+project.version=1.0.0
+project.id=org.apache.directory.studio.apacheds.configuration.feature
diff --git a/studio-apacheds-configuration-feature/feature.xml b/studio-apacheds-configuration-feature/feature.xml
new file mode 100644
index 0000000..cb5a07c
--- /dev/null
+++ b/studio-apacheds-configuration-feature/feature.xml
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.apache.directory.studio.apacheds.configuration.feature"
+ label="Apache Directory Studio Apache DS Configuration"
+ version="1.0.0"
+ provider-name="Apache Software Foundation"
+ plugin="org.apache.directory.studio.apacheds.configuration"
+ image="studio.png">
+
+ <description>
+ The Apache Directory Studio Apache DS Feature contains all plugins related to Apache DS.
+ </description>
+
+ <copyright>
+ © 2006-2007 Apache Software Foundation - All right reserved.
+This product includes software developed by the
+Apache Software Foundation http://www.apache.org/
+Some icons from FAMFAMFAM http://www.famfamfam.com/lab/icons/silk/
+ </copyright>
+
+ <license url="http://www.apache.org/licenses/LICENSE-2.0.html">
+ 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.
+ </license>
+
+ <url>
+ <update label="Apache Directory Studio" url="http://directory.apache.org/studio/update/1.x"/>
+ </url>
+
+ <plugin
+ id="org.apache.directory.studio.apacheds.configuration"
+ download-size="0"
+ install-size="0"
+ version="1.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.apache.directory.studio.jars"
+ download-size="0"
+ install-size="0"
+ version="1.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.apache.directory.studio.apacheds.configuration.help"
+ download-size="0"
+ install-size="0"
+ version="1.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/studio-apacheds-configuration-feature/studio.png b/studio-apacheds-configuration-feature/studio.png
new file mode 100644
index 0000000..7a04ef4
--- /dev/null
+++ b/studio-apacheds-configuration-feature/studio.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/.project b/studio-apacheds-configuration-help/.project
new file mode 100644
index 0000000..35eaef7
--- /dev/null
+++ b/studio-apacheds-configuration-help/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>studio-apacheds-configuration-help</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/studio-apacheds-configuration-help/META-INF/LICENSE.txt b/studio-apacheds-configuration-help/META-INF/LICENSE.txt
new file mode 100755
index 0000000..4283354
--- /dev/null
+++ b/studio-apacheds-configuration-help/META-INF/LICENSE.txt
Binary files differ
diff --git a/studio-apacheds-configuration-help/META-INF/MANIFEST.MF b/studio-apacheds-configuration-help/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..fa8404c
--- /dev/null
+++ b/studio-apacheds-configuration-help/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Apache Directory Studio Apache DS Configuration Help
+Bundle-SymbolicName: org.apache.directory.studio.apacheds.configuration.help;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Eclipse-LazyStart: true
+Bundle-Vendor: Apache Software Foundation
diff --git a/studio-apacheds-configuration-help/META-INF/NOTICE.txt b/studio-apacheds-configuration-help/META-INF/NOTICE.txt
new file mode 100644
index 0000000..b4d5ef7
--- /dev/null
+++ b/studio-apacheds-configuration-help/META-INF/NOTICE.txt
Binary files differ
diff --git a/studio-apacheds-configuration-help/about.html b/studio-apacheds-configuration-help/about.html
new file mode 100644
index 0000000..04657ff
--- /dev/null
+++ b/studio-apacheds-configuration-help/about.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About Apache Directory Studio Browser</h2>
+
+<h3>Copyright</h3>
+
+<p>Copyright (c) 2006 Apache Software Foundation. All rights reserved.</p>
+
+<h3>License</h3>
+
+<p>Apache Directory Studio Browser is provided to you under the terms and conditions of the
+Apache License Version 2.0. A copy of the Apache Licence can be found in <a href="about_files/licence.txt">about_files/license.txt</a>
+and is also available at <a href="http://www.apache.org/licenses/LICENSE-2.0.html</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as follows:</p>
+
+<h4>Eclipse</h4>
+
+<p>The plug-in is accompanied by software developed by the Eclipse Foundation at
+<a href="http://www.eclipse.org/">http://www.eclipse.org/</a>.
+Parts of Eclipse code, icons and documents are included with the plug-in.
+Your use of Eclipse is subject to the terms and conditions of the Eclipse Public License Version 1.0 ("EPL").
+A copy of the EPL can be found in <a href="about_files/epl-v10.txt">about_files/epl-v10.txt</a>
+and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+The source code for Eclipse is available at <a href="http://www.eclipse.org/">http://www.eclipse.org/</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/studio-apacheds-configuration-help/about_files/epl-v10.txt b/studio-apacheds-configuration-help/about_files/epl-v10.txt
new file mode 100644
index 0000000..f61d34d
--- /dev/null
+++ b/studio-apacheds-configuration-help/about_files/epl-v10.txt
@@ -0,0 +1,88 @@
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 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. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
+
+
diff --git a/studio-apacheds-configuration-help/build.xml b/studio-apacheds-configuration-help/build.xml
new file mode 100644
index 0000000..d6d3f2e
--- /dev/null
+++ b/studio-apacheds-configuration-help/build.xml
@@ -0,0 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<project default="help-eclipse">
+ <import file="../studio-build/build.xml"/>
+</project>
diff --git a/studio-apacheds-configuration-help/ivy.xml b/studio-apacheds-configuration-help/ivy.xml
new file mode 100644
index 0000000..f62d4f8
--- /dev/null
+++ b/studio-apacheds-configuration-help/ivy.xml
@@ -0,0 +1,33 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.studio" module="studio-schema-help"/>
+ <dependencies>
+ <dependency org="org.apache.xalan" name="xalan" rev="2.7.0"/>
+ <dependency org="docbook" name="docbook-xml" rev="4.5"/>
+ <dependency org="docbook" name="docbook-xsl" rev="1.71.1"/>
+ <dependency org="commons-logging" name="commons-logging" rev="1.1"/>
+ <dependency org="commons-io" name="commons-io" rev="1.3.1"/>
+ <dependency org="avalon-framework" name="avalon-framework-api" rev="4.2.0"/>
+ <dependency org="avalon-framework" name="avalon-framework-impl" rev="4.2.0"/>
+ <dependency org="org.apache.xmlgraphics" name="fop" rev="0.9.3"/>
+ <dependency org="org.apache.xmlgraphics" name="commons" rev="1.1"/>
+ <dependency org="org.apache.xmlgraphics" name="batik" rev="1.6"/>
+ </dependencies>
+</ivy-module>
diff --git a/studio-apacheds-configuration-help/plugin.properties b/studio-apacheds-configuration-help/plugin.properties
new file mode 100644
index 0000000..13c6fa3
--- /dev/null
+++ b/studio-apacheds-configuration-help/plugin.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+project.name=Apache Directory Studio Apache DS Configuration Help
+project.version=1.0.0
+project.id=org.apache.directory.studio.apacheds.configuration.help
diff --git a/studio-apacheds-configuration-help/plugin.xml b/studio-apacheds-configuration-help/plugin.xml
new file mode 100644
index 0000000..3efeadb
--- /dev/null
+++ b/studio-apacheds-configuration-help/plugin.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<plugin>
+
+ <extension point="org.eclipse.help.toc">
+ <toc file="toc.xml" primary="true" />
+ </extension>
+
+</plugin>
diff --git a/studio-apacheds-configuration-help/resources/css/book.css b/studio-apacheds-configuration-help/resources/css/book.css
new file mode 100644
index 0000000..66c311a
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/css/book.css
@@ -0,0 +1,113 @@
+
+P.Code {
+ display: block;
+ text-align: left;
+ text-indent: 0.00pt;
+ margin-top: 0.000000pt;
+ margin-bottom: 0.000000pt;
+ margin-right: 0.000000pt;
+ margin-left: 15pt;
+ font-size: 10.000000pt;
+ font-weight: normal;
+ font-style: normal;
+ color: #4444CC;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+ font-family: "Courier New", Courier, monospace;
+}
+H6.CaptionFigColumn {
+ display: block;
+ text-align: left;
+ text-indent: 0.000000pt;
+ margin-top: 3.000000pt;
+ margin-bottom: 11.000000pt;
+ margin-right: 0.000000pt;
+ margin-left: 0.000000pt;
+ font-size: 9.000000pt;
+ font-weight: bold;
+ font-style: Italic;
+ color: #000000;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+}
+P.Note {
+ display: block;
+ text-align: left;
+ text-indent: 0pt;
+ margin-top: 19.500000pt;
+ margin-bottom: 19.500000pt;
+ margin-right: 0.000000pt;
+ margin-left: 30pt;
+ font-size: 11.000000pt;
+ font-weight: normal;
+ font-style: Italic;
+ color: #000000;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+}
+EM.UILabel {
+ font-weight: Bold;
+ font-style: normal;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+}
+EM.CodeName {
+ font-weight: Bold;
+ font-style: normal;
+ text-decoration: none;
+ vertical-align: baseline;
+ text-transform: none;
+ font-family: "Courier New", Courier, monospace;
+}
+
+body, html { border: 0px }
+
+
+/* following font face declarations need to be removed for DBCS */
+
+body, h1, h2, h3, h4, h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt {font-family: Arial, Helvetica, sans-serif; color: #000000}
+pre { font-family: "Courier New", Courier, monospace;}
+
+/* end font face declarations */
+
+/* following font size declarations should be OK for DBCS */
+body, h1, h2, h3, h4, h5, h6, p, table, td, caption, th, ul, ol, dl, li, dd, dt {font-size: 10pt; }
+pre { font-size: 10pt}
+
+/* end font size declarations */
+
+body { background: #FFFFFF; margin-bottom: 1em }
+h1 { font-size: 18pt; margin-top: 5; margin-bottom: 1 }
+h2 { font-size: 14pt; margin-top: 25; margin-bottom: 3 }
+h3 { font-size: 11pt; margin-top: 20; margin-bottom: 3 }
+h4 { font-size: 10pt; margin-top: 20; margin-bottom: 3; font-style: italic }
+p { margin-top: 10px; margin-bottom: 10px }
+pre { margin-left: 6; font-size: 9pt; color: #4444CC }
+a:link { color: #0000FF }
+a:hover { color: #000080 }
+a:visited { text-decoration: underline }
+ul { margin-top: 10px; margin-bottom: 10px; }
+li { margin-top: 5px; margin-bottom: 5px; }
+li p { margin-top: 5px; margin-bottom: 5px; }
+ol { margin-top: 10px; margin-bottom: 10px; }
+dl { margin-top: 10px; margin-bottom: 10px; }
+dt { margin-top: 5px; margin-bottom: 5px; font-weight: bold; }
+dd { margin-top: 5px; margin-bottom: 5px; }
+strong { font-weight: bold}
+em { font-style: italic}
+var { font-style: italic}
+div.revision { border-left-style: solid; border-left-width: thin;
+ border-left-color: #7B68EE; padding-left:5 }
+th { font-weight: bold }
+
+a.command-link {
+}
+a.command-link img {
+ border-width: 0px;
+ border-style: none;
+ vertical-align: middle;
+}
\ No newline at end of file
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/extended_operation.gif b/studio-apacheds-configuration-help/resources/images/gettingstarted/extended_operation.gif
new file mode 100644
index 0000000..4e37b35
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/extended_operation.gif
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/extended_operations_page_extended_operation_details.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/extended_operations_page_extended_operation_details.png
new file mode 100644
index 0000000..4109dbc
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/extended_operations_page_extended_operation_details.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/extended_operations_page_extended_operations_list.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/extended_operations_page_extended_operations_list.png
new file mode 100644
index 0000000..0579011
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/extended_operations_page_extended_operations_list.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/general_page_binary_attributes.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/general_page_binary_attributes.png
new file mode 100644
index 0000000..5142a92
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/general_page_binary_attributes.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/general_page_limits.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/general_page_limits.png
new file mode 100644
index 0000000..cca6577
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/general_page_limits.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/general_page_options.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/general_page_options.png
new file mode 100644
index 0000000..1812cf5
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/general_page_options.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/general_page_settings.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/general_page_settings.png
new file mode 100644
index 0000000..3bdc0e3
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/general_page_settings.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/horizontal_orientation.gif b/studio-apacheds-configuration-help/resources/images/gettingstarted/horizontal_orientation.gif
new file mode 100644
index 0000000..f4c14a4
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/horizontal_orientation.gif
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/install_1.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_1.png
new file mode 100644
index 0000000..a4ce273
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_1.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/install_2.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_2.png
new file mode 100755
index 0000000..bd7b88f
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_2.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/install_3.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_3.png
new file mode 100755
index 0000000..23b8ca4
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_3.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/install_4.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_4.png
new file mode 100755
index 0000000..f606c23
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_4.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/install_5.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_5.png
new file mode 100755
index 0000000..01a840a
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_5.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/install_6.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_6.png
new file mode 100644
index 0000000..b4d50b3
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_6.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/install_7.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_7.png
new file mode 100755
index 0000000..b01db3e
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/install_7.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/interceptor.gif b/studio-apacheds-configuration-help/resources/images/gettingstarted/interceptor.gif
new file mode 100644
index 0000000..0c797fb
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/interceptor.gif
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/interceptors_page_interceptor_details.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/interceptors_page_interceptor_details.png
new file mode 100644
index 0000000..b40f0d6
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/interceptors_page_interceptor_details.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/interceptors_page_interceptors_list.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/interceptors_page_interceptors_list.png
new file mode 100644
index 0000000..5ba729c
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/interceptors_page_interceptors_list.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/new_configuration.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/new_configuration.png
new file mode 100644
index 0000000..9f78e75
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/new_configuration.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/open_configuration.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/open_configuration.png
new file mode 100644
index 0000000..402fc44
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/open_configuration.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/partition.gif b/studio-apacheds-configuration-help/resources/images/gettingstarted/partition.gif
new file mode 100644
index 0000000..e1bf6ed
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/partition.gif
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/partition_system.gif b/studio-apacheds-configuration-help/resources/images/gettingstarted/partition_system.gif
new file mode 100644
index 0000000..f20f392
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/partition_system.gif
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/partitions_page_context_entry.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/partitions_page_context_entry.png
new file mode 100644
index 0000000..a146dab
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/partitions_page_context_entry.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/partitions_page_indexed_attributes.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/partitions_page_indexed_attributes.png
new file mode 100644
index 0000000..a03ebee
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/partitions_page_indexed_attributes.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/partitions_page_partition_details.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/partitions_page_partition_details.png
new file mode 100644
index 0000000..ef8bd59
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/partitions_page_partition_details.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/partitions_page_partitions_list.png b/studio-apacheds-configuration-help/resources/images/gettingstarted/partitions_page_partitions_list.png
new file mode 100644
index 0000000..6369833
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/partitions_page_partitions_list.png
Binary files differ
diff --git a/studio-apacheds-configuration-help/resources/images/gettingstarted/vertical_orientation.gif b/studio-apacheds-configuration-help/resources/images/gettingstarted/vertical_orientation.gif
new file mode 100644
index 0000000..f685839
--- /dev/null
+++ b/studio-apacheds-configuration-help/resources/images/gettingstarted/vertical_orientation.gif
Binary files differ
diff --git a/studio-apacheds-configuration-help/src/main/resources/0_index.xml b/studio-apacheds-configuration-help/src/main/resources/0_index.xml
new file mode 100644
index 0000000..ee31e1c
--- /dev/null
+++ b/studio-apacheds-configuration-help/src/main/resources/0_index.xml
@@ -0,0 +1,645 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "../../../docbook-xml/docbookx.dtd"[]>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<book>
+ <bookinfo>
+ <title>Apache Directory Studio</title>
+ <subtitle>Apache DS Configuration User's Guide</subtitle>
+ <releaseinfo>Version 1.0.0</releaseinfo>
+ <copyright>
+ <year>2007</year>
+ <holder>Apache Software Foundation</holder>
+ </copyright>
+ <legalnotice>
+ <literallayout class="monospaced">
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+
+ <ulink url="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</ulink>
+
+ 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.
+ </literallayout>
+ </legalnotice>
+ </bookinfo>
+
+ <!-- GETTING STARTED CHAPTER -->
+ <chapter id="gettingstarted">
+ <title>Getting started</title>
+ <para>
+ This part of the guide provides you a sum up of the basic concepts of the Apache DS Configuration.
+ </para>
+
+ <!-- DOWNLOAD AND INSTALLATION SECTION -->
+ <section id="download_install">
+ <title>Download and installation</title>
+ <para>
+ Beside the integration in Apache Directory Studio the Apache Directory Studio Apache DS Configuration can also be installed
+ as a plug-in into a regular Eclipse installation. This section describes this
+ alternative.
+ </para>
+ <para>
+ Using the Eclipse Install/Update Manager is the easiest way to
+ install the Apache Directory Studio Apache DS Configuration plug-in.
+ From workbench menu choose
+ <emphasis role="strong">
+ <menuchoice>
+ <guimenu>Help</guimenu>
+ <guisubmenu>Software Updates</guisubmenu>
+ <guimenuitem>Find and Install...</guimenuitem>
+ </menuchoice>
+ </emphasis>
+ .
+ </para>
+ <para>
+ In the opened wizard choose
+ <emphasis role="strong">Search for new features to install</emphasis>
+ and click <emphasis role="strong">Next</emphasis>.
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/install_1.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ </para>
+ <para>
+ Next please specify the Apache Directory Studio update site. Click the <emphasis role="strong">New Remote Site...</emphasis> button.
+ In the dialog input the following and press <emphasis role="strong">OK</emphasis>:
+ <itemizedlist>
+ <listitem>Name: Apache Directory Studio Update Site</listitem>
+ <listitem>URL: http://directory.apache.org/studio/update/1.x</listitem>
+ </itemizedlist>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/install_2.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ </para>
+ <para>
+ Make sure the new update site is checked an press
+ <emphasis role="strong">Finish</emphasis>.
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/install_3.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ </para>
+ <para>
+ Now the install manager checks the update site and presents the search results. Select the
+ feature you want to install - of course the Apache Directory Studio Apache DS Configuration - and click
+ <emphasis role="strong">Next</emphasis>.
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/install_4.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ </para>
+ <para>
+ Accept the license agreement, the Apache Directory Studio Apache DS Configuration is distributed under the
+ Apache License, Version 2.0.
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/install_5.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ </para>
+ <para>
+ In the next dialog ensure that the Apache Directory Studio Apache DS feature is selected and
+ click to <emphasis role="strong">Finish</emphasis>.
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/install_6.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ </para>
+ <para>
+ Now the install manager loads the necessary files. When download is finished
+ you have to verify the installation, please click to
+ <emphasis role="strong">Install</emphasis>.
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/install_7.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ </para>
+ <para>
+ After installation it is recommended to restart the Eclipse workbench.
+ </para>
+ </section>
+
+ <!-- OPEN SERVER CONFIGURATION SECTION -->
+ <section id="open_server_configuration">
+ <title>Open a Server Configuration</title>
+ <para>
+ To open a Server Configuration, locate the <emphasis role="strong">Apache DS</emphasis>
+ menu and select "<emphasis role="strong">Apache DS > Open Configuration File...</emphasis>".
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/open_configuration.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ </para>
+ </section>
+
+ <!-- CREATE A NEW SERVER CONFIGURATION SECTION -->
+ <section id="new_server_configuration">
+ <title>Create a new Server Configuration</title>
+ <para>
+ To create a new Server Configuration, locate the <emphasis role="strong">Apache DS</emphasis>
+ menu and select "<emphasis role="strong">Apache DS > New Configuration File</emphasis>".
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/new_configuration.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ </para>
+ </section>
+
+ <!-- CONFIGURATION EDITOR SECTION -->
+ <section id="configuration_editor">
+ <title>Configuration Editor</title>
+ <para>
+ The Configuration Editor for Apache DS consists in a 4 pages Editor:
+ <itemizedlist spacing="normal" mark="bullet">
+ <listitem>
+ The <emphasis><link linkend="configuration_editor_general">General</link></emphasis>
+ page allows you to set "general" settings about the server such as the server port,
+ administrator DN, password, etc...
+ </listitem>
+ <listitem>
+ The <emphasis><link linkend="configuration_editor_partitions">Partitions</link></emphasis>
+ page allows you to manage your server partitions.
+ </listitem>
+ <listitem>
+ The <emphasis><link linkend="configuration_editor_interceptors">Interceptors</link>
+ </emphasis> page allows you to manage your server interceptors.
+ </listitem>
+ <listitem>
+ The <emphasis><link linkend="configuration_editor_extended_operations">Extended Operations</link>
+ </emphasis> page allows you to manage your server extended operations handlers.
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <!-- CONFIGURATION EDITOR GENERAL PAGE SECTION -->
+ <section id="configuration_editor_general">
+ <title>General Page</title>
+ <para>
+ The <emphasis role="strong">General Page</emphasis> of the Configuration Editor allows you
+ to edit the server settings.
+ </para>
+ <para>
+ It contains four sections : <emphasis role="strong">Settings</emphasis>,
+ <emphasis role="strong">Binary Attribute</emphasis>, <emphasis role="strong">Limits</emphasis>
+ and <emphasis role="strong">Options</emphasis>.
+ </para>
+
+ <simplesect id="general_settings">
+ <title>Settings</title>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/general_page_settings.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ <para>A <emphasis role="strong">Port</emphasis> is mandatory and must be an integer between
+ 1 to 65535.</para>
+ <para>An <emphasis role="strong">Authentication</emphasis> method is mandatory and is at the
+ moment not editable and set to '<emphasis>Simple</emphasis></para>
+ <para>A <emphasis role="strong">Principal</emphasis> is mandatory and represents the DN of
+ the Administrator of the server.</para>
+ <para>A <emphasis role="strong">Password</emphasis> is mandatory and represents the password
+ of the Administrator of the server.</para>
+ <para>Check the <emphasis role="strong">Show Password</emphasis> checkbox to display the
+ password in a unhidden form.</para>
+ <para>Check the <emphasis role="strong">Allow Anymous Access</emphasis> checkbox to allow
+ anymous access on the server.</para>
+ </simplesect>
+
+ <simplesect id="general_binary_attributes">
+ <title>Binary Attributes</title>
+ <para>This section allows you to specify to the server the attribute types that you want to be handled as binary content.</para>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/general_page_binary_attributes.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ <para>Use the <emphasis role="strong">Add...</emphasis>, <emphasis role="strong">Edit...</emphasis>
+ and <emphasis role="strong">Delete</emphasis> buttons to set your Binary Attributes.</para>
+ </simplesect>
+
+ <simplesect id="general_limits">
+ <title>Limits</title>
+ <para>This section allows you to specify the Limits of the server.</para>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/general_page_limits.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ <para><emphasis role="strong">Max. Time Limit</emphasis> lets you choose the maximum time that
+ should last a request (in milliseconds).</para>
+ <para><emphasis role="strong">Max. Size Limit</emphasis> lets you choose the maximum number
+ of entries that should be returned.</para>
+ <para><emphasis role="strong">Synchronization Period</emphasis> lets you choose the number of
+ milliseconds between two synchronizations.</para>
+ <para><emphasis role="strong">Max. Threads</emphasis> lets you choose the number of threads
+ that should be used by the server in its execution.</para>
+ </simplesect>
+
+ <simplesect id="general_options">
+ <title>Options</title>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/general_page_options.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ <para>Check the <emphasis role="strong">Enable Access Control</emphasis> to enable Access Control
+ on the server.</para>
+ <para>Check the <emphasis role="strong">Enable NTP</emphasis> to enable NTP on the server.</para>
+ <para>Check the <emphasis role="strong">Enable Kerberos</emphasis> to enable Kerberos on the server.
+ </para>
+ <para>Check the <emphasis role="strong">Enable Change Password</emphasis> to enable Change Password
+ service on the server.</para>
+ <para>Check the <emphasis role="strong">Denormalize Operational Attributes</emphasis> to use a
+ more human readable form ('uid=admin,ou=system' instead of '0.9.2342.19200300.100.1.1=admin,2.5.4.11=system')
+ for Operational Attributes on the server.</para>
+ </simplesect>
+ </section>
+
+ <!-- CONFIGURATION EDITOR PARTITIONS PAGE SECTION -->
+ <section id="configuration_editor_partitions">
+ <title>Partitions Page</title>
+ <para>
+ The <emphasis role="strong">Partitions Page</emphasis> of the Configuration Editor allows you
+ to edit the server partitions.
+ </para>
+ <para>
+ The page is divided vertically in two parts.
+ </para>
+ <para>
+ You can choose the orientation of the page by clicking on the appropriate button ("Horizontal
+ Orientation"
+ <imageobject>
+ <imagedata contentdepth="1em" fileref="images/gettingstarted/horizontal_orientation.gif" format="GIF" />
+ </imageobject>
+ or "Vertical Orientation"
+ <imageobject>
+ <imagedata contentdepth="1em" fileref="images/gettingstarted/vertical_orientation.gif" format="GIF" />
+ </imageobject>) at the right of the page.
+ </para>
+ <para>
+ The left side of the page shows the partitions defined on the server. This is where you
+ can add or delete a partition.
+ </para>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/partitions_page_partitions_list.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ <para>
+ The right side of the page display and lets you edit the details of the selected
+ partition in the left side.
+ </para>
+
+ <simplesect id="partitions_partition_details">
+ <title>Partition details</title>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/partitions_page_partition_details.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ <para>A <emphasis role="strong">Name</emphasis> is mandatory for the partition.</para>
+ <para>A <emphasis role="strong">Cache Size</emphasis> is mandatory for the partition.</para>
+ <para>Check the <emphasis role="strong">Enable Optimizer</emphasis> checkbox to enable the
+ optimizer for the partition.</para>
+ <para>Check the <emphasis role="strong">Synchronization On Write</emphasis> checkbox to
+ enable the synchronization on write for the partition.</para>
+ </simplesect>
+
+ <simplesect id="partitions_context_entry">
+ <title>Context Entry</title>
+ <para>This section allows you to specify to the server the attribute/value pairs that will
+ be used for the Context Entry of the partition.</para>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/partitions_page_context_entry.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ <para>Use the <emphasis role="strong">Add...</emphasis>, <emphasis role="strong">Edit...</emphasis>
+ and <emphasis role="strong">Delete</emphasis> buttons to set your values.</para>
+ </simplesect>
+
+ <simplesect id="partitions_indexed_attributes">
+ <title>Indexed Attributes</title>
+ <para>This section allows you to specify to the server the attributes that should be
+ indexed and the their cache size.</para>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/partitions_page_indexed_attributes.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ <para>Use the <emphasis role="strong">Add...</emphasis>, <emphasis role="strong">Edit...</emphasis>
+ and <emphasis role="strong">Delete</emphasis> buttons to set the indexed attributes.</para>
+ </simplesect>
+ <para>
+ </para>
+ <para>
+ The following icons can appear in the Partitions Page.
+ </para>
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colname="Icon" colwidth="1* "/>
+ <colspec colname="Description" colwidth="3*" />
+ <thead>
+ <row>
+ <entry>Icon</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry align="center">
+ <mediaobject>
+ <imageobject>
+ <imagedata contentdepth="1em" fileref="images/gettingstarted/partition.gif" format="GIF" />
+ </imageobject>
+ </mediaobject>
+ </entry>
+ <entry>Standard Partition</entry>
+ </row>
+ <row>
+ <entry align="center">
+ <mediaobject>
+ <imageobject>
+ <imagedata contentdepth="1em" fileref="images/gettingstarted/partition_system.gif" format="GIF" />
+ </imageobject>
+ </mediaobject>
+ </entry>
+ <entry>System Partition</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </section>
+
+ <!-- CONFIGURATION EDITOR INTERCEPTORS PAGE SECTION -->
+ <section id="configuration_editor_interceptors">
+ <title>Interceptors Page</title>
+ <para>
+ The <emphasis role="strong">Interceptors Page</emphasis> of the Configuration Editor allows you
+ to edit the server interceptors.
+ </para>
+ <para>
+ The page is divided vertically in two parts.
+ </para>
+ <para>
+ You can choose the orientation of the page by clicking on the appropriate button ("Horizontal
+ Orientation"
+ <imageobject>
+ <imagedata contentdepth="1em" fileref="images/gettingstarted/horizontal_orientation.gif" format="GIF" />
+ </imageobject>
+ or "Vertical Orientation"
+ <imageobject>
+ <imagedata contentdepth="1em" fileref="images/gettingstarted/vertical_orientation.gif" format="GIF" />
+ </imageobject>) at the right of the page.
+ </para>
+ <para>
+ The left side of the page shows the interceptors defined on the server. This is where you
+ can add or delete an interceptor.
+ </para>
+ <para>
+ You can also choose the order of the interceptors in the interceptors' chain using the "Up" and "Down" buttons.
+ </para>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/interceptors_page_interceptors_list.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ <para>
+ The right side of the page display and lets you edit the details of the selected
+ partition in the left side.
+ </para>
+
+ <simplesect id="interceptors_interceptor_details">
+ <title>Interceptor details</title>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/interceptors_page_interceptor_details.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ <para>A <emphasis role="strong">Name</emphasis> is mandatory for the interceptor.</para>
+ <para>The <emphasis role="strong">Class</emphasis> of the interceptor is mandatory.</para>
+ </simplesect>
+ <para>
+ </para>
+ <para>
+ The following icons can appear in the Interceptors Page.
+ </para>
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colname="Icon" colwidth="1* "/>
+ <colspec colname="Description" colwidth="3*" />
+ <thead>
+ <row>
+ <entry>Icon</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry align="center">
+ <mediaobject>
+ <imageobject>
+ <imagedata contentdepth="1em" fileref="images/gettingstarted/interceptor.gif" format="GIF" />
+ </imageobject>
+ </mediaobject>
+ </entry>
+ <entry>Interceptor</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </section>
+
+ <!-- CONFIGURATION EDITOR EXTENDED OPERATIONS PAGE SECTION -->
+ <section id="configuration_editor_extended_operations">
+ <title>Extended Operations Page</title>
+ <para>
+ The <emphasis role="strong">Extended Operations Page</emphasis> of the Configuration Editor allows you
+ to edit the server extended operations.
+ </para>
+ <para>
+ The page is divided vertically in two parts.
+ </para>
+ <para>
+ You can choose the orientation of the page by clicking on the appropriate button ("Horizontal
+ Orientation"
+ <imageobject>
+ <imagedata contentdepth="1em" fileref="images/gettingstarted/horizontal_orientation.gif" format="GIF" />
+ </imageobject>
+ or "Vertical Orientation"
+ <imageobject>
+ <imagedata contentdepth="1em" fileref="images/gettingstarted/vertical_orientation.gif" format="GIF" />
+ </imageobject>) at the right of the page.
+ </para>
+ <para>
+ The left side of the page shows the extended operations defined on the server. This is where you
+ can add or delete an extended operation.
+ </para>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/extended_operations_page_extended_operations_list.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ <para>
+ The right side of the page display and lets you edit the details of the selected
+ partition in the left side.
+ </para>
+
+ <simplesect id="extended_operations_extended_operation_details">
+ <title>Extended Operation details</title>
+ <screenshot>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="50"
+ fileref="images/gettingstarted/extended_operations_page_extended_operation_details.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </screenshot>
+ <para>The <emphasis role="strong">Class</emphasis> of the extended operation is mandatory.</para>
+ </simplesect>
+ <para>
+ </para>
+ <para>
+ The following icons can appear in the Extended Operations Page.
+ </para>
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <colspec colname="Icon" colwidth="1* "/>
+ <colspec colname="Description" colwidth="3*" />
+ <thead>
+ <row>
+ <entry>Icon</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry align="center">
+ <mediaobject>
+ <imageobject>
+ <imagedata contentdepth="1em" fileref="images/gettingstarted/extended_operation.gif" format="GIF" />
+ </imageobject>
+ </mediaobject>
+ </entry>
+ <entry>Extended Operation</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </section>
+ </section>
+ </chapter>
+
+ <!-- REFERENCE CHAPTER -->
+ <chapter id="reference">
+ <title>Reference</title>
+
+ <!-- RELEASE NOTES SECTION -->
+ <section id="release_notes">
+ <title>Release notes</title>
+ <para><emphasis role="strong">Apache Directory Studio 1.0.0</emphasis> (2007, september 3rd) : initial release</para>
+ </section> <!-- end Release Notes Section -->
+
+ </chapter>
+</book>
diff --git a/studio-apacheds-configuration/.classpath b/studio-apacheds-configuration/.classpath
new file mode 100644
index 0000000..f96c619
--- /dev/null
+++ b/studio-apacheds-configuration/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/studio-apacheds-configuration/.project b/studio-apacheds-configuration/.project
new file mode 100644
index 0000000..d401b4b
--- /dev/null
+++ b/studio-apacheds-configuration/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>studio-apacheds-configuration</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/studio-apacheds-configuration/META-INF/LICENSE.txt b/studio-apacheds-configuration/META-INF/LICENSE.txt
new file mode 100755
index 0000000..d645695
--- /dev/null
+++ b/studio-apacheds-configuration/META-INF/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/studio-apacheds-configuration/META-INF/MANIFEST.MF b/studio-apacheds-configuration/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..a60e91a
--- /dev/null
+++ b/studio-apacheds-configuration/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Apache Directory Studio Apache DS Configuration
+Bundle-SymbolicName: org.apache.directory.studio.apacheds.configuration;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: org.apache.directory.studio.apacheds.configuration.Activator
+Bundle-Vendor: Apache Software Foundation
+Bundle-Localization: plugin
+Eclipse-LazyStart: true
+Bundle-ClassPath: .
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.ui.forms,
+ org.apache.directory.studio.jars
diff --git a/studio-apacheds-configuration/META-INF/NOTICE.txt b/studio-apacheds-configuration/META-INF/NOTICE.txt
new file mode 100644
index 0000000..e442cd5
--- /dev/null
+++ b/studio-apacheds-configuration/META-INF/NOTICE.txt
Binary files differ
diff --git a/studio-apacheds-configuration/about.ini b/studio-apacheds-configuration/about.ini
new file mode 100644
index 0000000..2ab7ecc
--- /dev/null
+++ b/studio-apacheds-configuration/about.ini
@@ -0,0 +1 @@
+featureImage=studio.png
\ No newline at end of file
diff --git a/studio-apacheds-configuration/build.properties b/studio-apacheds-configuration/build.properties
new file mode 100644
index 0000000..a580752
--- /dev/null
+++ b/studio-apacheds-configuration/build.properties
@@ -0,0 +1,8 @@
+source.. = src/main/java/,\
+ src/main/resources/,\
+ src/test/java/
+bin.includes = .,\
+ META-INF/,\
+ plugin.xml,\
+ src/main/java/,\
+ resources/
\ No newline at end of file
diff --git a/studio-apacheds-configuration/build.xml b/studio-apacheds-configuration/build.xml
new file mode 100644
index 0000000..2ab4c38
--- /dev/null
+++ b/studio-apacheds-configuration/build.xml
@@ -0,0 +1,59 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<project default="plugin">
+ <import file="../studio-build/build.xml" />
+
+
+ <!-- RETRIEVE-STUDIO-JAR-DEPENDENCIES TASK -->
+ <target name="retrieve-studio-jar-dependencies" description="Compiles the dependencies of the project">
+ <ant dir="../studio-jars" target="retrieve-dependencies" inheritall="false" />
+ </target>
+
+
+ <!-- BUILD-CLASSPATH TASK -->
+ <target name="build-classpath" depends="retrieve-studio-jar-dependencies" description="Computes the classpath">
+ <path id="classpath">
+ <!-- Project dependencies -->
+ <fileset dir="${lib.dir}" />
+ <!-- Eclipse dependencies -->
+ <fileset dir="../dependencies/eclipse/3.2">
+ <include name="**/*.jar" />
+ </fileset>
+ <!-- Plugin dependencies -->
+ <fileset dir="../studio-jars/lib/" />
+ </path>
+ </target>
+
+
+ <!-- PLUGIN TASK -->
+ <target name="plugin" depends="pre-plugin,studio-build.plugin" />
+
+
+ <!-- PRE-PLUGIN TASK -->
+ <target name="pre-plugin">
+ <mkdir dir="${target.build}" />
+ <copy todir="${target.build}" failonerror="false">
+ <fileset dir="${basedir}">
+ <include name="about.ini" />
+ <include name="studio.png" />
+ </fileset>
+ </copy>
+ </target>
+
+</project>
diff --git a/studio-apacheds-configuration/ivy.xml b/studio-apacheds-configuration/ivy.xml
new file mode 100644
index 0000000..66ccc83
--- /dev/null
+++ b/studio-apacheds-configuration/ivy.xml
@@ -0,0 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.studio" module="ldapdtudio-apacheds-configuration"/>
+</ivy-module>
diff --git a/studio-apacheds-configuration/plugin.properties b/studio-apacheds-configuration/plugin.properties
new file mode 100644
index 0000000..e61832a
--- /dev/null
+++ b/studio-apacheds-configuration/plugin.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+project.name=Apache Directory Studio Apache DS Configuration
+project.version=1.0.0
+project.id=org.apache.directory.studio.apacheds.configuration
diff --git a/studio-apacheds-configuration/plugin.xml b/studio-apacheds-configuration/plugin.xml
new file mode 100644
index 0000000..0d88590
--- /dev/null
+++ b/studio-apacheds-configuration/plugin.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<plugin>
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ id="org.apache.directory.studio.apacheds.configuration.actionset"
+ label="Apache DS"
+ visible="true">
+ <menu
+ id="org.apache.directory.studio.apacheds.configuration.actionset.menu"
+ label="Apache DS"/>
+ <action
+ class="org.apache.directory.studio.apacheds.configuration.actions.OpenServerConfigurationAction"
+ id="org.apache.directory.studio.apacheds.configuration.openServerConfiguration"
+ label="Open Configuration File..."
+ menubarPath="org.apache.directory.studio.apacheds.configuration.actionset.menu/open"
+ style="push"/>
+ <action
+ class="org.apache.directory.studio.apacheds.configuration.actions.NewServerConfigurationAction"
+ id="org.apache.directory.studio.apacheds.configuration.newServerConfiguration"
+ label="New Configuration File"
+ menubarPath="org.apache.directory.studio.apacheds.configuration.actionset.menu/new"
+ style="push"/>
+ </actionSet>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.apache.directory.studio.apacheds.configuration.editor.ServerConfigurationEditor"
+ default="true"
+ icon="resources/icons/editor.gif"
+ id="org.apache.directory.studio.apacheds.configuration.editor"
+ name="Server Configuration Editor">
+ </editor>
+ </extension>
+</plugin>
diff --git a/studio-apacheds-configuration/resources/icons/editor.gif b/studio-apacheds-configuration/resources/icons/editor.gif
new file mode 100644
index 0000000..2200849
--- /dev/null
+++ b/studio-apacheds-configuration/resources/icons/editor.gif
Binary files differ
diff --git a/studio-apacheds-configuration/resources/icons/extended_operation.gif b/studio-apacheds-configuration/resources/icons/extended_operation.gif
new file mode 100644
index 0000000..4e37b35
--- /dev/null
+++ b/studio-apacheds-configuration/resources/icons/extended_operation.gif
Binary files differ
diff --git a/studio-apacheds-configuration/resources/icons/horizontal_orientation.gif b/studio-apacheds-configuration/resources/icons/horizontal_orientation.gif
new file mode 100644
index 0000000..f4c14a4
--- /dev/null
+++ b/studio-apacheds-configuration/resources/icons/horizontal_orientation.gif
Binary files differ
diff --git a/studio-apacheds-configuration/resources/icons/interceptor.gif b/studio-apacheds-configuration/resources/icons/interceptor.gif
new file mode 100644
index 0000000..0c797fb
--- /dev/null
+++ b/studio-apacheds-configuration/resources/icons/interceptor.gif
Binary files differ
diff --git a/studio-apacheds-configuration/resources/icons/partition.gif b/studio-apacheds-configuration/resources/icons/partition.gif
new file mode 100644
index 0000000..e1bf6ed
--- /dev/null
+++ b/studio-apacheds-configuration/resources/icons/partition.gif
Binary files differ
diff --git a/studio-apacheds-configuration/resources/icons/partition_system.gif b/studio-apacheds-configuration/resources/icons/partition_system.gif
new file mode 100644
index 0000000..f20f392
--- /dev/null
+++ b/studio-apacheds-configuration/resources/icons/partition_system.gif
Binary files differ
diff --git a/studio-apacheds-configuration/resources/icons/vertical_orientation.gif b/studio-apacheds-configuration/resources/icons/vertical_orientation.gif
new file mode 100644
index 0000000..f685839
--- /dev/null
+++ b/studio-apacheds-configuration/resources/icons/vertical_orientation.gif
Binary files differ
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/Activator.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/Activator.java
new file mode 100644
index 0000000..9549ec2
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/Activator.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration;
+
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Activator extends AbstractUIPlugin
+{
+ /** The plug-in ID */
+ public static final String PLUGIN_ID = "org.apache.directory.studio.apacheds.configuration"; //$NON-NLS-1$
+
+ /** The shared instance */
+ private static Activator plugin;
+
+
+ /**
+ * Creates a new instance of Activator.
+ */
+ public Activator()
+ {
+ plugin = this;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start( BundleContext context ) throws Exception
+ {
+ super.start( context );
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop( BundleContext context ) throws Exception
+ {
+ super.stop( context );
+ }
+
+
+ /**
+ * Returns the shared instance.
+ *
+ * @return
+ * the shared instance
+ */
+ public static Activator getDefault()
+ {
+ return plugin;
+ }
+
+ /**
+ * Returns the button with respect to the font metrics.
+ *
+ * @param control a control
+ * @return the button width
+ */
+ public static int getButtonWidth( Control control )
+ {
+ GC gc = new GC( control );
+ gc.setFont( JFaceResources.getDialogFont() );
+ FontMetrics fontMetrics = gc.getFontMetrics();
+ gc.dispose();
+
+ int width = Dialog.convertHorizontalDLUsToPixels( fontMetrics, IDialogConstants.BUTTON_WIDTH );
+ return width;
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/PluginConstants.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/PluginConstants.java
new file mode 100644
index 0000000..55174b8
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/PluginConstants.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration;
+
+
+/**
+ * This interface contains all the Constants used in the Plugin.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface PluginConstants
+{
+ // Images
+ public static final String IMG_VERTICAL_ORIENTATION = "resources/icons/vertical_orientation.gif";
+ public static final String IMG_HORIZONTAL_ORIENTATION = "resources/icons/horizontal_orientation.gif";
+ public static final String IMG_PARTITION = "resources/icons/partition.gif";
+ public static final String IMG_PARTITION_SYSTEM = "resources/icons/partition_system.gif";
+ public static final String IMG_INTERCEPTOR = "resources/icons/interceptor.gif";
+ public static final String IMG_EXTENDED_OPERATION = "resources/icons/extended_operation.gif";
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/actions/NewServerConfigurationAction.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/actions/NewServerConfigurationAction.java
new file mode 100644
index 0000000..e88216c
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/actions/NewServerConfigurationAction.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.actions;
+
+
+import org.apache.directory.studio.apacheds.configuration.Activator;
+import org.apache.directory.studio.apacheds.configuration.editor.ServerConfigurationEditor;
+import org.apache.directory.studio.apacheds.configuration.editor.ServerConfigurationEditorInput;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationParser;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationParserException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the New Server Configuration Action.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewServerConfigurationAction extends Action implements IWorkbenchWindowActionDelegate
+{
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run( IAction action )
+ {
+ ServerConfigurationParser parser = new ServerConfigurationParser();
+ ServerConfiguration serverConfiguration = null;
+
+ try
+ {
+ serverConfiguration = parser.parse( Activator.class.getResourceAsStream( "default-server.xml" ) );
+ }
+ catch ( ServerConfigurationParserException e )
+ {
+ MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ SWT.OK | SWT.ICON_ERROR );
+ messageBox.setText( "Error!" );
+ messageBox.setMessage( "An error occurred when reading the file." + "\n" + e.getMessage() );
+ messageBox.open();
+ return;
+ }
+
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ try
+ {
+ page.openEditor( new ServerConfigurationEditorInput( serverConfiguration ), ServerConfigurationEditor.ID );
+ }
+ catch ( PartInitException e )
+ {
+ Activator.getDefault().getLog().log(
+ new Status( Status.ERROR, Activator.PLUGIN_ID, Status.OK, e.getMessage(), e.getCause() ) );
+ return;
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged( IAction action, ISelection selection )
+ {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
+ */
+ public void dispose()
+ {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public void init( IWorkbenchWindow window )
+ {
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/actions/OpenServerConfigurationAction.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/actions/OpenServerConfigurationAction.java
new file mode 100644
index 0000000..6e38434
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/actions/OpenServerConfigurationAction.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.actions;
+
+
+import org.apache.directory.studio.apacheds.configuration.Activator;
+import org.apache.directory.studio.apacheds.configuration.editor.ServerConfigurationEditor;
+import org.apache.directory.studio.apacheds.configuration.editor.ServerConfigurationEditorInput;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationParser;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationParserException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the Open Editor Action.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class OpenServerConfigurationAction extends Action implements IWorkbenchWindowActionDelegate
+{
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run( IAction action )
+ {
+ FileDialog fd = new FileDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.OPEN );
+ fd.setText( "Select a file" );
+ fd.setFilterExtensions( new String[]
+ { "*.xml", "*.*" } );
+ fd.setFilterNames( new String[]
+ { "XML files", "All files" } );
+ String selectedFile = fd.open();
+ // selected == null if 'cancel' has been pushed
+ if ( selectedFile == null || "".equals( selectedFile ) )
+ {
+ return;
+ }
+
+ ServerConfigurationParser parser = new ServerConfigurationParser();
+ ServerConfiguration serverConfiguration = null;
+
+ try
+ {
+ serverConfiguration = parser.parse( selectedFile );
+ }
+ catch ( ServerConfigurationParserException e )
+ {
+ MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ SWT.OK | SWT.ICON_ERROR );
+ messageBox.setText( "Error!" );
+ messageBox.setMessage( "An error occurred when reading the file." + "\n" + e.getMessage() );
+ messageBox.open();
+ return;
+ }
+
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ try
+ {
+ page.openEditor( new ServerConfigurationEditorInput( serverConfiguration ), ServerConfigurationEditor.ID );
+ }
+ catch ( PartInitException e )
+ {
+ Activator.getDefault().getLog().log(
+ new Status( Status.ERROR, Activator.PLUGIN_ID, Status.OK, e.getMessage(), e.getCause() ) );
+ return;
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged( IAction action, ISelection selection )
+ {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
+ */
+ public void dispose()
+ {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public void init( IWorkbenchWindow window )
+ {
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/dialogs/AttributeValueDialog.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/dialogs/AttributeValueDialog.java
new file mode 100644
index 0000000..b320d43
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/dialogs/AttributeValueDialog.java
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.dialogs;
+
+
+import org.apache.directory.studio.apacheds.configuration.editor.AttributeValueObject;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the Dialog for Attribute Value.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AttributeValueDialog extends Dialog
+{
+ /** The Attribute Value Object */
+ private AttributeValueObject attributeValueObject;
+
+ /** The dirty flag */
+ private boolean dirty = false;
+
+ // UI Fields
+ private Text attributeText;
+ private Text valueText;
+
+
+ /**
+ * Creates a new instance of AttributeValueDialog.
+ */
+ public AttributeValueDialog( AttributeValueObject attributeValueObject )
+ {
+ super( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
+ this.attributeValueObject = attributeValueObject;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ protected void configureShell( Shell newShell )
+ {
+ super.configureShell( newShell );
+ newShell.setText( "Attribute Value Dialog" );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = new Composite( parent, SWT.NONE );
+ GridLayout layout = new GridLayout( 2, false );
+ composite.setLayout( layout );
+ composite.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+
+ Label attributeLabel = new Label( composite, SWT.NONE );
+ attributeLabel.setText( "Attribute:" );
+
+ attributeText = new Text( composite, SWT.BORDER );
+ attributeText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ Label valueLabel = new Label( composite, SWT.NONE );
+ valueLabel.setText( "Value:" );
+
+ valueText = new Text( composite, SWT.BORDER );
+ valueText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ initFromInput();
+ addListeners();
+
+ return composite;
+ }
+
+
+ /**
+ * Initializes the UI from the input.
+ */
+ private void initFromInput()
+ {
+ String attribute = attributeValueObject.getAttribute();
+ attributeText.setText( ( attribute == null ) ? "" : attribute );
+
+ Object value = attributeValueObject.getValue();
+ valueText.setText( ( value == null ) ? "" : value.toString() );
+ }
+
+
+ /**
+ * Adds listeners to the UI Fields.
+ */
+ private void addListeners()
+ {
+ attributeText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ dirty = true;
+ }
+ } );
+
+ valueText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ dirty = true;
+ }
+ } );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ protected void okPressed()
+ {
+ attributeValueObject.setId( attributeText.getText() );
+ attributeValueObject.setValue( valueText.getText() );
+
+ super.okPressed();
+ }
+
+
+ /**
+ * Gets the Attribute Value Object.
+ *
+ * @return
+ * the Attribute Value Object
+ */
+ public AttributeValueObject getAttributeValueObject()
+ {
+ return attributeValueObject;
+ }
+
+
+ /**
+ * Returns the dirty flag of the dialog.
+ *
+ * @return
+ * the dirty flag of the dialog
+ */
+ public boolean isDirty()
+ {
+ return dirty;
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/dialogs/BinaryAttributeDialog.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/dialogs/BinaryAttributeDialog.java
new file mode 100644
index 0000000..b881905
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/dialogs/BinaryAttributeDialog.java
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.dialogs;
+
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the Dialog for Binary Attribute.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class BinaryAttributeDialog extends Dialog
+{
+ /** The initial value */
+ private String initialValue;
+
+ /** The return value */
+ private String returnValue;
+
+ /** The dirty flag */
+ private boolean dirty = false;
+
+ // UI Fields
+ private Text attributeText;
+
+
+ /**
+ * Creates a new instance of AttributeValueDialog.
+ */
+ public BinaryAttributeDialog( String initialValue )
+ {
+ super( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
+ this.initialValue = initialValue;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ protected void configureShell( Shell newShell )
+ {
+ super.configureShell( newShell );
+ newShell.setText( "Binary Attribute Dialog" );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = new Composite( parent, SWT.NONE );
+ GridLayout layout = new GridLayout( 2, false );
+ composite.setLayout( layout );
+ composite.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+
+ Label attributeLabel = new Label( composite, SWT.NONE );
+ attributeLabel.setText( "Attribute:" );
+
+ attributeText = new Text( composite, SWT.BORDER );
+ attributeText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ initFromInput();
+ addListeners();
+
+ return composite;
+ }
+
+
+ /**
+ * Initializes the UI from the input.
+ */
+ private void initFromInput()
+ {
+ attributeText.setText( ( initialValue == null ) ? "" : initialValue );
+ }
+
+
+ /**
+ * Adds listeners to the UI Fields.
+ */
+ private void addListeners()
+ {
+ attributeText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ dirty = true;
+ }
+ } );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ protected void okPressed()
+ {
+ returnValue = attributeText.getText();
+
+ super.okPressed();
+ }
+
+
+ /**
+ * Gets the Attribute.
+ *
+ * @return
+ * the Attribute
+ */
+ public String getAttribute()
+ {
+ return returnValue;
+ }
+
+
+ /**
+ * Returns the dirty flag of the dialog.
+ *
+ * @return
+ * the dirty flag of the dialog
+ */
+ public boolean isDirty()
+ {
+ return dirty;
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/dialogs/IndexedAttributeDialog.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/dialogs/IndexedAttributeDialog.java
new file mode 100644
index 0000000..49d3c1d
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/dialogs/IndexedAttributeDialog.java
@@ -0,0 +1,193 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.dialogs;
+
+
+import org.apache.directory.studio.apacheds.configuration.model.IndexedAttribute;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the Dialog for Indexed Attribute.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class IndexedAttributeDialog extends Dialog
+{
+ /** The Indexed Attribute */
+ private IndexedAttribute indexedAttribute;
+
+ /** The dirty flag */
+ private boolean dirty = false;
+
+ // UI Fields
+ private Text attributeIdText;
+ private Text cacheSizeText;
+
+
+ /**
+ * Creates a new instance of IndexedAttributeDialog.
+ */
+ public IndexedAttributeDialog( IndexedAttribute indexedAttribute )
+ {
+ super( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
+ this.indexedAttribute = indexedAttribute;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ protected void configureShell( Shell newShell )
+ {
+ super.configureShell( newShell );
+ newShell.setText( "Indexed Attribute Dialog" );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = new Composite( parent, SWT.NONE );
+ GridLayout layout = new GridLayout( 2, false );
+ composite.setLayout( layout );
+ composite.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+
+ Label attributeIdLabel = new Label( composite, SWT.NONE );
+ attributeIdLabel.setText( "Attribute ID:" );
+
+ attributeIdText = new Text( composite, SWT.BORDER );
+ attributeIdText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ Label cacheSizeLabel = new Label( composite, SWT.NONE );
+ cacheSizeLabel.setText( "Cache Size:" );
+
+ cacheSizeText = new Text( composite, SWT.BORDER );
+ cacheSizeText.addVerifyListener( new VerifyListener()
+ {
+ public void verifyText( VerifyEvent e )
+ {
+ if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
+ {
+ e.doit = false;
+ }
+ }
+ } );
+ cacheSizeText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ initFromInput();
+ addListeners();
+
+ return composite;
+ }
+
+
+ /**
+ * Initializes the UI from the input.
+ */
+ private void initFromInput()
+ {
+ String attributeId = indexedAttribute.getAttributeId();
+ attributeIdText.setText( ( attributeId == null ) ? "" : attributeId );
+ cacheSizeText.setText( "" + indexedAttribute.getCacheSize() );
+ }
+
+
+ /**
+ * Adds listeners to the UI Fields.
+ */
+ private void addListeners()
+ {
+ attributeIdText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ dirty = true;
+ }
+ } );
+
+ cacheSizeText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ dirty = true;
+ }
+ } );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ protected void okPressed()
+ {
+ indexedAttribute.setAttributeId( attributeIdText.getText() );
+ try
+ {
+ indexedAttribute.setCacheSize( Integer.parseInt( cacheSizeText.getText() ) );
+ }
+ catch ( NumberFormatException e )
+ {
+ // Nothing to do, it won't happen
+ }
+
+ super.okPressed();
+ }
+
+
+ /**
+ * Gets the Indexed Attribute.
+ *
+ * @return
+ * the Indexed Attribute
+ */
+ public IndexedAttribute getIndexedAttribute()
+ {
+ return indexedAttribute;
+ }
+
+
+ /**
+ * Returns the dirty flag of the dialog.
+ *
+ * @return
+ * the dirty flag of the dialog
+ */
+ public boolean isDirty()
+ {
+ return dirty;
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/AttributeValueObject.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/AttributeValueObject.java
new file mode 100644
index 0000000..03456bc
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/AttributeValueObject.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+/**
+ * This class implements an Attribute Value Object that is used in the PartitionDetailsPage.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AttributeValueObject
+{
+ /** The attribute */
+ private String attribute;
+
+ /** The value */
+ private Object value;
+
+
+ /**
+ * Creates a new instance of AttributeValueObject.
+ *
+ * @param attribute
+ * the attribute
+ * @param value
+ * the value
+ */
+ public AttributeValueObject( String attribute, Object value )
+ {
+ this.attribute = attribute;
+ this.value = value;
+ }
+
+
+ /**
+ * Gets the attribute.
+ *
+ * @return
+ * the attribute.
+ */
+ public String getAttribute()
+ {
+ return attribute;
+ }
+
+
+ /**
+ * Sets the attribute.
+ *
+ * @param attribute
+ * the new attribute
+ */
+ public void setId( String attribute )
+ {
+ this.attribute = attribute;
+ }
+
+
+ /**
+ * Gets the value.
+ *
+ * @return
+ * the value
+ */
+ public Object getValue()
+ {
+ return value;
+ }
+
+
+ /**
+ * Sets the value.
+ *
+ * @param value
+ * the new value
+ */
+ public void setValue( Object value )
+ {
+ this.value = value;
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString()
+ {
+ return "Attribute=\"" + attribute + "\", Value=\"" + value + "\"";
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationDetailsPage.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationDetailsPage.java
new file mode 100644
index 0000000..e6813b8
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationDetailsPage.java
@@ -0,0 +1,250 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+import org.apache.directory.studio.apacheds.configuration.model.ExtendedOperation;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.IDetailsPage;
+import org.eclipse.ui.forms.IFormPart;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+
+/**
+ * This class represents the Details Page of the Server Configuration Editor for the Extended Operation type
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ExtendedOperationDetailsPage implements IDetailsPage
+{
+ /** The associated Master Details Block */
+ private ExtendedOperationsMasterDetailsBlock masterDetailsBlock;
+
+ /** The Managed Form */
+ private IManagedForm mform;
+
+ /** The input Interceptor */
+ private ExtendedOperation input;
+
+ /** The dirty flag */
+ private boolean dirty = false;
+
+ // UI fields
+ private Text classTypeText;
+
+ // Listeners
+ /** The Modify Listener for Text Widgets */
+ private ModifyListener textModifyListener = new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ masterDetailsBlock.setEditorDirty();
+ dirty = true;
+ }
+ };
+
+
+ /**
+ * Creates a new instance of ExtendedOperationDetailsPage.
+ *
+ * @param emdb
+ * the associated Master Details Block
+ */
+ public ExtendedOperationDetailsPage( ExtendedOperationsMasterDetailsBlock emdb )
+ {
+ masterDetailsBlock = emdb;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IDetailsPage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ public void createContents( Composite parent )
+ {
+ FormToolkit toolkit = mform.getToolkit();
+ TableWrapLayout layout = new TableWrapLayout();
+ layout.topMargin = 5;
+ layout.leftMargin = 5;
+ layout.rightMargin = 2;
+ layout.bottomMargin = 2;
+ parent.setLayout( layout );
+
+ createDetailsSection( parent, toolkit );
+ }
+
+
+ /**
+ * Creates the Details Section
+ *
+ * @param parent
+ * the parent composite
+ * @param toolkit
+ * the toolkit to use
+ */
+ private void createDetailsSection( Composite parent, FormToolkit toolkit )
+ {
+ Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
+ section.marginWidth = 10;
+ section.setText( "Extended Operation Details" ); //$NON-NLS-1$
+ section.setDescription( "Set the properties of the extended operation." ); //$NON-NLS-1$
+ TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
+ td.grabHorizontal = true;
+ section.setLayoutData( td );
+ Composite client = toolkit.createComposite( section );
+ toolkit.paintBordersFor( client );
+ GridLayout glayout = new GridLayout( 3, false );
+ client.setLayout( glayout );
+ section.setClient( client );
+
+ // Class
+ toolkit.createLabel( client, "Class:" );
+ classTypeText = toolkit.createText( client, "" );
+ classTypeText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
+
+ addListeners();
+ }
+
+
+ /**
+ * Adds listeners to UI fields.
+ */
+ private void addListeners()
+ {
+ classTypeText.addModifyListener( textModifyListener );
+ }
+
+
+ /**
+ * Removes listeners to UI fields.
+ */
+ private void removeListeners()
+ {
+ classTypeText.removeModifyListener( textModifyListener );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IPartSelectionListener#selectionChanged(org.eclipse.ui.forms.IFormPart, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged( IFormPart part, ISelection selection )
+ {
+ IStructuredSelection ssel = ( IStructuredSelection ) selection;
+ if ( ssel.size() == 1 )
+ {
+ input = ( ExtendedOperation ) ssel.getFirstElement();
+ }
+ else
+ {
+ input = null;
+ }
+ refresh();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#commit(boolean)
+ */
+ public void commit( boolean onSave )
+ {
+ if ( input != null )
+ {
+ input.setClassType( classTypeText.getText() );
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#dispose()
+ */
+ public void dispose()
+ {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#initialize(org.eclipse.ui.forms.IManagedForm)
+ */
+ public void initialize( IManagedForm form )
+ {
+ this.mform = form;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#isDirty()
+ */
+ public boolean isDirty()
+ {
+ return dirty;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#isStale()
+ */
+ public boolean isStale()
+ {
+ return false;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#refresh()
+ */
+ public void refresh()
+ {
+ removeListeners();
+
+ classTypeText.setText( input.getClassType() );
+
+ addListeners();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#setFocus()
+ */
+ public void setFocus()
+ {
+ classTypeText.setFocus();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#setFormInput(java.lang.Object)
+ */
+ public boolean setFormInput( Object input )
+ {
+ return false;
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java
new file mode 100644
index 0000000..9d13248
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java
@@ -0,0 +1,309 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+import java.util.List;
+
+import org.apache.directory.studio.apacheds.configuration.Activator;
+import org.apache.directory.studio.apacheds.configuration.PluginConstants;
+import org.apache.directory.studio.apacheds.configuration.model.ExtendedOperation;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.forms.DetailsPart;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.MasterDetailsBlock;
+import org.eclipse.ui.forms.SectionPart;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class represents the Extended Operations Master/Details Block used in the Extended Operations Page.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ExtendedOperationsMasterDetailsBlock extends MasterDetailsBlock
+{
+ /** The associated page */
+ private FormPage page;
+
+ /** The input Server Configuration */
+ private ServerConfiguration serverConfiguration;
+
+ /** The Extended Operations List */
+ private List<ExtendedOperation> extendedOperations;
+
+ /** The Details Page */
+ private ExtendedOperationDetailsPage detailsPage;
+
+ private static final String NEW_NAME = "newExtendedOperation";
+
+ // UI Fields
+ private TableViewer viewer;
+ private Button addButton;
+ private Button deleteButton;
+
+
+ /**
+ * Creates a new instance of ExtendedOperationsMasterDetailsBlock.
+ *
+ * @param page
+ */
+ public ExtendedOperationsMasterDetailsBlock( FormPage page )
+ {
+ this.page = page;
+ serverConfiguration = ( ( ServerConfigurationEditorInput ) page.getEditorInput() ).getServerConfiguration();
+ extendedOperations = serverConfiguration.getExtendedOperations();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.MasterDetailsBlock#createMasterPart(org.eclipse.ui.forms.IManagedForm, org.eclipse.swt.widgets.Composite)
+ */
+ protected void createMasterPart( final IManagedForm managedForm, Composite parent )
+ {
+ FormToolkit toolkit = managedForm.getToolkit();
+
+ // Creating the Section
+ Section section = toolkit.createSection( parent, Section.TITLE_BAR );
+ section.setText( "All Extended Operations" );
+ section.marginWidth = 10;
+ section.marginHeight = 5;
+ Composite client = toolkit.createComposite( section, SWT.WRAP );
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.makeColumnsEqualWidth = false;
+ layout.marginWidth = 2;
+ layout.marginHeight = 2;
+ client.setLayout( layout );
+ toolkit.paintBordersFor( client );
+ section.setClient( client );
+
+ // Creatig the Table and Table Viewer
+ Table table = toolkit.createTable( client, SWT.NULL );
+ GridData gd = new GridData( SWT.FILL, SWT.FILL, true, true, 1, 2 );
+ gd.heightHint = 20;
+ gd.widthHint = 100;
+ table.setLayoutData( gd );
+ final SectionPart spart = new SectionPart( section );
+ managedForm.addPart( spart );
+ viewer = new TableViewer( table );
+ viewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ managedForm.fireSelectionChanged( spart, event.getSelection() );
+ }
+ } );
+ viewer.setContentProvider( new ArrayContentProvider() );
+ viewer.setLabelProvider( new LabelProvider()
+ {
+ public Image getImage( Object element )
+ {
+ return AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+ PluginConstants.IMG_EXTENDED_OPERATION ).createImage();
+ }
+ } );
+
+ // Creating the button(s)
+ addButton = toolkit.createButton( client, "Add...", SWT.PUSH ); //$NON-NLS-1$
+ addButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
+
+ deleteButton = toolkit.createButton( client, "Delete", SWT.PUSH );
+ deleteButton.setEnabled( false );
+ deleteButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
+
+ initFromInput();
+ addListeners();
+ }
+
+
+ /**
+ * Initializes the page with the Editor input.
+ */
+ private void initFromInput()
+ {
+ viewer.setInput( extendedOperations );
+ }
+
+
+ /**
+ * Add listeners to UI fields.
+ */
+ private void addListeners()
+ {
+ viewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ viewer.refresh();
+
+ deleteButton.setEnabled( !event.getSelection().isEmpty() );
+ }
+ } );
+
+ addButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ ExtendedOperation newExtendedOperation = new ExtendedOperation( getNewName() );
+ extendedOperations.add( newExtendedOperation );
+ viewer.refresh();
+ viewer.setSelection( new StructuredSelection( newExtendedOperation ) );
+ setEditorDirty();
+ }
+ } );
+
+ deleteButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ ExtendedOperation extendedOperation = ( ExtendedOperation ) selection.getFirstElement();
+
+ extendedOperations.remove( extendedOperation );
+ viewer.refresh();
+ setEditorDirty();
+ }
+ }
+ } );
+ }
+
+
+ /**
+ * Gets a new Name for a new Extended Operation.
+ *
+ * @return
+ * a new Name for a new Extended Operation
+ */
+ private String getNewName()
+ {
+ int counter = 1;
+ String name = NEW_NAME;
+ boolean ok = false;
+
+ while ( !ok )
+ {
+ ok = true;
+ name = NEW_NAME + counter;
+
+ for ( ExtendedOperation extendedOperation : extendedOperations )
+ {
+ if ( extendedOperation.getClassType().equalsIgnoreCase( name ) )
+ {
+ ok = false;
+ }
+ }
+
+ counter++;
+ }
+
+ return name;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.MasterDetailsBlock#createToolBarActions(org.eclipse.ui.forms.IManagedForm)
+ */
+ protected void createToolBarActions( IManagedForm managedForm )
+ {
+ final ScrolledForm form = managedForm.getForm();
+
+ // Horizontal layout Action
+ Action horizontalAction = new Action( "Horizontal layout", Action.AS_RADIO_BUTTON ) { //$NON-NLS-1$
+ public void run()
+ {
+ sashForm.setOrientation( SWT.HORIZONTAL );
+ form.reflow( true );
+ }
+ };
+ horizontalAction.setChecked( true );
+ horizontalAction.setToolTipText( "Horizontal Orientation" ); //$NON-NLS-1$
+ horizontalAction.setImageDescriptor( Activator.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+ PluginConstants.IMG_HORIZONTAL_ORIENTATION ) );
+
+ // Vertical layout Action
+ Action verticalAction = new Action( "Vertical Orientation", Action.AS_RADIO_BUTTON ) { //$NON-NLS-1$
+ public void run()
+ {
+ sashForm.setOrientation( SWT.VERTICAL );
+ form.reflow( true );
+ }
+ };
+ verticalAction.setChecked( false );
+ verticalAction.setToolTipText( "Vertical Orientation" ); //$NON-NLS-1$
+ verticalAction.setImageDescriptor( Activator.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+ PluginConstants.IMG_VERTICAL_ORIENTATION ) );
+
+ form.getToolBarManager().add( horizontalAction );
+ form.getToolBarManager().add( verticalAction );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.MasterDetailsBlock#registerPages(org.eclipse.ui.forms.DetailsPart)
+ */
+ protected void registerPages( DetailsPart detailsPart )
+ {
+ detailsPage = new ExtendedOperationDetailsPage( this );
+ detailsPart.registerPage( ExtendedOperation.class, detailsPage );
+ }
+
+
+ /**
+ * Sets the Editor as dirty.
+ */
+ public void setEditorDirty()
+ {
+ ( ( ServerConfigurationEditor ) page.getEditor() ).setDirty( true );
+ }
+
+
+ /**
+ * Saves the necessary elements to the input model.
+ */
+ public void save()
+ {
+ detailsPage.commit( true );
+ viewer.setInput( extendedOperations );
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationsPage.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationsPage.java
new file mode 100644
index 0000000..f397201
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ExtendedOperationsPage.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+
+
+/**
+ * This class represents the Extended Operations Page of the Server Configuration Editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ExtendedOperationsPage extends FormPage
+{
+ /** The Page ID*/
+ public static final String ID = ServerConfigurationEditor.ID + ".ExtendedOperationsPage";
+
+ /** The Page Title */
+ private static final String TITLE = "Extended Operations";
+
+ /** The Master/Details Block */
+ private ExtendedOperationsMasterDetailsBlock masterDetailsBlock;
+
+
+ /**
+ * Creates a new instance of ExtendedOperationsPage.
+ *
+ * @param editor
+ * the associated editor
+ */
+ public ExtendedOperationsPage( FormEditor editor )
+ {
+ super( editor, ID, TITLE );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+ */
+ protected void createFormContent( IManagedForm managedForm )
+ {
+ final ScrolledForm form = managedForm.getForm();
+ form.setText( "Extended Operations" );
+ masterDetailsBlock = new ExtendedOperationsMasterDetailsBlock( this );
+ masterDetailsBlock.createContent( managedForm );
+ }
+
+
+ /**
+ * Saves the necessary elements to the input model.
+ */
+ public void save()
+ {
+ if ( masterDetailsBlock != null )
+ {
+ masterDetailsBlock.save();
+ }
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/GeneralPage.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/GeneralPage.java
new file mode 100644
index 0000000..024ccd7
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/GeneralPage.java
@@ -0,0 +1,636 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+import java.util.List;
+
+import org.apache.directory.studio.apacheds.configuration.dialogs.BinaryAttributeDialog;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+
+/**
+ * This class represents the General Page of the Server Configuration Editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class GeneralPage extends FormPage
+{
+ /** The Page ID*/
+ public static final String ID = ServerConfigurationEditor.ID + ".BasicPage";
+
+ /** The Page Title */
+ private static final String TITLE = "General";
+
+ /** The Binary Attribute List */
+ private List<String> binaryAttributes;
+
+ // UI Fields
+ private Text portText;
+ private Combo authenticationCombo;
+ private Text principalText;
+ private Text passwordText;
+ private Button showPasswordCheckbox;
+ private Button allowAnonymousAccessCheckbox;
+ private Text maxTimeLimitText;
+ private Text maxSizeLimitText;
+ private Text synchPeriodText;
+ private Text maxThreadsText;
+ private Button enableAccesControlCheckbox;
+ private Button enableNTPCheckbox;
+ private Button enableKerberosCheckbox;
+ private Button enableChangePasswordCheckbox;
+ private Button denormalizeOpAttrCheckbox;
+ private TableViewer binaryAttributesTableViewer;
+ private Button binaryAttributesAddButton;
+ private Button binaryAttributesEditButton;
+ private Button binaryAttributesDeleteButton;
+
+
+ /**
+ * Creates a new instance of GeneralPage.
+ *
+ * @param editor
+ * the associated editor
+ */
+ public GeneralPage( FormEditor editor )
+ {
+ super( editor, ID, TITLE );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+ */
+ protected void createFormContent( IManagedForm managedForm )
+ {
+ ScrolledForm form = managedForm.getForm();
+ form.setText( "General" );
+
+ Composite parent = form.getBody();
+ TableWrapLayout twl = new TableWrapLayout();
+ twl.numColumns = 2;
+ parent.setLayout( twl );
+ FormToolkit toolkit = managedForm.getToolkit();
+
+ createSettingsSection( parent, toolkit );
+ createBinaryAttributesSection( parent, toolkit );
+ createLimitsSection( parent, toolkit );
+ createOptionsSection( parent, toolkit );
+
+ initFromInput();
+ addListeners();
+ }
+
+
+ /**
+ * Creates the Settings Section.
+ *
+ * @param parent
+ * the parent composite
+ * @param toolkit
+ * the toolkit to use
+ */
+ private void createSettingsSection( Composite parent, FormToolkit toolkit )
+ {
+ // Creation of the section
+ Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
+ section.marginWidth = 4;
+ section.setText( "Settings" );
+ section.setDescription( "Set the settings of the server." );
+ TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
+ td.grabHorizontal = true;
+ section.setLayoutData( td );
+ Composite client = toolkit.createComposite( section );
+ toolkit.paintBordersFor( client );
+ GridLayout glayout = new GridLayout( 2, false );
+ client.setLayout( glayout );
+ section.setClient( client );
+
+ // Port
+ toolkit.createLabel( client, "Port:" );
+ portText = toolkit.createText( client, "" );
+ portText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+ portText.addVerifyListener( new VerifyListener()
+ {
+ public void verifyText( VerifyEvent e )
+ {
+ if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
+ {
+ e.doit = false;
+ }
+ }
+ } );
+
+ // Authentication
+ toolkit.createLabel( client, "Authentication:" );
+ authenticationCombo = new Combo( client, SWT.SIMPLE );
+ authenticationCombo.setItems( new String[]
+ { "Simple" } );
+ authenticationCombo.setText( "Simple" );
+ authenticationCombo.setEnabled( false );
+ authenticationCombo.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ // Principal
+ toolkit.createLabel( client, "Principal:" );
+ principalText = toolkit.createText( client, "" );
+ principalText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ // Password
+ toolkit.createLabel( client, "Password:" );
+ passwordText = toolkit.createText( client, "" );
+ passwordText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+ passwordText.setEchoChar( '\u2022' );
+
+ // Show Password
+ toolkit.createLabel( client, "" );
+ showPasswordCheckbox = toolkit.createButton( client, "Show password", SWT.CHECK );
+ showPasswordCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+ showPasswordCheckbox.setSelection( false );
+ showPasswordCheckbox.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ if ( showPasswordCheckbox.getSelection() )
+ {
+ passwordText.setEchoChar( '\0' );
+ }
+ else
+ {
+ passwordText.setEchoChar( '\u2022' );
+ }
+ }
+ } );
+
+ // Allow Anonymous Access
+ allowAnonymousAccessCheckbox = toolkit.createButton( client, "Allow Anonymous Access", SWT.CHECK );
+ allowAnonymousAccessCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
+ }
+
+
+ /**
+ * Creates the Limits Section
+ *
+ * @param parent
+ * the parent composite
+ * @param toolkit
+ * the toolkit to use
+ */
+ private void createLimitsSection( Composite parent, FormToolkit toolkit )
+ {
+ // Creation of the section
+ Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
+ section.marginWidth = 4;
+ section.setText( "Limits" );
+ section.setDescription( "Set the limits of the server." );
+ TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
+ td.grabHorizontal = true;
+ section.setLayoutData( td );
+ Composite client = toolkit.createComposite( section );
+ toolkit.paintBordersFor( client );
+ GridLayout glayout = new GridLayout( 2, false );
+ client.setLayout( glayout );
+ section.setClient( client );
+
+ // Max. Time Limit
+ toolkit.createLabel( client, "Max. Time Limit:" );
+ maxTimeLimitText = toolkit.createText( client, "" );
+ maxTimeLimitText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+ maxTimeLimitText.addVerifyListener( new VerifyListener()
+ {
+ public void verifyText( VerifyEvent e )
+ {
+ if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
+ {
+ e.doit = false;
+ }
+ }
+ } );
+
+ // Max. Size Limit
+ toolkit.createLabel( client, "Max. Size Limit:" );
+ maxSizeLimitText = toolkit.createText( client, "" );
+ maxSizeLimitText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+ maxSizeLimitText.addVerifyListener( new VerifyListener()
+ {
+ public void verifyText( VerifyEvent e )
+ {
+ if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
+ {
+ e.doit = false;
+ }
+ }
+ } );
+
+ // Synchronization Period
+ toolkit.createLabel( client, "Synchronization Period:" );
+ synchPeriodText = toolkit.createText( client, "" );
+ synchPeriodText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+ synchPeriodText.addVerifyListener( new VerifyListener()
+ {
+ public void verifyText( VerifyEvent e )
+ {
+ if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
+ {
+ e.doit = false;
+ }
+ }
+ } );
+
+ // Max. Threads
+ toolkit.createLabel( client, "Max. Threads:" );
+ maxThreadsText = toolkit.createText( client, "" );
+ maxThreadsText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+ maxThreadsText.addVerifyListener( new VerifyListener()
+ {
+ public void verifyText( VerifyEvent e )
+ {
+ if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
+ {
+ e.doit = false;
+ }
+ }
+ } );
+ }
+
+
+ /**
+ * Creates the Options Section
+ *
+ * @param parent
+ * the parent composite
+ * @param toolkit
+ * the toolkit to use
+ */
+ private void createOptionsSection( Composite parent, FormToolkit toolkit )
+ {
+ // Creation of the section
+ Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
+ section.marginWidth = 4;
+ section.setText( "Options" );
+ section.setDescription( "Set the options of the server." );
+ TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
+ td.grabHorizontal = true;
+ section.setLayoutData( td );
+ Composite client = toolkit.createComposite( section );
+ toolkit.paintBordersFor( client );
+ GridLayout glayout = new GridLayout();
+ client.setLayout( glayout );
+ section.setClient( client );
+
+ // Enable Access Control
+ enableAccesControlCheckbox = toolkit.createButton( client, "Enable Access Control", SWT.CHECK );
+ enableAccesControlCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ // Enable NTP
+ enableNTPCheckbox = toolkit.createButton( client, "Enable NTP", SWT.CHECK );
+ enableNTPCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ // Denormalize Operational Attributes
+ denormalizeOpAttrCheckbox = toolkit.createButton( client, "Denormalize Operational Attributes", SWT.CHECK );
+ denormalizeOpAttrCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ // Enable Kerberos
+ enableKerberosCheckbox = toolkit.createButton( client, "Enable Kerberos", SWT.CHECK );
+ enableKerberosCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+ enableKerberosCheckbox.setEnabled( false );
+
+ // Enable Change Password
+ enableChangePasswordCheckbox = toolkit.createButton( client, "Enable Change Password", SWT.CHECK );
+ enableChangePasswordCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+ enableChangePasswordCheckbox.setEnabled( false );
+ }
+
+
+ /**
+ * Creates the Options Section
+ *
+ * @param parent
+ * the parent composite
+ * @param toolkit
+ * the toolkit to use
+ */
+ private void createBinaryAttributesSection( Composite parent, FormToolkit toolkit )
+ {
+ // Creation of the section
+ Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
+ section.marginWidth = 4;
+ section.setText( "Binary Attributes" );
+ section
+ .setDescription( "Set attribute type names and OID's if you want an them to be handled as binary content." );
+ TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
+ td.grabHorizontal = true;
+ section.setLayoutData( td );
+ Composite client = toolkit.createComposite( section );
+ toolkit.paintBordersFor( client );
+ GridLayout glayout = new GridLayout( 2, false );
+ client.setLayout( glayout );
+ section.setClient( client );
+
+ Table binaryAttributesTable = toolkit.createTable( client, SWT.NONE );
+ GridData gd = new GridData( SWT.FILL, SWT.NONE, true, false, 1, 3 );
+ gd.heightHint = 103;
+ binaryAttributesTable.setLayoutData( gd );
+ binaryAttributesTableViewer = new TableViewer( binaryAttributesTable );
+ binaryAttributesTableViewer.setContentProvider( new ArrayContentProvider() );
+ binaryAttributesTableViewer.setLabelProvider( new LabelProvider() );
+
+ GridData buttonsGD = new GridData( SWT.FILL, SWT.BEGINNING, false, false );
+ buttonsGD.widthHint = IDialogConstants.BUTTON_WIDTH;
+
+ binaryAttributesAddButton = toolkit.createButton( client, "Add...", SWT.PUSH );
+ binaryAttributesAddButton.setLayoutData( buttonsGD );
+
+ binaryAttributesEditButton = toolkit.createButton( client, "Edit...", SWT.PUSH );
+ binaryAttributesEditButton.setEnabled( false );
+ binaryAttributesEditButton.setLayoutData( buttonsGD );
+
+ binaryAttributesDeleteButton = toolkit.createButton( client, "Delete", SWT.PUSH );
+ binaryAttributesDeleteButton.setEnabled( false );
+ binaryAttributesDeleteButton.setLayoutData( buttonsGD );
+ }
+
+
+ /**
+ * Initializes the page with the Editor input.
+ */
+ private void initFromInput()
+ {
+ ServerConfiguration configuration = ( ( ServerConfigurationEditorInput ) getEditorInput() )
+ .getServerConfiguration();
+
+ binaryAttributes = configuration.getBinaryAttributes();
+ binaryAttributesTableViewer.setInput( binaryAttributes );
+
+ // Port
+ portText.setText( "" + configuration.getPort() );
+
+ // Principal
+ String principal = configuration.getPrincipal();
+ if ( principal != null )
+ {
+ principalText.setText( principal );
+ }
+
+ // Password
+ String password = configuration.getPassword();
+ if ( password != null )
+ {
+ passwordText.setText( password );
+ }
+
+ // Allow Anonymous Access
+ allowAnonymousAccessCheckbox.setSelection( configuration.isAllowAnonymousAccess() );
+
+ // Max Time Limit
+ maxTimeLimitText.setText( "" + configuration.getMaxTimeLimit() );
+
+ // Max Size Limit
+ maxSizeLimitText.setText( "" + configuration.getMaxSizeLimit() );
+
+ // Synchronization Period
+ synchPeriodText.setText( "" + configuration.getSynchronizationPeriod() );
+
+ // Max Threads
+ maxThreadsText.setText( "" + configuration.getMaxThreads() );
+
+ // Enable Access Control
+ enableAccesControlCheckbox.setSelection( configuration.isEnableAccessControl() );
+
+ // Enable NTP
+ enableNTPCheckbox.setSelection( configuration.isEnableNTP() );
+
+ // Enable Kerberos
+ enableKerberosCheckbox.setSelection( configuration.isEnableKerberos() );
+
+ // Enable Change Password
+ enableChangePasswordCheckbox.setSelection( configuration.isEnableChangePassword() );
+
+ // Denormalize Op Attr
+ denormalizeOpAttrCheckbox.setSelection( configuration.isDenormalizeOpAttr() );
+ }
+
+
+ /**
+ * Add listeners to UI fields.
+ */
+ private void addListeners()
+ {
+ // The Modify Listener
+ ModifyListener modifyListener = new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ setEditorDirty();
+ }
+ };
+
+ // The Selection Listener
+ SelectionListener selectionListener = new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ setEditorDirty();
+ }
+ };
+
+ // The ISelectionChangedListener for the Binary Attributes Table
+ ISelectionChangedListener binaryAttributesTableViewerListener = new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ binaryAttributesEditButton.setEnabled( !event.getSelection().isEmpty() );
+ binaryAttributesDeleteButton.setEnabled( !event.getSelection().isEmpty() );
+ }
+ };
+
+ // The IDoubleClickListener for the Binary Attributes Table
+ IDoubleClickListener binaryAttributesTableViewerDoubleClickListener = new IDoubleClickListener()
+ {
+ public void doubleClick( DoubleClickEvent event )
+ {
+ editSelectedBinaryAttribute();
+ }
+ };
+
+ // The SelectionListener for the Binary Attributes Add Button
+ SelectionListener binaryAttributesAddButtonListener = new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ BinaryAttributeDialog dialog = new BinaryAttributeDialog( "" );
+ if ( Dialog.OK == dialog.open() && dialog.isDirty() )
+ {
+ String newAttribute = dialog.getAttribute();
+ if ( newAttribute != null && !"".equals( newAttribute )
+ && !binaryAttributes.contains( newAttribute ) )
+ {
+ binaryAttributes.add( newAttribute );
+
+ binaryAttributesTableViewer.refresh();
+ setEditorDirty();
+ }
+ }
+ }
+ };
+
+ // The SelectionListener for the Binary Attributes Edit Button
+ SelectionListener binaryAttributesEditButtonListener = new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ editSelectedBinaryAttribute();
+ }
+ };
+
+ // The SelectionListener for the Binary Attributes Delete Button
+ SelectionListener binaryAttributesDeleteButtonListener = new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ StructuredSelection selection = ( StructuredSelection ) binaryAttributesTableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ String attribute = ( String ) selection.getFirstElement();
+ binaryAttributes.remove( attribute );
+
+ binaryAttributesTableViewer.refresh();
+ setEditorDirty();
+ }
+ }
+ };
+
+ portText.addModifyListener( modifyListener );
+ authenticationCombo.addModifyListener( modifyListener );
+ principalText.addModifyListener( modifyListener );
+ passwordText.addModifyListener( modifyListener );
+ allowAnonymousAccessCheckbox.addSelectionListener( selectionListener );
+ maxTimeLimitText.addModifyListener( modifyListener );
+ maxSizeLimitText.addModifyListener( modifyListener );
+ synchPeriodText.addModifyListener( modifyListener );
+ maxThreadsText.addModifyListener( modifyListener );
+ enableAccesControlCheckbox.addSelectionListener( selectionListener );
+ enableNTPCheckbox.addSelectionListener( selectionListener );
+ enableKerberosCheckbox.addSelectionListener( selectionListener );
+ enableChangePasswordCheckbox.addSelectionListener( selectionListener );
+ denormalizeOpAttrCheckbox.addSelectionListener( selectionListener );
+ binaryAttributesTableViewer.addSelectionChangedListener( binaryAttributesTableViewerListener );
+ binaryAttributesTableViewer.addDoubleClickListener( binaryAttributesTableViewerDoubleClickListener );
+ binaryAttributesAddButton.addSelectionListener( binaryAttributesAddButtonListener );
+ binaryAttributesEditButton.addSelectionListener( binaryAttributesEditButtonListener );
+ binaryAttributesDeleteButton.addSelectionListener( binaryAttributesDeleteButtonListener );
+ }
+
+
+ /**
+ * Opens a Binary Attribute Dialog with the selected Attribute Value Object in the
+ * Binary Attributes Table Viewer.
+ */
+ private void editSelectedBinaryAttribute()
+ {
+ StructuredSelection selection = ( StructuredSelection ) binaryAttributesTableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ String oldAttribute = ( String ) selection.getFirstElement();
+
+ BinaryAttributeDialog dialog = new BinaryAttributeDialog( oldAttribute );
+ if ( Dialog.OK == dialog.open() && dialog.isDirty() )
+ {
+ binaryAttributes.remove( oldAttribute );
+
+ String newAttribute = dialog.getAttribute();
+ if ( newAttribute != null && !"".equals( newAttribute ) && !binaryAttributes.contains( newAttribute ) )
+ {
+ binaryAttributes.add( newAttribute );
+ }
+
+ binaryAttributesTableViewer.refresh();
+ setEditorDirty();
+ }
+ }
+ }
+
+
+ /**
+ * Sets the Editor as dirty.
+ */
+ private void setEditorDirty()
+ {
+ ( ( ServerConfigurationEditor ) getEditor() ).setDirty( true );
+ }
+
+
+ /**
+ * Saves the necessary elements to the input model.
+ */
+ public void save()
+ {
+ ServerConfiguration serverConfiguration = ( ( ServerConfigurationEditorInput ) getEditorInput() )
+ .getServerConfiguration();
+
+ serverConfiguration.setPort( Integer.parseInt( portText.getText() ) );
+ serverConfiguration.setPrincipal( principalText.getText() );
+ serverConfiguration.setPassword( passwordText.getText() );
+ serverConfiguration.setAllowAnonymousAccess( allowAnonymousAccessCheckbox.getSelection() );
+ serverConfiguration.setMaxTimeLimit( Integer.parseInt( maxTimeLimitText.getText() ) );
+ serverConfiguration.setMaxSizeLimit( Integer.parseInt( maxSizeLimitText.getText() ) );
+ serverConfiguration.setSynchronizationPeriod( Long.parseLong( synchPeriodText.getText() ) );
+ serverConfiguration.setMaxThreads( Integer.parseInt( maxThreadsText.getText() ) );
+ serverConfiguration.setEnableAccessControl( enableAccesControlCheckbox.getSelection() );
+ serverConfiguration.setEnableNTP( enableNTPCheckbox.getSelection() );
+ serverConfiguration.setEnableKerberos( enableKerberosCheckbox.getSelection() );
+ serverConfiguration.setEnableChangePassword( enableChangePasswordCheckbox.getSelection() );
+ serverConfiguration.setDenormalizeOpAttr( denormalizeOpAttrCheckbox.getSelection() );
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorDetailsPage.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorDetailsPage.java
new file mode 100644
index 0000000..0c84a45
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorDetailsPage.java
@@ -0,0 +1,263 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+import org.apache.directory.studio.apacheds.configuration.model.Interceptor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.IDetailsPage;
+import org.eclipse.ui.forms.IFormPart;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+
+/**
+ * This class represents the Details Page of the Server Configuration Editor for the Interceptor type
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class InterceptorDetailsPage implements IDetailsPage
+{
+ /** The associated Master Details Block */
+ private InterceptorsMasterDetailsBlock masterDetailsBlock;
+
+ /** The Managed Form */
+ private IManagedForm mform;
+
+ /** The input Interceptor */
+ private Interceptor input;
+
+ /** The dirty flag */
+ private boolean dirty = false;
+
+ // UI fields
+ private Text nameText;
+ private Text classText;
+
+ // Listeners
+ /** The Modify Listener for Text Widgets */
+ private ModifyListener textModifyListener = new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ masterDetailsBlock.setEditorDirty();
+ dirty = true;
+ }
+ };
+
+
+ /**
+ * Creates a new instance of InterceptorDetailsPage.
+ *
+ * @param imdb
+ * The associated Master Details Block
+ */
+ public InterceptorDetailsPage( InterceptorsMasterDetailsBlock imdb )
+ {
+ masterDetailsBlock = imdb;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IDetailsPage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ public void createContents( Composite parent )
+ {
+ FormToolkit toolkit = mform.getToolkit();
+ TableWrapLayout layout = new TableWrapLayout();
+ layout.topMargin = 5;
+ layout.leftMargin = 5;
+ layout.rightMargin = 2;
+ layout.bottomMargin = 2;
+ parent.setLayout( layout );
+
+ createDetailsSection( parent, toolkit );
+ }
+
+
+ /**
+ * Creates the Details Section
+ *
+ * @param parent
+ * the parent composite
+ * @param toolkit
+ * the toolkit to use
+ */
+ private void createDetailsSection( Composite parent, FormToolkit toolkit )
+ {
+ Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
+ section.marginWidth = 10;
+ section.setText( "Interceptor Details" ); //$NON-NLS-1$
+ section.setDescription( "Set the properties of the interceptor." ); //$NON-NLS-1$
+ TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
+ td.grabHorizontal = true;
+ section.setLayoutData( td );
+ Composite client = toolkit.createComposite( section );
+ toolkit.paintBordersFor( client );
+ GridLayout glayout = new GridLayout( 3, false );
+ client.setLayout( glayout );
+ section.setClient( client );
+
+ // Name
+ toolkit.createLabel( client, "Name:" );
+ nameText = toolkit.createText( client, "" );
+ nameText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
+
+ // Class
+ toolkit.createLabel( client, "Class:" );
+ classText = toolkit.createText( client, "" );
+ classText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
+ }
+
+
+ /**
+ * Adds listeners to UI fields.
+ */
+ private void addListeners()
+ {
+ nameText.addModifyListener( textModifyListener );
+ classText.addModifyListener( textModifyListener );
+ }
+
+
+ /**
+ * Removes listeners to UI fields.
+ */
+ private void removeListeners()
+ {
+ nameText.removeModifyListener( textModifyListener );
+ classText.removeModifyListener( textModifyListener );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IPartSelectionListener#selectionChanged(org.eclipse.ui.forms.IFormPart, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged( IFormPart part, ISelection selection )
+ {
+ IStructuredSelection ssel = ( IStructuredSelection ) selection;
+ if ( ssel.size() == 1 )
+ {
+ input = ( Interceptor ) ssel.getFirstElement();
+ }
+ else
+ {
+ input = null;
+ }
+ refresh();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#commit(boolean)
+ */
+ public void commit( boolean onSave )
+ {
+ if ( input != null )
+ {
+ input.setName( nameText.getText() );
+ input.setClassType( classText.getText() );
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#dispose()
+ */
+ public void dispose()
+ {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#initialize(org.eclipse.ui.forms.IManagedForm)
+ */
+ public void initialize( IManagedForm form )
+ {
+ this.mform = form;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#isDirty()
+ */
+ public boolean isDirty()
+ {
+ return dirty;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#isStale()
+ */
+ public boolean isStale()
+ {
+ return false;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#refresh()
+ */
+ public void refresh()
+ {
+ removeListeners();
+
+ // Name
+ String name = input.getName();
+ nameText.setText( ( name == null ) ? "" : name );
+
+ // Class
+ String classType = input.getClassType();
+ classText.setText( ( classType == null ) ? "" : classType );
+
+ addListeners();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#setFocus()
+ */
+ public void setFocus()
+ {
+ nameText.setFocus();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#setFormInput(java.lang.Object)
+ */
+ public boolean setFormInput( Object input )
+ {
+ return false;
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java
new file mode 100644
index 0000000..5a113a2
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java
@@ -0,0 +1,395 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+import java.util.List;
+
+import org.apache.directory.studio.apacheds.configuration.Activator;
+import org.apache.directory.studio.apacheds.configuration.PluginConstants;
+import org.apache.directory.studio.apacheds.configuration.model.Interceptor;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.forms.DetailsPart;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.MasterDetailsBlock;
+import org.eclipse.ui.forms.SectionPart;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class represents the Interceptors Master/Details Block used in the Interceptors Page.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class InterceptorsMasterDetailsBlock extends MasterDetailsBlock
+{
+ /** The associated page */
+ private FormPage page;
+
+ /** The input Server Configuration */
+ private ServerConfiguration serverConfiguration;
+
+ /** The Interceptors List */
+ private List<Interceptor> interceptors;
+
+ /** The Details Page */
+ private InterceptorDetailsPage detailsPage;
+
+ private static final String NEW_NAME = "New Interceptor ";
+
+ // UI Fields
+ private TableViewer viewer;
+ private Button addButton;
+ private Button deleteButton;
+ private Button upButton;
+ private Button downButton;
+
+
+ /**
+ * Creates a new instance of InterceptorsMasterDetailsBlock.
+ *
+ * @param page
+ */
+ public InterceptorsMasterDetailsBlock( FormPage page )
+ {
+ this.page = page;
+ serverConfiguration = ( ( ServerConfigurationEditorInput ) page.getEditorInput() ).getServerConfiguration();
+ interceptors = serverConfiguration.getInterceptors();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.MasterDetailsBlock#createMasterPart(org.eclipse.ui.forms.IManagedForm, org.eclipse.swt.widgets.Composite)
+ */
+ protected void createMasterPart( final IManagedForm managedForm, Composite parent )
+ {
+ FormToolkit toolkit = managedForm.getToolkit();
+
+ // Creating the Section
+ Section section = toolkit.createSection( parent, Section.TITLE_BAR | Section.DESCRIPTION );
+ section.setText( "All Interceptors" );
+ section
+ .setDescription( " Set the Interceptors used in the server. Use the \"Up\" and \"Down\" buttons to change the order." );
+ section.marginWidth = 10;
+ section.marginHeight = 5;
+ Composite client = toolkit.createComposite( section, SWT.WRAP );
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.makeColumnsEqualWidth = false;
+ layout.marginWidth = 2;
+ layout.marginHeight = 2;
+ client.setLayout( layout );
+ toolkit.paintBordersFor( client );
+ section.setClient( client );
+
+ // Creatig the Table and Table Viewer
+ Table table = toolkit.createTable( client, SWT.NULL );
+ GridData gd = new GridData( SWT.FILL, SWT.FILL, true, true, 1, 4 );
+ gd.heightHint = 20;
+ gd.widthHint = 100;
+ table.setLayoutData( gd );
+ final SectionPart spart = new SectionPart( section );
+ managedForm.addPart( spart );
+ viewer = new TableViewer( table );
+ viewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ managedForm.fireSelectionChanged( spart, event.getSelection() );
+ }
+ } );
+ viewer.setContentProvider( new ArrayContentProvider() );
+ viewer.setLabelProvider( new LabelProvider()
+ {
+ public Image getImage( Object element )
+ {
+ return AbstractUIPlugin
+ .imageDescriptorFromPlugin( Activator.PLUGIN_ID, PluginConstants.IMG_INTERCEPTOR ).createImage();
+ }
+ } );
+
+ // Creating the button(s)
+ addButton = toolkit.createButton( client, "Add...", SWT.PUSH ); //$NON-NLS-1$
+ addButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
+
+ deleteButton = toolkit.createButton( client, "Delete", SWT.PUSH );
+ deleteButton.setEnabled( false );
+ deleteButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
+
+ upButton = toolkit.createButton( client, "Up", SWT.PUSH );
+ upButton.setEnabled( false );
+ upButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
+
+ downButton = toolkit.createButton( client, "Down", SWT.PUSH );
+ downButton.setEnabled( false );
+ downButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
+
+ initFromInput();
+ addListeners();
+ }
+
+
+ /**
+ * Initializes the page with the Editor input.
+ */
+ private void initFromInput()
+ {
+ viewer.setInput( interceptors );
+ }
+
+
+ /**
+ * Add listeners to UI fields.
+ */
+ private void addListeners()
+ {
+ viewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ viewer.refresh();
+
+ deleteButton.setEnabled( !event.getSelection().isEmpty() );
+
+ enableDisableUpDownButtons();
+ }
+ } );
+
+ addButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ Interceptor newInterceptor = new Interceptor( getNewName() );
+ interceptors.add( newInterceptor );
+ viewer.refresh();
+ viewer.setSelection( new StructuredSelection( newInterceptor ) );
+ setEditorDirty();
+ }
+ } );
+
+ deleteButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ Interceptor interceptor = ( Interceptor ) selection.getFirstElement();
+
+ interceptors.remove( interceptor );
+ viewer.refresh();
+ setEditorDirty();
+ }
+ }
+ } );
+
+ upButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ Interceptor interceptor = ( Interceptor ) selection.getFirstElement();
+
+ int index = interceptors.indexOf( interceptor );
+ if ( index > 0 )
+ {
+ Interceptor interceptorBefore = interceptors.get( index - 1 );
+ if ( interceptorBefore != null )
+ {
+ interceptors.set( index - 1, interceptor );
+ interceptors.set( index, interceptorBefore );
+
+ viewer.refresh();
+ setEditorDirty();
+ enableDisableUpDownButtons();
+ }
+ }
+ }
+ }
+ } );
+
+ downButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ Interceptor interceptor = ( Interceptor ) selection.getFirstElement();
+
+ int index = interceptors.indexOf( interceptor );
+ if ( index < ( interceptors.size() - 1 ) )
+ {
+ Interceptor interceptorAfter = interceptors.get( index + 1 );
+ if ( interceptorAfter != null )
+ {
+ interceptors.set( index + 1, interceptor );
+ interceptors.set( index, interceptorAfter );
+
+ viewer.refresh();
+ setEditorDirty();
+ enableDisableUpDownButtons();
+ }
+ }
+ }
+ }
+ } );
+ }
+
+
+ /**
+ * Gets a new Name for a new Extended Operation.
+ *
+ * @return
+ * a new Name for a new Extended Operation
+ */
+ private String getNewName()
+ {
+ int counter = 1;
+ String name = NEW_NAME;
+ boolean ok = false;
+
+ while ( !ok )
+ {
+ ok = true;
+ name = NEW_NAME + counter;
+
+ for ( Interceptor interceptor : interceptors )
+ {
+ if ( interceptor.getName().equalsIgnoreCase( name ) )
+ {
+ ok = false;
+ }
+ }
+
+ counter++;
+ }
+
+ return name;
+ }
+
+
+ /**
+ * Enables or Disables the Up and Down Buttons.
+ */
+ private void enableDisableUpDownButtons()
+ {
+ StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
+
+ upButton.setEnabled( !selection.isEmpty() );
+ downButton.setEnabled( !selection.isEmpty() );
+ if ( !selection.isEmpty() )
+ {
+ Interceptor interceptor = ( Interceptor ) selection.getFirstElement();
+ upButton.setEnabled( interceptors.indexOf( interceptor ) != 0 );
+ downButton.setEnabled( interceptors.indexOf( interceptor ) != ( interceptors.size() - 1 ) );
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.MasterDetailsBlock#createToolBarActions(org.eclipse.ui.forms.IManagedForm)
+ */
+ protected void createToolBarActions( IManagedForm managedForm )
+ {
+ final ScrolledForm form = managedForm.getForm();
+
+ // Horizontal layout Action
+ Action horizontalAction = new Action( "Horizontal layout", Action.AS_RADIO_BUTTON ) { //$NON-NLS-1$
+ public void run()
+ {
+ sashForm.setOrientation( SWT.HORIZONTAL );
+ form.reflow( true );
+ }
+ };
+ horizontalAction.setChecked( true );
+ horizontalAction.setToolTipText( "Horizontal Orientation" ); //$NON-NLS-1$
+ horizontalAction.setImageDescriptor( Activator.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+ PluginConstants.IMG_HORIZONTAL_ORIENTATION ) );
+
+ // Vertical layout Action
+ Action verticalAction = new Action( "Vertical Orientation", Action.AS_RADIO_BUTTON ) { //$NON-NLS-1$
+ public void run()
+ {
+ sashForm.setOrientation( SWT.VERTICAL );
+ form.reflow( true );
+ }
+ };
+ verticalAction.setChecked( false );
+ verticalAction.setToolTipText( "Vertical Orientation" ); //$NON-NLS-1$
+ verticalAction.setImageDescriptor( Activator.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+ PluginConstants.IMG_VERTICAL_ORIENTATION ) );
+
+ form.getToolBarManager().add( horizontalAction );
+ form.getToolBarManager().add( verticalAction );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.MasterDetailsBlock#registerPages(org.eclipse.ui.forms.DetailsPart)
+ */
+ protected void registerPages( DetailsPart detailsPart )
+ {
+ detailsPage = new InterceptorDetailsPage( this );
+ detailsPart.registerPage( Interceptor.class, detailsPage );
+ }
+
+
+ /**
+ * Sets the Editor as dirty.
+ */
+ public void setEditorDirty()
+ {
+ ( ( ServerConfigurationEditor ) page.getEditor() ).setDirty( true );
+ }
+
+
+ /**
+ * Saves the necessary elements to the input model.
+ */
+ public void save()
+ {
+ detailsPage.commit( true );
+ viewer.setInput( interceptors );
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorsPage.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorsPage.java
new file mode 100644
index 0000000..84a18cd
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/InterceptorsPage.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+
+
+/**
+ * This class represents the Interceptors Page of the Server Configuration Editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class InterceptorsPage extends FormPage
+{
+ /** The Page ID*/
+ public static final String ID = ServerConfigurationEditor.ID + ".InterceptorsPage";
+
+ /** The Page Title */
+ private static final String TITLE = "Interceptors";
+
+ /** The Master/Details Block */
+ private InterceptorsMasterDetailsBlock masterDetailsBlock;
+
+
+ /**
+ * Creates a new instance of InterceptorsPage.
+ *
+ * @param editor
+ * the associated editor
+ */
+ public InterceptorsPage( FormEditor editor )
+ {
+ super( editor, ID, TITLE );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+ */
+ protected void createFormContent( IManagedForm managedForm )
+ {
+ final ScrolledForm form = managedForm.getForm();
+ form.setText( "Interceptors" );
+ masterDetailsBlock = new InterceptorsMasterDetailsBlock( this );
+ masterDetailsBlock.createContent( managedForm );
+ }
+
+
+ /**
+ * Saves the necessary elements to the input model.
+ */
+ public void save()
+ {
+ if ( masterDetailsBlock != null )
+ {
+ masterDetailsBlock.save();
+ }
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionDetailsPage.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionDetailsPage.java
new file mode 100644
index 0000000..bdfe9f6
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionDetailsPage.java
@@ -0,0 +1,801 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+
+import org.apache.directory.studio.apacheds.configuration.dialogs.AttributeValueDialog;
+import org.apache.directory.studio.apacheds.configuration.dialogs.IndexedAttributeDialog;
+import org.apache.directory.studio.apacheds.configuration.model.IndexedAttribute;
+import org.apache.directory.studio.apacheds.configuration.model.Partition;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.IDetailsPage;
+import org.eclipse.ui.forms.IFormPart;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.forms.widgets.TableWrapData;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+
+/**
+ * This class represents the Details Page of the Server Configuration Editor for the Partition type
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class PartitionDetailsPage implements IDetailsPage
+{
+ /** The associated Master Details Block */
+ private PartitionsMasterDetailsBlock masterDetailsBlock;
+
+ /** The Managed Form */
+ private IManagedForm mform;
+
+ /** The input Partition */
+ private Partition input;
+
+ /** The Context Entry */
+ private Attributes contextEntry;
+
+ /** The Indexed Attributes List */
+ private List<IndexedAttribute> indexedAttributes;
+
+ /** The dirty flag */
+ private boolean dirty = false;
+
+ // UI fields
+ private Text nameText;
+ private Text cacheSizeText;
+ private Text suffixText;
+ private Button enableOptimizerCheckbox;
+ private Button synchOnWriteCheckbox;
+ private Table contextEntryTable;
+ private TableViewer contextEntryTableViewer;
+ private Button contextEntryAddButton;
+ private Button contextEntryEditButton;
+ private Button contextEntryDeleteButton;
+ private TableViewer indexedAttributesTableViewer;
+ private Button indexedAttributeAddButton;
+ private Button indexedAttributeEditButton;
+ private Button indexedAttributeDeleteButton;
+
+ // Listeners
+ /** The Text Modify Listener */
+ private ModifyListener textModifyListener = new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ masterDetailsBlock.setEditorDirty();
+ dirty = true;
+ }
+ };
+
+ /** The Checkbox Selection Listener */
+ private SelectionListener checkboxSelectionListener = new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ masterDetailsBlock.setEditorDirty();
+ dirty = true;
+ }
+ };
+
+ /** The Selection Changed Listener for the Context Entry Table Viewer */
+ private ISelectionChangedListener contextEntryTableViewerListener = new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ contextEntryEditButton.setEnabled( !event.getSelection().isEmpty() );
+ contextEntryDeleteButton.setEnabled( !event.getSelection().isEmpty() );
+ }
+ };
+
+ /** The Double Click Listener for the Indexed Attributes Table Viewer */
+ private IDoubleClickListener contextEntryTableViewerDoubleClickListener = new IDoubleClickListener()
+ {
+ public void doubleClick( DoubleClickEvent event )
+ {
+ editSelectedContextEntry();
+ }
+ };
+
+ /** The Listener for the Add button of the Context Entry Section */
+ private SelectionListener contextEntryAddButtonListener = new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ AttributeValueDialog dialog = new AttributeValueDialog( new AttributeValueObject( "", "" ) );
+ if ( Dialog.OK == dialog.open() && dialog.isDirty() )
+ {
+ AttributeValueObject newAttributeValueObject = dialog.getAttributeValueObject();
+ Attribute attribute = contextEntry.get( newAttributeValueObject.getAttribute() );
+ if ( attribute != null )
+ {
+ attribute.add( newAttributeValueObject.getValue() );
+ }
+ else
+ {
+ contextEntry.put( new BasicAttribute( newAttributeValueObject.getAttribute(),
+ newAttributeValueObject.getValue() ) );
+ }
+
+ contextEntryTableViewer.refresh();
+ resizeContextEntryTableColumnsToFit();
+ masterDetailsBlock.setEditorDirty();
+ dirty = true;
+ }
+ }
+ };
+
+ /** The Listener for the Edit button of the Context Entry Section */
+ private SelectionListener contextEntryEditButtonListener = new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ editSelectedContextEntry();
+ }
+ };
+
+ /** The Listener for the Delete button of the Context Entry Section */
+ private SelectionListener contextEntryDeleteButtonListener = new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ StructuredSelection selection = ( StructuredSelection ) contextEntryTableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ AttributeValueObject attributeValueObject = ( AttributeValueObject ) selection.getFirstElement();
+
+ Attribute attribute = contextEntry.get( attributeValueObject.getAttribute() );
+ if ( attribute != null )
+ {
+ attribute.remove( attributeValueObject.getValue() );
+ contextEntryTableViewer.refresh();
+ resizeContextEntryTableColumnsToFit();
+ masterDetailsBlock.setEditorDirty();
+ dirty = true;
+ }
+ }
+ }
+ };
+
+ /** The Selection Changed Listener for the Indexed Attributes Table Viewer */
+ private ISelectionChangedListener indexedAttributesTableViewerListener = new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ indexedAttributeEditButton.setEnabled( !event.getSelection().isEmpty() );
+ indexedAttributeDeleteButton.setEnabled( !event.getSelection().isEmpty() );
+ }
+ };
+
+ /** The Double Click Listener for the Indexed Attributes Table Viewer */
+ private IDoubleClickListener indexedAttributesTableViewerDoubleClickListener = new IDoubleClickListener()
+ {
+ public void doubleClick( DoubleClickEvent event )
+ {
+ editSelectedIndexedAttribute();
+ }
+ };
+
+ /** The Listener for the Add button of the Indexed Attributes Section */
+ private SelectionListener indexedAttributeAddButtonListener = new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ IndexedAttributeDialog dialog = new IndexedAttributeDialog( new IndexedAttribute( "", 0 ) );
+ if ( Dialog.OK == dialog.open() )
+ {
+ indexedAttributes.add( dialog.getIndexedAttribute() );
+ indexedAttributesTableViewer.refresh();
+ masterDetailsBlock.setEditorDirty();
+ dirty = true;
+ }
+ }
+ };
+
+ /** The Listener for the Edit button of the Indexed Attributes Section */
+ private SelectionListener indexedAttributeEditButtonListener = new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ editSelectedIndexedAttribute();
+ }
+ };
+
+ /** The Listener for the Delete button of the Indexed Attributes Section */
+ private SelectionListener indexedAttributeDeleteButtonListener = new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ StructuredSelection selection = ( StructuredSelection ) indexedAttributesTableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ IndexedAttribute indexedAttribute = ( IndexedAttribute ) selection.getFirstElement();
+
+ indexedAttributes.remove( indexedAttribute );
+ indexedAttributesTableViewer.refresh();
+ masterDetailsBlock.setEditorDirty();
+ dirty = true;
+ }
+ }
+ };
+
+
+ /**
+ * Creates a new instance of PartitionDetailsPage.
+ *
+ * @param pmdb
+ * the associated Master Details Block
+ */
+ public PartitionDetailsPage( PartitionsMasterDetailsBlock pmdb )
+ {
+ masterDetailsBlock = pmdb;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IDetailsPage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ public void createContents( Composite parent )
+ {
+ FormToolkit toolkit = mform.getToolkit();
+ TableWrapLayout layout = new TableWrapLayout();
+ layout.topMargin = 5;
+ layout.leftMargin = 5;
+ layout.rightMargin = 2;
+ layout.bottomMargin = 2;
+ parent.setLayout( layout );
+
+ createDetailsSection( parent, toolkit );
+ createContextEntrySection( parent, toolkit );
+ createIndexedAttributesSection( parent, toolkit );
+ }
+
+
+ /**
+ * Creates the Details Section
+ *
+ * @param parent
+ * the parent composite
+ * @param toolkit
+ * the toolkit to use
+ */
+ private void createDetailsSection( Composite parent, FormToolkit toolkit )
+ {
+ Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
+ section.marginWidth = 10;
+ section.setText( "Partition Details" ); //$NON-NLS-1$
+ section.setDescription( "Set the properties of the partition." ); //$NON-NLS-1$
+ TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
+ td.grabHorizontal = true;
+ section.setLayoutData( td );
+ Composite client = toolkit.createComposite( section );
+ toolkit.paintBordersFor( client );
+ GridLayout glayout = new GridLayout( 3, false );
+ client.setLayout( glayout );
+ section.setClient( client );
+
+ // Name
+ toolkit.createLabel( client, "Name:" );
+ nameText = toolkit.createText( client, "" );
+ nameText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
+
+ // Cache Size
+ toolkit.createLabel( client, "Cache Size:" );
+ cacheSizeText = toolkit.createText( client, "" );
+ cacheSizeText.addVerifyListener( new VerifyListener()
+ {
+ public void verifyText( VerifyEvent e )
+ {
+ if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
+ {
+ e.doit = false;
+ }
+ }
+ } );
+ cacheSizeText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
+
+ // Suffix
+ toolkit.createLabel( client, "Suffix:" );
+ suffixText = toolkit.createText( client, "" );
+ suffixText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
+
+ // Enable Optimizer
+ enableOptimizerCheckbox = toolkit.createButton( client, "Enable optimizer", SWT.CHECK );
+ enableOptimizerCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 3, 1 ) );
+
+ // Synchronisation On Write
+ synchOnWriteCheckbox = toolkit.createButton( client, "Synchronization on write", SWT.CHECK );
+ synchOnWriteCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 3, 1 ) );
+ }
+
+
+ /**
+ * Creates the Context Entry Section.
+ *
+ * @param parent
+ * the parent composite
+ * @param toolkit
+ * the toolkit to use
+ */
+ private void createContextEntrySection( Composite parent, FormToolkit toolkit )
+ {
+ Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
+ section.marginWidth = 10;
+ section.setText( "Context Entry" ); //$NON-NLS-1$
+ section.setDescription( "Set the attribute/value pairs for the Context Entry of the partition." ); //$NON-NLS-1$
+ section.setLayoutData( new TableWrapData( TableWrapData.FILL ) );
+ Composite client = toolkit.createComposite( section );
+ toolkit.paintBordersFor( client );
+ client.setLayout( new GridLayout( 2, false ) );
+ section.setClient( client );
+
+ contextEntryTable = toolkit.createTable( client, SWT.NONE );
+ GridData gd = new GridData( SWT.FILL, SWT.NONE, true, false, 1, 3 );
+ gd.heightHint = 103;
+ contextEntryTable.setLayoutData( gd );
+ TableColumn idColumn = new TableColumn( contextEntryTable, SWT.LEFT, 0 );
+ idColumn.setText( "Attribute" );
+ idColumn.setWidth( 100 );
+ TableColumn valueColumn = new TableColumn( contextEntryTable, SWT.LEFT, 1 );
+ valueColumn.setText( "Value" );
+ valueColumn.setWidth( 100 );
+ contextEntryTable.setHeaderVisible( true );
+ contextEntryTableViewer = new TableViewer( contextEntryTable );
+ contextEntryTableViewer.setContentProvider( new IStructuredContentProvider()
+ {
+ public Object[] getElements( Object inputElement )
+ {
+ List<AttributeValueObject> elements = new ArrayList<AttributeValueObject>();
+
+ Attributes attributes = ( Attributes ) inputElement;
+
+ NamingEnumeration<? extends Attribute> ne = attributes.getAll();
+ while ( ne.hasMoreElements() )
+ {
+ Attribute attribute = ( Attribute ) ne.nextElement();
+ try
+ {
+ NamingEnumeration<?> values = attribute.getAll();
+ while ( values.hasMoreElements() )
+ {
+ elements.add( new AttributeValueObject( attribute.getID(), values.nextElement() ) );
+ }
+ }
+ catch ( NamingException e )
+ {
+ }
+ }
+
+ return elements.toArray();
+ }
+
+
+ public void dispose()
+ {
+ }
+
+
+ public void inputChanged( Viewer viewer, Object oldInput, Object newInput )
+ {
+ }
+ } );
+ contextEntryTableViewer.setLabelProvider( new ITableLabelProvider()
+ {
+ public String getColumnText( Object element, int columnIndex )
+ {
+ if ( element != null )
+ {
+ switch ( columnIndex )
+ {
+ case 0:
+ return ( ( AttributeValueObject ) element ).getAttribute();
+ case 1:
+ return ( ( AttributeValueObject ) element ).getValue().toString();
+ default:
+ break;
+ }
+ }
+
+ return null;
+ }
+
+
+ public Image getColumnImage( Object element, int columnIndex )
+ {
+ return null;
+ }
+
+
+ public void addListener( ILabelProviderListener listener )
+ {
+ }
+
+
+ public void dispose()
+ {
+ }
+
+
+ public boolean isLabelProperty( Object element, String property )
+ {
+ return false;
+ }
+
+
+ public void removeListener( ILabelProviderListener listener )
+ {
+ }
+ } );
+
+ GridData buttonsGD = new GridData( SWT.FILL, SWT.BEGINNING, false, false );
+ buttonsGD.widthHint = IDialogConstants.BUTTON_WIDTH;
+
+ contextEntryAddButton = toolkit.createButton( client, "Add...", SWT.PUSH );
+ contextEntryAddButton.setLayoutData( buttonsGD );
+
+ contextEntryEditButton = toolkit.createButton( client, "Edit...", SWT.PUSH );
+ contextEntryEditButton.setEnabled( false );
+ contextEntryEditButton.setLayoutData( buttonsGD );
+
+ contextEntryDeleteButton = toolkit.createButton( client, "Delete", SWT.PUSH );
+ contextEntryDeleteButton.setEnabled( false );
+ contextEntryDeleteButton.setLayoutData( buttonsGD );
+ }
+
+
+ /**
+ * Creates the Indexed Attributes Section
+ *
+ * @param parent
+ * the parent composite
+ * @param toolkit
+ * the toolkit to use
+ */
+ private void createIndexedAttributesSection( Composite parent, FormToolkit toolkit )
+ {
+ Section indexedAttributesSection = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
+ indexedAttributesSection.marginWidth = 10;
+ indexedAttributesSection.setText( "Indexed Attributes" ); //$NON-NLS-1$
+ indexedAttributesSection.setDescription( "Set the indexed attributes of the partition." ); //$NON-NLS-1$
+ indexedAttributesSection.setLayoutData( new TableWrapData( TableWrapData.FILL ) );
+ Composite indexedAttributesClient = toolkit.createComposite( indexedAttributesSection );
+ toolkit.paintBordersFor( indexedAttributesClient );
+ indexedAttributesClient.setLayout( new GridLayout( 2, false ) );
+ indexedAttributesSection.setClient( indexedAttributesClient );
+
+ Table indexedAttributesTable = toolkit.createTable( indexedAttributesClient, SWT.NONE );
+ GridData gd = new GridData( SWT.FILL, SWT.NONE, true, false, 1, 3 );
+ gd.heightHint = 80;
+ indexedAttributesTable.setLayoutData( gd );
+ indexedAttributesTableViewer = new TableViewer( indexedAttributesTable );
+ indexedAttributesTableViewer.setContentProvider( new ArrayContentProvider() );
+ indexedAttributesTableViewer.setLabelProvider( new LabelProvider() );
+
+ GridData buttonsGD = new GridData( SWT.FILL, SWT.BEGINNING, false, false );
+ buttonsGD.widthHint = IDialogConstants.BUTTON_WIDTH;
+
+ indexedAttributeAddButton = toolkit.createButton( indexedAttributesClient, "Add...", SWT.PUSH );
+ indexedAttributeAddButton.setLayoutData( buttonsGD );
+
+ indexedAttributeEditButton = toolkit.createButton( indexedAttributesClient, "Edit...", SWT.PUSH );
+ indexedAttributeEditButton.setEnabled( false );
+ indexedAttributeEditButton.setLayoutData( buttonsGD );
+
+ indexedAttributeDeleteButton = toolkit.createButton( indexedAttributesClient, "Delete", SWT.PUSH );
+ indexedAttributeDeleteButton.setEnabled( false );
+ indexedAttributeDeleteButton.setLayoutData( buttonsGD );
+ }
+
+
+ /**
+ * Adds listeners to UI fields.
+ */
+ private void addListeners()
+ {
+ nameText.addModifyListener( textModifyListener );
+ cacheSizeText.addModifyListener( textModifyListener );
+ suffixText.addModifyListener( textModifyListener );
+ enableOptimizerCheckbox.addSelectionListener( checkboxSelectionListener );
+ synchOnWriteCheckbox.addSelectionListener( checkboxSelectionListener );
+
+ contextEntryTableViewer.addDoubleClickListener( contextEntryTableViewerDoubleClickListener );
+ contextEntryTableViewer.addSelectionChangedListener( contextEntryTableViewerListener );
+ contextEntryAddButton.addSelectionListener( contextEntryAddButtonListener );
+ contextEntryEditButton.addSelectionListener( contextEntryEditButtonListener );
+ contextEntryDeleteButton.addSelectionListener( contextEntryDeleteButtonListener );
+
+ indexedAttributesTableViewer.addSelectionChangedListener( indexedAttributesTableViewerListener );
+ indexedAttributesTableViewer.addDoubleClickListener( indexedAttributesTableViewerDoubleClickListener );
+ indexedAttributeAddButton.addSelectionListener( indexedAttributeAddButtonListener );
+ indexedAttributeEditButton.addSelectionListener( indexedAttributeEditButtonListener );
+ indexedAttributeDeleteButton.addSelectionListener( indexedAttributeDeleteButtonListener );
+ }
+
+
+ /**
+ * Removes listeners to UI fields.
+ */
+ private void removeListeners()
+ {
+ nameText.removeModifyListener( textModifyListener );
+ cacheSizeText.removeModifyListener( textModifyListener );
+ suffixText.removeModifyListener( textModifyListener );
+ enableOptimizerCheckbox.removeSelectionListener( checkboxSelectionListener );
+ synchOnWriteCheckbox.removeSelectionListener( checkboxSelectionListener );
+
+ contextEntryTableViewer.removeDoubleClickListener( contextEntryTableViewerDoubleClickListener );
+ contextEntryTableViewer.removeSelectionChangedListener( contextEntryTableViewerListener );
+ contextEntryAddButton.removeSelectionListener( contextEntryAddButtonListener );
+ contextEntryEditButton.removeSelectionListener( contextEntryEditButtonListener );
+ contextEntryDeleteButton.removeSelectionListener( contextEntryDeleteButtonListener );
+
+ indexedAttributesTableViewer.removeSelectionChangedListener( indexedAttributesTableViewerListener );
+ indexedAttributesTableViewer.removeDoubleClickListener( indexedAttributesTableViewerDoubleClickListener );
+ indexedAttributeAddButton.removeSelectionListener( indexedAttributeAddButtonListener );
+ indexedAttributeEditButton.removeSelectionListener( indexedAttributeEditButtonListener );
+ indexedAttributeDeleteButton.removeSelectionListener( indexedAttributeDeleteButtonListener );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IPartSelectionListener#selectionChanged(org.eclipse.ui.forms.IFormPart, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged( IFormPart part, ISelection selection )
+ {
+ IStructuredSelection ssel = ( IStructuredSelection ) selection;
+ if ( ssel.size() == 1 )
+ {
+ input = ( Partition ) ssel.getFirstElement();
+ }
+ else
+ {
+ input = null;
+ }
+ refresh();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#commit(boolean)
+ */
+ public void commit( boolean onSave )
+ {
+ if ( input != null )
+ {
+ input.setName( nameText.getText() );
+ input.setCacheSize( Integer.parseInt( cacheSizeText.getText() ) );
+ input.setSuffix( suffixText.getText() );
+ input.setEnableOptimizer( enableOptimizerCheckbox.getSelection() );
+ input.setSynchronizationOnWrite( synchOnWriteCheckbox.getSelection() );
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#dispose()
+ */
+ public void dispose()
+ {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#initialize(org.eclipse.ui.forms.IManagedForm)
+ */
+ public void initialize( IManagedForm form )
+ {
+ this.mform = form;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#isDirty()
+ */
+ public boolean isDirty()
+ {
+ return dirty;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#isStale()
+ */
+ public boolean isStale()
+ {
+ return false;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#refresh()
+ */
+ public void refresh()
+ {
+ removeListeners();
+
+ // Name
+ String name = input.getName();
+ nameText.setText( ( name == null ) ? "" : name );
+
+ // Cache Size
+ cacheSizeText.setText( "" + input.getCacheSize() );
+
+ // Suffix
+ String suffix = input.getSuffix();
+ suffixText.setText( ( suffix == null ) ? "" : suffix );
+
+ // Enable Optimizer
+ enableOptimizerCheckbox.setSelection( input.isEnableOptimizer() );
+
+ // Synchronization on write
+ synchOnWriteCheckbox.setSelection( input.isSynchronizationOnWrite() );
+
+ // Context Entry
+ contextEntry = input.getContextEntry();
+ contextEntryTableViewer.setInput( contextEntry );
+ resizeContextEntryTableColumnsToFit();
+
+ // Indexed Attributes
+ indexedAttributes = input.getIndexedAttributes();
+ indexedAttributesTableViewer.setInput( indexedAttributes );
+
+ addListeners();
+ }
+
+
+ /**
+ * Resizes the columns to fit the size of the cells.
+ */
+ private void resizeContextEntryTableColumnsToFit()
+ {
+ // Resizing the first column
+ contextEntryTable.getColumn( 0 ).pack();
+ // Adding a little space to the first column
+ contextEntryTable.getColumn( 0 ).setWidth( contextEntryTable.getColumn( 0 ).getWidth() + 5 );
+ // Resizing the second column
+ contextEntryTable.getColumn( 1 ).pack();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#setFocus()
+ */
+ public void setFocus()
+ {
+ nameText.setFocus();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.IFormPart#setFormInput(java.lang.Object)
+ */
+ public boolean setFormInput( Object input )
+ {
+ return false;
+ }
+
+
+ /**
+ * Opens an Indexed Attribute Dialog with the selected Indexed Attribute in the
+ * Indexed Attributes Table Viewer.
+ */
+ private void editSelectedIndexedAttribute()
+ {
+ StructuredSelection selection = ( StructuredSelection ) indexedAttributesTableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ IndexedAttribute indexedAttribute = ( IndexedAttribute ) selection.getFirstElement();
+
+ IndexedAttributeDialog dialog = new IndexedAttributeDialog( indexedAttribute );
+ if ( Dialog.OK == dialog.open() && dialog.isDirty() )
+ {
+ indexedAttributesTableViewer.refresh();
+ masterDetailsBlock.setEditorDirty();
+ dirty = true;
+ }
+ }
+ }
+
+
+ /**
+ * Opens a Context Entry Dialog with the selected Attribute Value Object in the
+ * Context Entry Table Viewer.
+ */
+ private void editSelectedContextEntry()
+ {
+ StructuredSelection selection = ( StructuredSelection ) contextEntryTableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ AttributeValueObject attributeValueObject = ( AttributeValueObject ) selection.getFirstElement();
+
+ String oldId = attributeValueObject.getAttribute();
+ Object oldValue = attributeValueObject.getValue();
+
+ AttributeValueDialog dialog = new AttributeValueDialog( attributeValueObject );
+ if ( Dialog.OK == dialog.open() && dialog.isDirty() )
+ {
+ Attribute attribute = contextEntry.get( oldId );
+ if ( attribute != null )
+ {
+ attribute.remove( oldValue );
+ }
+
+ AttributeValueObject newAttributeValueObject = dialog.getAttributeValueObject();
+ attribute = contextEntry.get( newAttributeValueObject.getAttribute() );
+ if ( attribute != null )
+ {
+ attribute.add( newAttributeValueObject.getValue() );
+ }
+ else
+ {
+ contextEntry.put( new BasicAttribute( newAttributeValueObject.getAttribute(),
+ newAttributeValueObject.getValue() ) );
+ }
+
+ contextEntryTableViewer.refresh();
+ resizeContextEntryTableColumnsToFit();
+ masterDetailsBlock.setEditorDirty();
+ dirty = true;
+ }
+ }
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java
new file mode 100644
index 0000000..88fb608
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java
@@ -0,0 +1,323 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+import java.util.List;
+
+import org.apache.directory.studio.apacheds.configuration.Activator;
+import org.apache.directory.studio.apacheds.configuration.PluginConstants;
+import org.apache.directory.studio.apacheds.configuration.model.Partition;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.forms.DetailsPart;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.MasterDetailsBlock;
+import org.eclipse.ui.forms.SectionPart;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This class represents the Partitions Master/Details Block used in the Partitions Page.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class PartitionsMasterDetailsBlock extends MasterDetailsBlock
+{
+ /** The associated page */
+ private FormPage page;
+
+ /** The input Server Configuration */
+ private ServerConfiguration serverConfiguration;
+
+ /** The Interceptors List */
+ private List<Partition> partitions;
+
+ /** The Details Page */
+ private PartitionDetailsPage detailsPage;
+
+ private static final String NEW_NAME = "New Partition ";
+
+ // UI Fields
+ private TableViewer viewer;
+ private Button addButton;
+ private Button deleteButton;
+
+
+ /**
+ * Creates a new instance of PartitionsMasterDetailsBlock.
+ *
+ * @param page
+ * the associated page
+ */
+ public PartitionsMasterDetailsBlock( FormPage page )
+ {
+ this.page = page;
+ serverConfiguration = ( ( ServerConfigurationEditorInput ) page.getEditorInput() ).getServerConfiguration();
+ partitions = serverConfiguration.getPartitions();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.MasterDetailsBlock#createMasterPart(org.eclipse.ui.forms.IManagedForm, org.eclipse.swt.widgets.Composite)
+ */
+ protected void createMasterPart( final IManagedForm managedForm, Composite parent )
+ {
+ FormToolkit toolkit = managedForm.getToolkit();
+
+ // Creating the Section
+ Section section = toolkit.createSection( parent, Section.TITLE_BAR );
+ section.setText( "All Partitions" );
+ section.marginWidth = 10;
+ section.marginHeight = 5;
+ Composite client = toolkit.createComposite( section, SWT.WRAP );
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.makeColumnsEqualWidth = false;
+ layout.marginWidth = 2;
+ layout.marginHeight = 2;
+ client.setLayout( layout );
+ toolkit.paintBordersFor( client );
+ section.setClient( client );
+
+ // Creatig the Table and Table Viewer
+ Table table = toolkit.createTable( client, SWT.NULL );
+ GridData gd = new GridData( SWT.FILL, SWT.FILL, true, true, 1, 2 );
+ gd.heightHint = 20;
+ gd.widthHint = 100;
+ table.setLayoutData( gd );
+ final SectionPart spart = new SectionPart( section );
+ managedForm.addPart( spart );
+ viewer = new TableViewer( table );
+ viewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ managedForm.fireSelectionChanged( spart, event.getSelection() );
+ }
+ } );
+ viewer.setContentProvider( new ArrayContentProvider() );
+ viewer.setLabelProvider( new LabelProvider()
+ {
+ public Image getImage( Object element )
+ {
+
+ return AbstractUIPlugin.imageDescriptorFromPlugin(
+ Activator.PLUGIN_ID,
+ ( ( Partition ) element ).isSystemPartition() ? PluginConstants.IMG_PARTITION_SYSTEM
+ : PluginConstants.IMG_PARTITION ).createImage();
+ }
+ } );
+
+ // Creating the button(s)
+ addButton = toolkit.createButton( client, "Add...", SWT.PUSH ); //$NON-NLS-1$
+ addButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
+
+ deleteButton = toolkit.createButton( client, "Delete", SWT.PUSH );
+ deleteButton.setEnabled( false );
+ deleteButton.setLayoutData( new GridData( SWT.FILL, SWT.BEGINNING, false, false ) );
+
+ initFromInput();
+ addListeners();
+ }
+
+
+ /**
+ * Initializes the page with the Editor input.
+ */
+ private void initFromInput()
+ {
+ viewer.setInput( partitions );
+ }
+
+
+ /**
+ * Add listeners to UI fields.
+ */
+ private void addListeners()
+ {
+ viewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ viewer.refresh();
+
+ deleteButton.setEnabled( !event.getSelection().isEmpty() );
+ StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ Partition partition = ( Partition ) selection.getFirstElement();
+ if ( partition.isSystemPartition() )
+ {
+ deleteButton.setEnabled( false );
+ }
+ }
+ }
+ } );
+
+ addButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ Partition newPartition = new Partition( getNewName() );
+ partitions.add( newPartition );
+ viewer.refresh();
+ viewer.setSelection( new StructuredSelection( newPartition ) );
+ setEditorDirty();
+ }
+ } );
+
+ deleteButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ Partition partition = ( Partition ) selection.getFirstElement();
+ if ( !partition.isSystemPartition() )
+ {
+ partitions.remove( partition );
+ viewer.refresh();
+ setEditorDirty();
+ }
+ }
+ }
+ } );
+ }
+
+
+ /**
+ * Gets a new Name for a new Extended Operation.
+ *
+ * @return
+ * a new Name for a new Extended Operation
+ */
+ private String getNewName()
+ {
+ int counter = 1;
+ String name = NEW_NAME;
+ boolean ok = false;
+
+ while ( !ok )
+ {
+ ok = true;
+ name = NEW_NAME + counter;
+
+ for ( Partition partition : partitions )
+ {
+ if ( partition.getName().equalsIgnoreCase( name ) )
+ {
+ ok = false;
+ }
+ }
+ counter++;
+ }
+
+ return name;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.MasterDetailsBlock#createToolBarActions(org.eclipse.ui.forms.IManagedForm)
+ */
+ protected void createToolBarActions( IManagedForm managedForm )
+ {
+ final ScrolledForm form = managedForm.getForm();
+
+ // Horizontal layout Action
+ Action horizontalAction = new Action( "Horizontal layout", Action.AS_RADIO_BUTTON ) { //$NON-NLS-1$
+ public void run()
+ {
+ sashForm.setOrientation( SWT.HORIZONTAL );
+ form.reflow( true );
+ }
+ };
+ horizontalAction.setChecked( true );
+ horizontalAction.setToolTipText( "Horizontal Orientation" ); //$NON-NLS-1$
+ horizontalAction.setImageDescriptor( Activator.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+ PluginConstants.IMG_HORIZONTAL_ORIENTATION ) );
+
+ // Vertical layout Action
+ Action verticalAction = new Action( "Vertical Orientation", Action.AS_RADIO_BUTTON ) { //$NON-NLS-1$
+ public void run()
+ {
+ sashForm.setOrientation( SWT.VERTICAL );
+ form.reflow( true );
+ }
+ };
+ verticalAction.setChecked( false );
+ verticalAction.setToolTipText( "Vertical Orientation" ); //$NON-NLS-1$
+ verticalAction.setImageDescriptor( Activator.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+ PluginConstants.IMG_VERTICAL_ORIENTATION ) );
+
+ form.getToolBarManager().add( horizontalAction );
+ form.getToolBarManager().add( verticalAction );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.MasterDetailsBlock#registerPages(org.eclipse.ui.forms.DetailsPart)
+ */
+ protected void registerPages( DetailsPart detailsPart )
+ {
+ detailsPage = new PartitionDetailsPage( this );
+ detailsPart.registerPage( Partition.class, detailsPage );
+ }
+
+
+ /**
+ * Sets the Editor as dirty.
+ */
+ public void setEditorDirty()
+ {
+ ( ( ServerConfigurationEditor ) page.getEditor() ).setDirty( true );
+ }
+
+
+ /**
+ * Saves the necessary elements to the input model.
+ */
+ public void save()
+ {
+ detailsPage.commit( true );
+ viewer.setInput( partitions );
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionsPage.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionsPage.java
new file mode 100644
index 0000000..1a76cf5
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/PartitionsPage.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+
+
+/**
+ * This class represents the Partitions Page of the Server Configuration Editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class PartitionsPage extends FormPage
+{
+ /** The Page ID*/
+ public static final String ID = ServerConfigurationEditor.ID + ".PartitionsPage";
+
+ /** The Page Title */
+ private static final String TITLE = "Partitions";
+
+ /** The Master/Details block */
+ private PartitionsMasterDetailsBlock masterDetailsBlock;
+
+
+ /**
+ * Creates a new instance of PartitionsPage.
+ *
+ * @param editor
+ * the associated editor
+ */
+ public PartitionsPage( FormEditor editor )
+ {
+ super( editor, ID, TITLE );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+ */
+ protected void createFormContent( IManagedForm managedForm )
+ {
+ ScrolledForm form = managedForm.getForm();
+ form.setText( "Partitions" );
+ masterDetailsBlock = new PartitionsMasterDetailsBlock( this );
+ masterDetailsBlock.createContent( managedForm );
+ }
+
+
+ /**
+ * Saves the necessary elements to the input model.
+ */
+ public void save()
+ {
+ if ( masterDetailsBlock != null )
+ {
+ masterDetailsBlock.save();
+ }
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java
new file mode 100644
index 0000000..e4fcabf
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java
@@ -0,0 +1,205 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+import org.apache.directory.studio.apacheds.configuration.Activator;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationWriter;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationWriterException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+
+/**
+ * This class implements the Server Configuration Editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ServerConfigurationEditor extends FormEditor
+{
+ /** The Editor ID */
+ public static final String ID = "org.apache.directory.studio.apacheds.configuration.editor";
+
+ /** The editor input */
+ private IEditorInput input;
+
+ /** The Server Configuration */
+ private ServerConfiguration serverConfiguration;
+
+ /** The dirty flag */
+ private boolean dirty = false;
+
+ // The Pages
+ private GeneralPage generalPage;
+ private PartitionsPage partitionsPage;
+ private InterceptorsPage interceptorsPage;
+ private ExtendedOperationsPage extendedOperationsPage;
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormEditor#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+ */
+ public void init( IEditorSite site, IEditorInput input ) throws PartInitException
+ {
+ super.init( site, input );
+ this.input = input;
+ setPartName( input.getName() );
+ serverConfiguration = ( ( ServerConfigurationEditorInput ) input ).getServerConfiguration();
+ dirty = serverConfiguration.getPath() == null;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
+ */
+ protected void addPages()
+ {
+ try
+ {
+ generalPage = new GeneralPage( this );
+ addPage( generalPage );
+
+ partitionsPage = new PartitionsPage( this );
+ addPage( partitionsPage );
+
+ interceptorsPage = new InterceptorsPage( this );
+ addPage( interceptorsPage );
+
+ extendedOperationsPage = new ExtendedOperationsPage( this );
+ addPage( extendedOperationsPage );
+ }
+ catch ( PartInitException e )
+ {
+ Activator.getDefault().getLog().log(
+ new Status( Status.ERROR, Activator.PLUGIN_ID, Status.OK, e.getMessage(), e.getCause() ) );
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public void doSave( IProgressMonitor monitor )
+ {
+ monitor.beginTask( "Saving the Server Configuration", 5 );
+ generalPage.save();
+ monitor.worked( 1 );
+ partitionsPage.save();
+ monitor.worked( 1 );
+ interceptorsPage.save();
+ monitor.worked( 1 );
+ extendedOperationsPage.save();
+ monitor.worked( 1 );
+
+ // Checking if the ServerConfiguration is already existing or if it's a new file.
+ if ( serverConfiguration.getPath() == null )
+ {
+ FileDialog fd = new FileDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.SAVE );
+ fd.setText( "Select a file" );
+ fd.setFilterExtensions( new String[]
+ { "*.xml", "*.*" } );
+ fd.setFilterNames( new String[]
+ { "XML files", "All files" } );
+ String selectedFile = fd.open();
+ // selected == null if 'cancel' has been pushed
+ if ( selectedFile == null || "".equals( selectedFile ) )
+ {
+ monitor.setCanceled( true );
+ return;
+ }
+
+ // TODO Add the overwrite code...
+
+ serverConfiguration.setPath( selectedFile );
+ setTitleToolTip( input.getToolTipText() );
+ }
+
+ // Saving the ServerConfiguration to disk
+ try
+ {
+ ServerConfigurationWriter writer = new ServerConfigurationWriter();
+ writer.write( serverConfiguration );
+ }
+ catch ( ServerConfigurationWriterException e )
+ {
+ MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ SWT.OK | SWT.ICON_ERROR );
+ messageBox.setText( "Error!" );
+ messageBox.setMessage( "An error occurred when writing the file to disk." + "\n" + e.getMessage() );
+ messageBox.open();
+ setDirty( true );
+ monitor.done();
+ return;
+ }
+
+ monitor.worked( 1 );
+ setDirty( false );
+ monitor.done();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+ */
+ public void doSaveAs()
+ {
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+ */
+ public boolean isSaveAsAllowed()
+ {
+ return false;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.forms.editor.FormEditor#isDirty()
+ */
+ public boolean isDirty()
+ {
+ return dirty;
+ }
+
+
+ /**
+ * Sets the dirty state of the editor.
+ *
+ * @param dirty
+ * the new dirty
+ */
+ public void setDirty( boolean dirty )
+ {
+ this.dirty = dirty;
+ editorDirtyStateChanged();
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorInput.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorInput.java
new file mode 100644
index 0000000..15bae65
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorInput.java
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.editor;
+
+
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+
+
+/**
+ * This class represents the Server Configuration Editor Input.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ServerConfigurationEditorInput implements IEditorInput
+{
+ /** The Server Configuration */
+ private ServerConfiguration serverConfiguration;
+
+
+ /**
+ * Creates a new instance of ServerConfigurationEditorInput.
+ *
+ * @param serverConfiguration
+ * the Server Configuration
+ */
+ public ServerConfigurationEditorInput( ServerConfiguration serverConfiguration )
+ {
+ this.serverConfiguration = serverConfiguration;
+ }
+
+
+ /**
+ * Gets the Server Configuration
+ *
+ * @return
+ * the Server Configuration
+ */
+ public ServerConfiguration getServerConfiguration()
+ {
+ return serverConfiguration;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IEditorInput#getToolTipText()
+ */
+ public String getToolTipText()
+ {
+ String path = serverConfiguration.getPath();
+ if ( path == null )
+ {
+ return "New Configuration File";
+ }
+ else
+ {
+ return path;
+ }
+
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IEditorInput#getName()
+ */
+ public String getName()
+ {
+ return "Apache DS Configuration";
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IEditorInput#exists()
+ */
+ public boolean exists()
+ {
+ return ( serverConfiguration != null );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+ */
+ public ImageDescriptor getImageDescriptor()
+ {
+ return null;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IEditorInput#getPersistable()
+ */
+ public IPersistableElement getPersistable()
+ {
+ return null;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
+ public Object getAdapter( Class adapter )
+ {
+ return null;
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals( Object obj )
+ {
+ if ( obj instanceof ServerConfigurationEditorInput )
+ {
+ ServerConfigurationEditorInput input = ( ServerConfigurationEditorInput ) obj;
+
+ if ( input.exists() && exists() )
+ {
+ String inputPath = input.getServerConfiguration().getPath();
+ String myPath = getServerConfiguration().getPath();
+
+ if ( inputPath != null && myPath != null )
+ {
+ return inputPath.equals( myPath );
+ }
+ }
+ }
+ return false;
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ExtendedOperation.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ExtendedOperation.java
new file mode 100644
index 0000000..7c1c8d9
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ExtendedOperation.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.model;
+
+
+/**
+ * This class represents an Extended Operation.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ExtendedOperation
+{
+ /** The class of the partition */
+ private String classType;
+
+
+ /**
+ * Creates a new instance of Partition.
+ *
+ * @param classType
+ * the classType of the partition
+ */
+ public ExtendedOperation( String classType )
+ {
+ this.classType = classType;
+ }
+
+
+ /**
+ * Gets the class type of the partition.
+ *
+ * @return
+ * the class type of the partition
+ */
+ public String getClassType()
+ {
+ return this.classType;
+ }
+
+
+ /**
+ * Sets the class type of the partition.
+ *
+ * @param classType
+ * the new class type to set
+ */
+ public void setClassType( String classType )
+ {
+ this.classType = classType;
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString()
+ {
+ return classType;
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/IndexedAttribute.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/IndexedAttribute.java
new file mode 100644
index 0000000..c7ae290
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/IndexedAttribute.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.model;
+
+
+/**
+ * This class represents an Indexed Attribute.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class IndexedAttribute
+{
+ /** The attribute id */
+ private String attributeId;
+
+ /** The cache size */
+ private int cacheSize;
+
+
+ /**
+ * Creates a new instance of IndexedAttribute.
+ *
+ * @param attributeId
+ * the attribute id
+ * @param cacheSize
+ * the cache size
+ */
+ public IndexedAttribute( String attributeId, int cacheSize )
+ {
+ this.attributeId = attributeId;
+ this.cacheSize = cacheSize;
+ }
+
+
+ /**
+ * Gets the attribute id.
+ *
+ * @return
+ * the attribute id
+ */
+ public String getAttributeId()
+ {
+ return attributeId;
+ }
+
+
+ /**
+ * Sets the attribute id.
+ *
+ * @param attributeId
+ * the new attribute id
+ */
+ public void setAttributeId( String attributeId )
+ {
+ this.attributeId = attributeId;
+ }
+
+
+ /**
+ * Gets the cache size.
+ *
+ * @return
+ * the cache size
+ */
+ public int getCacheSize()
+ {
+ return cacheSize;
+ }
+
+
+ /**
+ * Gets the cache size.
+ *
+ * @param cacheSize
+ * the new cache size
+ */
+ public void setCacheSize( int cacheSize )
+ {
+ this.cacheSize = cacheSize;
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString()
+ {
+ return attributeId + " [" + cacheSize + "]";
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/Interceptor.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/Interceptor.java
new file mode 100644
index 0000000..3492f86
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/Interceptor.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.model;
+
+
+/**
+ * This class represents an Interceptor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Interceptor
+{
+ /** The name of the interceptor */
+ private String name;
+
+ /** The class of the class of the interceptor */
+ private String classType;
+
+
+ /**
+ * Creates a new instance of Interceptor.
+ *
+ * @param name
+ * the name of the interceptor
+ */
+ public Interceptor( String name )
+ {
+ this.name = name;
+ }
+
+
+ /**
+ * Gets the name of the interceptor.
+ *
+ * @return
+ * the name of the interceptor
+ */
+ public String getName()
+ {
+ return this.name;
+ }
+
+
+ /**
+ * Sets the name of the interceptor.
+ *
+ * @param name
+ * the new name to set
+ */
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+
+ /**
+ * Gets the class type of the interceptor.
+ *
+ * @return
+ * the class type of the interceptor
+ */
+ public String getClassType()
+ {
+ return classType;
+ }
+
+
+ /**
+ * Sets the class type of the interceptor.
+ *
+ * @param classType
+ * the new class type to set
+ */
+ public void setClassType( String classType )
+ {
+ this.classType = classType;
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString()
+ {
+ return name;
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/Partition.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/Partition.java
new file mode 100644
index 0000000..2a85ab6
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/Partition.java
@@ -0,0 +1,314 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.model;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
+
+
+/**
+ * This class represents a Partition.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Partition
+{
+ /** The name of the partition */
+ private String name;
+
+ /** The cache size of the partition */
+ private int cacheSize;
+
+ /** The suffix of the partition */
+ private String suffix;
+
+ /** The Enable Optimizer flag */
+ private boolean enableOptimizer;
+
+ /** The Synchronization On Write flag */
+ private boolean synchronizationOnWrite;
+
+ /** The Context Entry */
+ private Attributes contextEntry;
+
+ /** The indexed attributes */
+ private List<IndexedAttribute> indexedAttributes;
+
+ /** The System Partition flag */
+ private boolean systemPartition = false;
+
+
+ /**
+ * Creates a new instance of Partition.
+ */
+ public Partition()
+ {
+ indexedAttributes = new ArrayList<IndexedAttribute>();
+ contextEntry = new BasicAttributes( true );
+ }
+
+
+ /**
+ * Creates a new instance of Partition.
+ *
+ * @param name
+ * the name of the partition
+ */
+ public Partition( String name )
+ {
+ indexedAttributes = new ArrayList<IndexedAttribute>();
+ contextEntry = new BasicAttributes( true );
+ this.name = name;
+ }
+
+
+ /**
+ * Gets the name of the partition.
+ *
+ * @return
+ * the name of the partition
+ */
+ public String getName()
+ {
+ return this.name;
+ }
+
+
+ /**
+ * Sets the name of the partition.
+ *
+ * @param name
+ * the new name to set
+ */
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+
+ /**
+ * Gets the cache size.
+ *
+ * @return
+ * the cache size
+ */
+ public int getCacheSize()
+ {
+ return cacheSize;
+ }
+
+
+ /**
+ * Sets the cache size.
+ *
+ * @param cacheSize
+ * the new cache size
+ */
+ public void setCacheSize( int cacheSize )
+ {
+ this.cacheSize = cacheSize;
+ }
+
+
+ /**
+ * Gets the Context Entry.
+ *
+ * @return
+ * the Content Entry
+ */
+ public Attributes getContextEntry()
+ {
+ return contextEntry;
+ }
+
+
+ /**
+ * Sets the Context Entry
+ *
+ * @param contextEntry
+ * the new Context Entry
+ */
+ public void setContextEntry( Attributes contextEntry )
+ {
+ this.contextEntry = contextEntry;
+ }
+
+
+ /**
+ * Gets the Enable Optimizer flag.
+ *
+ * @return
+ * the Enable Optimizer flag
+ */
+ public boolean isEnableOptimizer()
+ {
+ return enableOptimizer;
+ }
+
+
+ /**
+ * Sets the Enable Optimizer flag.
+ *
+ * @param enableOptimizer
+ * the new value for the Enable Optimizer flag
+ */
+ public void setEnableOptimizer( boolean enableOptimizer )
+ {
+ this.enableOptimizer = enableOptimizer;
+ }
+
+
+ /**
+ * Get the Indexed Attributes List.
+ *
+ * @return
+ * the Indexed Attributes List
+ */
+ public List<IndexedAttribute> getIndexedAttributes()
+ {
+ return indexedAttributes;
+ }
+
+
+ /**
+ * Set the Indexed Attributes List.
+ *
+ * @param indexedAttributes
+ * the new Indexed Attributes List
+ */
+ public void setIndexedAttributes( List<IndexedAttribute> indexedAttributes )
+ {
+ this.indexedAttributes = indexedAttributes;
+ }
+
+
+ /**
+ * Adds an Indexed Attribute.
+ *
+ * @param indexedAttribute
+ * the Indexed Attribute to add
+ * @return
+ * true (as per the general contract of the Collection.add method).
+ */
+ public boolean addIndexedAttribute( IndexedAttribute indexedAttribute )
+ {
+ return indexedAttributes.add( indexedAttribute );
+ }
+
+
+ /**
+ * Removes a Indexed Attribute.
+ *
+ * @param indexedAttribute
+ * the Indexed Attribute to remove
+ * @return
+ * true if this list contained the specified element.
+ */
+ public boolean removeIndexedAttribute( IndexedAttribute indexedAttribute )
+ {
+ return indexedAttributes.remove( indexedAttribute );
+ }
+
+
+ /**
+ * Gets the suffix.
+ *
+ * @return
+ * the suffix
+ */
+ public String getSuffix()
+ {
+ return suffix;
+ }
+
+
+ /**
+ * Sets the suffix.
+ *
+ * @param suffix
+ * the new suffix
+ */
+ public void setSuffix( String suffix )
+ {
+ this.suffix = suffix;
+ }
+
+
+ /**
+ * Gets the Synchronization On Write flag.
+ *
+ * @return
+ * the Synchronization On Write flag
+ */
+ public boolean isSynchronizationOnWrite()
+ {
+ return synchronizationOnWrite;
+ }
+
+
+ /**
+ * Sets the Synchronization On Write flag.
+ *
+ * @param synchronizationOnWrite
+ * the Synchronization On Write flag
+ */
+ public void setSynchronizationOnWrite( boolean synchronizationOnWrite )
+ {
+ this.synchronizationOnWrite = synchronizationOnWrite;
+ }
+
+
+ /**
+ * Returns the System Partition flag.
+ *
+ * @return
+ * true if the partition is the System Partition
+ */
+ public boolean isSystemPartition()
+ {
+ return systemPartition;
+ }
+
+
+ /**
+ * Sets the System Partition flag.
+ *
+ * @param systemPartition
+ * the System Partition flag
+ */
+ public void setSystemPartition( boolean systemPartition )
+ {
+ this.systemPartition = systemPartition;
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString()
+ {
+ return name;
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfiguration.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfiguration.java
new file mode 100644
index 0000000..05ac67c
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfiguration.java
@@ -0,0 +1,680 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.model;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * This class represents a Server Configuration.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ServerConfiguration
+{
+ /** The path of the Server Configuration file */
+ private String path;
+
+ /** The port */
+ private int port;
+
+ /** The principal */
+ private String principal;
+
+ /** The password */
+ private String password;
+
+ /** The flag for Allow Anonymous Access */
+ private boolean allowAnonymousAccess;
+
+ /** The Max Time Limit */
+ private int maxTimeLimit;
+
+ /** the Max Size Limit */
+ private int maxSizeLimit;
+
+ /** The Synchonization Period */
+ private long synchronizationPeriod;
+
+ /** The Maximum number of Threads */
+ private int maxThreads;
+
+ /** The flag for Enable Access Control */
+ private boolean enableAccessControl;
+
+ /** The flag for Enable Kerberos */
+ private boolean enableKerberos;
+
+ /** The flag for Enable NTP */
+ private boolean enableNTP;
+
+ /** The flag for Enable Change Password */
+ private boolean enableChangePassword;
+
+ /** The flag for Denormalize Operational Attributes */
+ private boolean denormalizeOpAttr;
+
+ /** The Binary Attributes */
+ private List<String> binaryAttributes;
+
+ /** The Partitions */
+ private List<Partition> partitions;
+
+ /** The Interceptors */
+ private List<Interceptor> interceptors;
+
+ /** The Extended Operations */
+ private List<ExtendedOperation> extendedOperations;
+
+
+ /**
+ * Creates a new instance of ServerConfiguration.
+ */
+ public ServerConfiguration()
+ {
+ partitions = new ArrayList<Partition>();
+ interceptors = new ArrayList<Interceptor>();
+ extendedOperations = new ArrayList<ExtendedOperation>();
+ binaryAttributes = new ArrayList<String>();
+ }
+
+
+ /**
+ * Gets the Allow Anonymous flag.
+ *
+ * @return
+ * true if the server configuration allows Anonymous Access
+ */
+ public boolean isAllowAnonymousAccess()
+ {
+ return allowAnonymousAccess;
+ }
+
+
+ /**
+ * Sets the Allow Anonymous flag.
+ *
+ * @param allowAnonymousAccess
+ * the new value
+ */
+ public void setAllowAnonymousAccess( boolean allowAnonymousAccess )
+ {
+ this.allowAnonymousAccess = allowAnonymousAccess;
+ }
+
+
+ /**
+ * Gets the Enable Access Control flag.
+ *
+ * @return
+ * true if Access Control is enabled
+ */
+ public boolean isEnableAccessControl()
+ {
+ return enableAccessControl;
+ }
+
+
+ /**
+ * Sets the Enable Access Control flag.
+ *
+ * @param enableAccessControl
+ * the new value
+ */
+ public void setEnableAccessControl( boolean enableAccessControl )
+ {
+ this.enableAccessControl = enableAccessControl;
+ }
+
+
+ /**
+ * Gets the Enable Change Password flag.
+ *
+ * @return
+ * true if Change Password is enabled
+ */
+ public boolean isEnableChangePassword()
+ {
+ return enableChangePassword;
+ }
+
+
+ /**
+ * Sets the Enable Change Password flag.
+ *
+ * @param enableChangePassword
+ * the new value
+ */
+ public void setEnableChangePassword( boolean enableChangePassword )
+ {
+ this.enableChangePassword = enableChangePassword;
+ }
+
+
+ /**
+ * Gets the Enable Kerberos flag.
+ *
+ * @return
+ * true if Kerberos is enabled
+ */
+ public boolean isEnableKerberos()
+ {
+ return enableKerberos;
+ }
+
+
+ /**
+ * Sets the Enable Kerberos flag.
+ *
+ * @param enableKerberos
+ * the new value
+ */
+ public void setEnableKerberos( boolean enableKerberos )
+ {
+ this.enableKerberos = enableKerberos;
+ }
+
+
+ /**
+ * Gets the Enable NTP flag.
+ *
+ * @return
+ * true if NTP is enabled
+ */
+ public boolean isEnableNTP()
+ {
+ return enableNTP;
+ }
+
+
+ /**
+ * Sets the Enable NTP flag.
+ *
+ * @param enableNTP
+ * the new value
+ */
+ public void setEnableNTP( boolean enableNTP )
+ {
+ this.enableNTP = enableNTP;
+ }
+
+
+ /**
+ * Gets the Extended Operations List.
+ *
+ * @return
+ * the Extended Operations List
+ */
+ public List<ExtendedOperation> getExtendedOperations()
+ {
+ return extendedOperations;
+ }
+
+
+ /**
+ * Sets the Extended Operations List.
+ *
+ * @param extendedOperations
+ * the new value
+ */
+ public void setExtendedOperations( List<ExtendedOperation> extendedOperations )
+ {
+ this.extendedOperations = extendedOperations;
+ }
+
+
+ /**
+ * Adds ab Extended Operation.
+ *
+ * @param extendedOperation
+ * the Extended Operation to add
+ * @return
+ * true (as per the general contract of the Collection.add method).
+ */
+ public boolean addExtendedOperation( ExtendedOperation extendedOperation )
+ {
+ return extendedOperations.add( extendedOperation );
+ }
+
+
+ /**
+ * Removes an Extended Operation.
+ *
+ * @param extendedOperation
+ * the Extended Operation to remove
+ * @return
+ * true if this list contained the specified element.
+ */
+ public boolean removeExtendedOperation( ExtendedOperation extendedOperation )
+ {
+ return extendedOperations.remove( extendedOperation );
+ }
+
+
+ /**
+ * Removes all ExtendedOperations.
+ */
+ public void clearExtendedOperations()
+ {
+ extendedOperations.clear();
+ }
+
+
+ /**
+ * Gets the Interceptors List.
+ *
+ * @return
+ * the Interceptors List
+ */
+ public List<Interceptor> getInterceptors()
+ {
+ return interceptors;
+ }
+
+
+ /**
+ * Sets the Interceptors List.
+ *
+ * @param interceptors
+ * the new value
+ */
+ public void setInterceptors( List<Interceptor> interceptors )
+ {
+ this.interceptors = interceptors;
+ }
+
+
+ /**
+ * Adds an Interceptor.
+ *
+ * @param interceptor
+ * the Interceptor to add
+ * @return
+ * true (as per the general contract of the Collection.add method).
+ */
+ public boolean addInterceptor( Interceptor interceptor )
+ {
+ return interceptors.add( interceptor );
+ }
+
+
+ /**
+ * Removes an Interceptor.
+ *
+ * @param interceptor
+ * the Interceptor to remove
+ * @return
+ * true if this list contained the specified element.
+ */
+ public boolean removeInterceptor( Interceptor interceptor )
+ {
+ return interceptors.remove( interceptor );
+ }
+
+
+ /**
+ * Removes all interceptors.
+ */
+ public void clearInterceptors()
+ {
+ interceptors.clear();
+ }
+
+
+ /**
+ * Gets the Maximum Size Limit.
+ *
+ * @return
+ * the Maximum Size Limit
+ */
+ public int getMaxSizeLimit()
+ {
+ return maxSizeLimit;
+ }
+
+
+ /**
+ * Sets the Maximum Size Limit.
+ *
+ * @param maxSizeLimit
+ * the new value
+ */
+ public void setMaxSizeLimit( int maxSizeLimit )
+ {
+ this.maxSizeLimit = maxSizeLimit;
+ }
+
+
+ /**
+ * Gets the Maximum number of Threads.
+ *
+ * @return
+ * the Maximum number of Threads
+ */
+ public int getMaxThreads()
+ {
+ return maxThreads;
+ }
+
+
+ /**
+ * Sets the Maximum number of Threads
+ *
+ * @param maxThreads
+ * the new value
+ */
+ public void setMaxThreads( int maxThreads )
+ {
+ this.maxThreads = maxThreads;
+ }
+
+
+ /**
+ * Gets the Maximum Time Limit.
+ *
+ * @return
+ * the Maximum Time Limit
+ */
+ public int getMaxTimeLimit()
+ {
+ return maxTimeLimit;
+ }
+
+
+ /**
+ * Sets the Maximum Time Limit.
+ *
+ * @param maxTimeLimit
+ * the new value
+ */
+ public void setMaxTimeLimit( int maxTimeLimit )
+ {
+ this.maxTimeLimit = maxTimeLimit;
+ }
+
+
+ /**
+ * Gets the Partitions List.
+ *
+ * @return
+ * the Partitions List
+ */
+ public List<Partition> getPartitions()
+ {
+ return partitions;
+ }
+
+
+ /**
+ * Sets the Partitions List.
+ *
+ * @param partitions
+ * the new value
+ */
+ public void setPartitions( List<Partition> partitions )
+ {
+ this.partitions = partitions;
+ }
+
+
+ /**
+ * Adds a Partition.
+ *
+ * @param partition
+ * the Partition to add
+ * @return
+ * true (as per the general contract of the Collection.add method).
+ */
+ public boolean addPartition( Partition partition )
+ {
+ return partitions.add( partition );
+ }
+
+
+ /**
+ * Removes a Partition.
+ *
+ * @param partition
+ * the partition to remove
+ * @return
+ * true if this list contained the specified element.
+ */
+ public boolean removePartition( Partition partition )
+ {
+ return partitions.remove( partition );
+ }
+
+
+ /**
+ * Removes all partitions.
+ */
+ public void clearPartitions()
+ {
+ partitions.clear();
+ }
+
+
+ /**
+ * Gets the password.
+ *
+ * @return
+ * the password
+ */
+ public String getPassword()
+ {
+ return password;
+ }
+
+
+ /**
+ * Sets the password.
+ *
+ * @param password
+ * the new password
+ */
+ public void setPassword( String password )
+ {
+ this.password = password;
+ }
+
+
+ /**
+ * Gets the Path of the file corresponding to the ServerConfiguration.
+ *
+ * @return
+ * the Path of the corresponding file
+ */
+ public String getPath()
+ {
+ return path;
+ }
+
+
+ /**
+ * Sets the Path of the file corresponding to the ServerConfiguration.
+ *
+ * @param path
+ * the new value
+ */
+ public void setPath( String path )
+ {
+ this.path = path;
+ }
+
+
+ /**
+ * Gets the Port.
+ *
+ * @return
+ * the Port
+ */
+ public int getPort()
+ {
+ return port;
+ }
+
+
+ /**
+ * Sets the Port
+ *
+ * @param port
+ * the new value
+ */
+ public void setPort( int port )
+ {
+ this.port = port;
+ }
+
+
+ /**
+ * Gets the Principal
+ *
+ * @return
+ * the Principal
+ */
+ public String getPrincipal()
+ {
+ return principal;
+ }
+
+
+ /**
+ * Sets the Principal
+ *
+ * @param principal
+ * the new value
+ */
+ public void setPrincipal( String principal )
+ {
+ this.principal = principal;
+ }
+
+
+ /**
+ * Gets the Synchronization Period.
+ *
+ * @return
+ * the Synchronization Period
+ */
+ public long getSynchronizationPeriod()
+ {
+ return synchronizationPeriod;
+ }
+
+
+ /**
+ * Sets the Synchonization Period.
+ *
+ * @param synchronizationPeriod
+ * the new value
+ */
+ public void setSynchronizationPeriod( long synchronizationPeriod )
+ {
+ this.synchronizationPeriod = synchronizationPeriod;
+ }
+
+
+ /**
+ * Gets the Denormalize Operational Attributes flag.
+ *
+ * @return
+ * the Denormalize Operational Attributes flag
+ */
+ public boolean isDenormalizeOpAttr()
+ {
+ return denormalizeOpAttr;
+ }
+
+
+ /**
+ * Sets the Denormalize Operational Attributes flag.
+ *
+ * @param denormalizeOpAttr
+ * the new Denormalize Operational Attributes flag
+ */
+ public void setDenormalizeOpAttr( boolean denormalizeOpAttr )
+ {
+ this.denormalizeOpAttr = denormalizeOpAttr;
+ }
+
+
+ /**
+ * Gets the Binary Attributes List.
+ *
+ * @return
+ * the Binary Attributes List
+ */
+ public List<String> getBinaryAttributes()
+ {
+ return binaryAttributes;
+ }
+
+
+ /**
+ * Sets the Binary Attributes List.
+ *
+ * @param binaryAttributes
+ * the new value
+ */
+ public void setBinaryAttributes( List<String> binaryAttributes )
+ {
+ this.binaryAttributes = binaryAttributes;
+ }
+
+
+ /**
+ * Adds a Binary Attribute.
+ *
+ * @param binaryAttribute
+ * the Partition to add
+ * @return
+ * true (as per the general contract of the Collection.add method).
+ */
+ public boolean addBinaryAttribute( String binaryAttribute )
+ {
+ return binaryAttributes.add( binaryAttribute );
+ }
+
+
+ /**
+ * Removes a Binary Attribute.
+ *
+ * @param binaryAttribute
+ * the Binary Attribute to remove
+ * @return
+ * true if this list contained the specified element.
+ */
+ public boolean removeBinaryAttribute( String binaryAttribute )
+ {
+ return binaryAttributes.remove( binaryAttribute );
+ }
+
+
+ /**
+ * Removes all Binary Attributes.
+ */
+ public void clearBinaryAttributes()
+ {
+ binaryAttributes.clear();
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationParser.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationParser.java
new file mode 100644
index 0000000..51eec61
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationParser.java
@@ -0,0 +1,862 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.model;
+
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
+
+import org.apache.directory.shared.ldap.ldif.LdifReader;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.util.StringTools;
+import org.dom4j.Attribute;
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
+
+
+/**
+ * This class represents the Server Configuration Parser. It can be used to parse a 'server.xml' file
+ * and get Server Configuration Object from it.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ServerConfigurationParser
+{
+ /**
+ * Parses a 'server.xml' file located at the given path and returns
+ * the corresponding ServerConfiguration Object.
+ *
+ * @param path
+ * the path of the file to parse
+ * @return
+ * the corresponding ServerConfiguration Object
+ * @throws ServerConfigurationParserException
+ * if an error occurrs when reading the Server Configuration file
+ */
+ public ServerConfiguration parse( String path ) throws ServerConfigurationParserException
+ {
+ try
+ {
+ SAXReader reader = new SAXReader();
+ Document document = reader.read( path );
+
+ ServerConfiguration serverConfiguration = new ServerConfiguration();
+ serverConfiguration.setPath( path );
+
+ parse( document, serverConfiguration );
+
+ return serverConfiguration;
+ }
+ catch ( Exception e )
+ {
+ if ( e instanceof ServerConfigurationParserException )
+ {
+ throw ( ServerConfigurationParserException ) e;
+ }
+ else
+ {
+ ServerConfigurationParserException exception = new ServerConfigurationParserException( e.getMessage(),
+ e.getCause() );
+ exception.setStackTrace( e.getStackTrace() );
+ throw exception;
+ }
+ }
+ }
+
+
+ /**
+ * Parses a 'server.xml' file located at the given path and returns
+ * the corresponding ServerConfiguration Object.
+ *
+ * @param inputStream
+ * the Input Stream of the file to parse
+ * @return
+ * the corresponding ServerConfiguration Object
+ * @throws ServerConfigurationParserException
+ * if an error occurrs when reading the Server Configuration file
+ */
+ public ServerConfiguration parse( InputStream inputStream ) throws ServerConfigurationParserException
+ {
+ try
+ {
+ SAXReader reader = new SAXReader();
+ Document document = reader.read( inputStream );
+
+ ServerConfiguration serverConfiguration = new ServerConfiguration();
+
+ parse( document, serverConfiguration );
+
+ return serverConfiguration;
+ }
+ catch ( Exception e )
+ {
+ if ( e instanceof ServerConfigurationParserException )
+ {
+ throw ( ServerConfigurationParserException ) e;
+ }
+ else
+ {
+ ServerConfigurationParserException exception = new ServerConfigurationParserException( e.getMessage(),
+ e.getCause() );
+ exception.setStackTrace( e.getStackTrace() );
+ throw exception;
+ }
+ }
+ }
+
+
+ /**
+ * Parses the Document.
+ *
+ * @param document
+ * the Document
+ * @param serverConfiguration
+ * the Server Configuration
+ * @throws NumberFormatException
+ * @throws BooleanFormatException
+ * @throws ServerConfigurationParserException
+ */
+ private void parse( Document document, ServerConfiguration serverConfiguration ) throws NumberFormatException,
+ BooleanFormatException, ServerConfigurationParserException
+ {
+ // Reading the 'Environment' Bean
+ readEnvironmentBean( document, serverConfiguration );
+
+ // Reading the 'Configuration' Bean
+ readConfigurationBean( document, serverConfiguration );
+ }
+
+
+ /**
+ * Reads the "Environment" Bean and store its values in the given ServerConfiguration.
+ *
+ * @param document
+ * the document to use
+ * @param serverConfiguration
+ * the Server Configuration
+ */
+ private void readEnvironmentBean( Document document, ServerConfiguration serverConfiguration )
+ {
+ Element environmentBean = getBeanElementById( document, "environment" );
+
+ // Principal
+ String principal = readEnvironmentBeanProperty( "java.naming.security.principal", environmentBean );
+ if ( principal != null )
+ {
+ serverConfiguration.setPrincipal( principal );
+ }
+
+ // Password
+ String password = readEnvironmentBeanProperty( "java.naming.security.credentials", environmentBean );
+ if ( password != null )
+ {
+ serverConfiguration.setPassword( password );
+ }
+
+ // Binary Attributes
+ String binaryAttributes = readEnvironmentBeanProperty( "java.naming.ldap.attributes.binary", environmentBean );
+ if ( binaryAttributes != null )
+ {
+ String[] attributes = binaryAttributes.split( " " );
+
+ for( String attribute : attributes)
+ {
+ serverConfiguration.addBinaryAttribute( attribute );
+ }
+ }
+ }
+
+
+ /**
+ * Reads the given property in the 'Environment' Bean and returns it.
+ *
+ * @param property
+ * the property
+ * @param element
+ * the Environment Bean Element
+ * @return
+ * the value of the property, or null if the property has not been found
+ */
+ private String readEnvironmentBeanProperty( String property, Element element )
+ {
+ Element propertyElement = element.element( "property" );
+ if ( propertyElement != null )
+ {
+ Element propsElement = propertyElement.element( "props" );
+ if ( propsElement != null )
+ {
+ for ( Iterator i = propsElement.elementIterator( "prop" ); i.hasNext(); )
+ {
+ Element propElement = ( Element ) i.next();
+ Attribute keyAttribute = propElement.attribute( "key" );
+ if ( keyAttribute != null && ( keyAttribute.getValue().equals( property ) ) )
+ {
+ return propElement.getText();
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Reads the "Configuration" Bean and store its values in the given ServerConfiguration.
+ *
+ * @param document
+ * the document to use
+ * @param serverConfiguration
+ * the Server Configuration
+ * @throws NumberFormatException
+ * @throws BooleanFormatException
+ * @throws ServerConfigurationParserException
+ */
+ private void readConfigurationBean( Document document, ServerConfiguration serverConfiguration )
+ throws NumberFormatException, BooleanFormatException, ServerConfigurationParserException
+ {
+ Element configurationBean = getBeanElementById( document, "configuration" );
+
+ // LdapPort
+ String ldapPort = readBeanProperty( "ldapPort", configurationBean );
+ if ( ldapPort != null )
+ {
+ serverConfiguration.setPort( Integer.parseInt( ldapPort ) );
+ }
+
+ // SynchPeriodMillis
+ String synchPeriodMillis = readBeanProperty( "synchPeriodMillis", configurationBean );
+ if ( synchPeriodMillis != null )
+ {
+ serverConfiguration.setSynchronizationPeriod( Long.parseLong( synchPeriodMillis ) );
+ }
+
+ // MaxTimeLimit
+ String maxTimeLimit = readBeanProperty( "maxTimeLimit", configurationBean );
+ if ( maxTimeLimit != null )
+ {
+ serverConfiguration.setMaxTimeLimit( Integer.parseInt( maxTimeLimit ) );
+ }
+
+ // MaxSizeLimit
+ String maxSizeLimit = readBeanProperty( "maxSizeLimit", configurationBean );
+ if ( maxSizeLimit != null )
+ {
+ serverConfiguration.setMaxSizeLimit( Integer.parseInt( maxSizeLimit ) );
+ }
+
+ // MaxThreads
+ String maxThreads = readBeanProperty( "maxThreads", configurationBean );
+ if ( maxThreads != null )
+ {
+ serverConfiguration.setMaxThreads( Integer.parseInt( maxThreads ) );
+ }
+
+ // AllowAnonymousAccess
+ String allowAnonymousAccess = readBeanProperty( "allowAnonymousAccess", configurationBean );
+ if ( allowAnonymousAccess != null )
+ {
+ serverConfiguration.setAllowAnonymousAccess( parseBoolean( allowAnonymousAccess ) );
+ }
+
+ // AccessControlEnabled
+ String accessControlEnabled = readBeanProperty( "accessControlEnabled", configurationBean );
+ if ( accessControlEnabled != null )
+ {
+ serverConfiguration.setEnableAccessControl( parseBoolean( accessControlEnabled ) );
+ }
+
+ // EnableNtp
+ String enableNtp = readBeanProperty( "enableNtp", configurationBean );
+ if ( enableNtp != null )
+ {
+ serverConfiguration.setEnableNTP( parseBoolean( enableNtp ) );
+ }
+
+ // EnableKerberos
+ String enableKerberos = readBeanProperty( "enableKerberos", configurationBean );
+ if ( enableKerberos != null )
+ {
+ serverConfiguration.setEnableKerberos( parseBoolean( enableKerberos ) );
+ }
+
+ // EnableChangePassword
+ String enableChangePassword = readBeanProperty( "enableChangePassword", configurationBean );
+ if ( enableChangePassword != null )
+ {
+ serverConfiguration.setEnableChangePassword( parseBoolean( enableChangePassword ) );
+ }
+
+ // EnableChangePassword
+ String denormalizeOpAttrsEnabled = readBeanProperty( "denormalizeOpAttrsEnabled", configurationBean );
+ if ( denormalizeOpAttrsEnabled != null )
+ {
+ serverConfiguration.setDenormalizeOpAttr( parseBoolean( denormalizeOpAttrsEnabled ) );
+ }
+
+ // SystemPartition
+ String systemPartitionConfiguration = readBeanProperty( "systemPartitionConfiguration", configurationBean );
+ if ( systemPartitionConfiguration != null )
+ {
+ Partition systemPartition = readPartition( document, systemPartitionConfiguration, true );
+ if ( systemPartition != null )
+ {
+ serverConfiguration.addPartition( systemPartition );
+ }
+ }
+ else
+ {
+ throw new ServerConfigurationParserException(
+ "The Server Configuration does not contain a 'systemPartitionConfiguration' property." );
+ }
+
+ // Other Partitions
+ readOtherPartitions( configurationBean, serverConfiguration );
+
+ // Interceptors
+ readInterceptors( configurationBean, serverConfiguration );
+
+ // ExtendedOperations
+ readExtendedOperations( configurationBean, serverConfiguration );
+ }
+
+
+ /**
+ * Reads and adds Partitions (other than the SystemPartition) to the Server Configuration.
+ *
+ * @param configurationBean
+ * the Configuration Bean Element
+ * @param serverConfiguration
+ * the Server Configuration
+ * @throws BooleanFormatException
+ * @throws NumberFormatException
+ */
+ private void readOtherPartitions( Element configurationBean, ServerConfiguration serverConfiguration )
+ throws NumberFormatException, BooleanFormatException
+ {
+ Element propertyElement = getBeanPropertyElement( "partitionConfigurations", configurationBean );
+ if ( propertyElement != null )
+ {
+ Element setElement = propertyElement.element( "set" );
+ if ( setElement != null )
+ {
+ for ( Iterator i = setElement.elementIterator( "ref" ); i.hasNext(); )
+ {
+ Element element = ( Element ) i.next();
+ Attribute beanAttribute = element.attribute( "bean" );
+ if ( beanAttribute != null )
+ {
+ Partition partition = readPartition( configurationBean.getDocument(), beanAttribute.getValue(),
+ false );
+ if ( partition != null )
+ {
+ serverConfiguration.addPartition( partition );
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Reads the partition associated with the given Bean ID and return it.
+ *
+ * @param document
+ * the document
+ * @param id
+ * the Bean ID of the partition
+ * @param isSystemPartition
+ * true if this partition is the System Partition
+ * @return
+ * the partition associated with the given Bean ID
+ * @throws BooleanFormatException
+ */
+ private Partition readPartition( Document document, String id, boolean isSystemPartition )
+ throws BooleanFormatException, NumberFormatException
+ {
+ Element partitionBean = getBeanElementById( document, id );
+ if ( partitionBean != null )
+ {
+ Partition partition = new Partition();
+ partition.setSystemPartition( isSystemPartition );
+
+ // Name
+ String name = readBeanProperty( "name", partitionBean );
+ if ( name != null )
+ {
+ partition.setName( name );
+ }
+
+ // CacheSize
+ String cacheSize = readBeanProperty( "cacheSize", partitionBean );
+ if ( cacheSize != null )
+ {
+ partition.setCacheSize( Integer.parseInt( cacheSize ) );
+ }
+
+ // Suffix
+ String suffix = readBeanProperty( "suffix", partitionBean );
+ if ( suffix != null )
+ {
+ partition.setSuffix( suffix );
+ }
+
+ // OptimizerEnabled
+ String optimizerEnabled = readBeanProperty( "optimizerEnabled", partitionBean );
+ if ( optimizerEnabled != null )
+ {
+ partition.setEnableOptimizer( parseBoolean( optimizerEnabled ) );
+ }
+
+ // SynchOnWrite
+ String synchOnWrite = readBeanProperty( "synchOnWrite", partitionBean );
+ if ( synchOnWrite != null )
+ {
+ partition.setSynchronizationOnWrite( parseBoolean( synchOnWrite ) );
+ }
+
+ // IndexedAttributes
+ partition.setIndexedAttributes( readPartitionIndexedAttributes( partitionBean ) );
+
+ // ContextEntry
+ partition.setContextEntry( readPartitionContextEntry( partitionBean ) );
+
+ return partition;
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Reads the Indexed Attributes of the given Partition Bean Element
+ *
+ * @param partitionBean
+ * the Partition Bean Element
+ * @return
+ * the Indexed Attributes
+ */
+ private List<IndexedAttribute> readPartitionIndexedAttributes( Element partitionBean ) throws NumberFormatException
+ {
+ List<IndexedAttribute> indexedAttributes = new ArrayList<IndexedAttribute>();
+
+ Element propertyElement = getBeanPropertyElement( "indexedAttributes", partitionBean );
+ if ( propertyElement != null )
+ {
+ Element setElement = propertyElement.element( "set" );
+ if ( setElement != null )
+ {
+ for ( Iterator i = setElement.elementIterator( "bean" ); i.hasNext(); )
+ {
+ Element beanElement = ( Element ) i.next();
+ IndexedAttribute ia = readIndexedAttribute( beanElement );
+ if ( ia != null )
+ {
+ indexedAttributes.add( ia );
+ }
+ }
+ }
+ }
+
+ return indexedAttributes;
+ }
+
+
+ /**
+ * Reads an Indexed Attribute.
+ *
+ * @param beanElement
+ * the Bean Element of the Indexed Attribute
+ * @return
+ * the corresponding Indexed Attribute or null if it could not be parsed
+ * @throws NumberFormatException
+ */
+ private IndexedAttribute readIndexedAttribute( Element beanElement ) throws NumberFormatException
+ {
+ Attribute classAttribute = beanElement.attribute( "class" );
+ if ( classAttribute != null
+ && classAttribute.getValue().equals(
+ "org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration" ) )
+ {
+ String attributeId = readBeanProperty( "attributeId", beanElement );
+ String cacheSize = readBeanProperty( "cacheSize", beanElement );
+ if ( ( attributeId != null ) && ( cacheSize != null ) )
+ {
+ return new IndexedAttribute( attributeId, Integer.parseInt( cacheSize ) );
+ }
+
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Reads the Context Entry of the given Partition Bean Element
+ *
+ * @param partitionBean
+ * the Partition Bean Element
+ * @return
+ * the Context Entry
+ */
+ private Attributes readPartitionContextEntry( Element partitionBean )
+ {
+ Element propertyElement = getBeanPropertyElement( "contextEntry", partitionBean );
+ if ( propertyElement != null )
+ {
+ Element valueElement = propertyElement.element( "value" );
+ if ( valueElement != null )
+ {
+ return readContextEntry( valueElement.getText() );
+ }
+ }
+
+ return new BasicAttributes( true );
+ }
+
+
+ /**
+ * Read an entry (without DN)
+ *
+ * @param text
+ * The ldif format text
+ * @return An Attributes.
+ */
+ private Attributes readContextEntry( String text )
+ {
+ StringReader strIn = new StringReader( text );
+ BufferedReader in = new BufferedReader( strIn );
+
+ String line = null;
+ Attributes attributes = new AttributesImpl( true );
+
+ try
+ {
+ while ( ( line = ( ( BufferedReader ) in ).readLine() ) != null )
+ {
+ if ( line.length() == 0 )
+ {
+ continue;
+ }
+
+ String addedLine = line.trim();
+
+ if ( StringTools.isEmpty( addedLine ) )
+ {
+ continue;
+ }
+
+ javax.naming.directory.Attribute attribute = LdifReader.parseAttributeValue( addedLine );
+ javax.naming.directory.Attribute oldAttribute = attributes.get( attribute.getID() );
+
+ if ( oldAttribute != null )
+ {
+ try
+ {
+ oldAttribute.add( attribute.get() );
+ attributes.put( oldAttribute );
+ }
+ catch ( NamingException ne )
+ {
+ // Do nothing
+ }
+ }
+ else
+ {
+ attributes.put( attribute );
+ }
+ }
+ }
+ catch ( IOException ioe )
+ {
+ // Do nothing : we can't reach this point !
+ }
+
+ return attributes;
+ }
+
+
+ /**
+ * Reads and adds the Interceptors to the Server Configuration.
+ *
+ * @param configurationBean
+ * the Configuration Bean Element
+ * @param serverConfiguration
+ * the Server Configuration
+ */
+ private void readInterceptors( Element configurationBean, ServerConfiguration serverConfiguration )
+ {
+ Element propertyElement = getBeanPropertyElement( "interceptorConfigurations", configurationBean );
+ if ( propertyElement != null )
+ {
+ Element listElement = propertyElement.element( "list" );
+ if ( listElement != null )
+ {
+ for ( Iterator i = listElement.elementIterator( "bean" ); i.hasNext(); )
+ {
+ Interceptor interceptor = readInterceptor( ( Element ) i.next() );
+ if ( interceptor != null )
+ {
+ serverConfiguration.addInterceptor( interceptor );
+ }
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Reads an Interceptor.
+ *
+ * @param element
+ * the Interceptor Element
+ * @return
+ * the Interceptor or null if it could not be parsed
+ */
+ private Interceptor readInterceptor( Element element )
+ {
+ Attribute classAttribute = element.attribute( "class" );
+ if ( classAttribute != null
+ && classAttribute.getValue().equals(
+ "org.apache.directory.server.core.configuration.MutableInterceptorConfiguration" ) )
+ {
+ String name = readBeanProperty( "name", element );
+
+ for ( Iterator i = element.elementIterator( "property" ); i.hasNext(); )
+ {
+ Element propertyElement = ( Element ) i.next();
+ Attribute nameAttribute = propertyElement.attribute( "name" );
+ if ( nameAttribute != null && ( nameAttribute.getValue().equals( "interceptor" ) ) )
+ {
+ Element beanElement = propertyElement.element( "bean" );
+ if ( beanElement != null )
+ {
+ Attribute beanClassAttribute = beanElement.attribute( "class" );
+ if ( beanClassAttribute != null )
+ {
+ Interceptor interceptor = new Interceptor( name );
+ interceptor.setClassType( beanClassAttribute.getValue() );
+ return interceptor;
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Reads and adds the ExtendedOperations to the Server Configuration.
+ *
+ * @param configurationBean
+ * the Configuration Bean Element
+ * @param serverConfiguration
+ * the Server Configuration
+ */
+ private void readExtendedOperations( Element configurationBean, ServerConfiguration serverConfiguration )
+ {
+ Element propertyElement = getBeanPropertyElement( "extendedOperationHandlers", configurationBean );
+ if ( propertyElement != null )
+ {
+ Element listElement = propertyElement.element( "list" );
+ if ( listElement != null )
+ {
+ for ( Iterator i = listElement.elementIterator( "bean" ); i.hasNext(); )
+ {
+ ExtendedOperation extendedOperation = readExtendedOperation( ( Element ) i.next() );
+ if ( extendedOperation != null )
+ {
+ serverConfiguration.addExtendedOperation( extendedOperation );
+ }
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Reads an Extended Operation.
+ *
+ * @param element
+ * the Extended Operation Element
+ * @return
+ * the Extended Operation or null if it could not be parsed
+ */
+ private ExtendedOperation readExtendedOperation( Element element )
+ {
+ Attribute classAttribute = element.attribute( "class" );
+ if ( classAttribute != null )
+ {
+ return new ExtendedOperation( classAttribute.getValue() );
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Gets the Bean element corresponding to the given ID.
+ *
+ * @param document
+ * the document to use
+ * @param id
+ * the id
+ * @return
+ * the Bean element corresponding to the given ID or null if the bean was not found
+ */
+ private Element getBeanElementById( Document document, String id )
+ {
+ for ( Iterator i = document.getRootElement().elementIterator( "bean" ); i.hasNext(); )
+ {
+ Element element = ( Element ) i.next();
+ Attribute idAttribute = element.attribute( "id" );
+ if ( idAttribute != null && ( idAttribute.getValue().equals( id ) ) )
+ {
+ return element;
+ }
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Reads the given property in the Bean and returns its value.
+ *
+ * @param property
+ * the property
+ * @param element
+ * the Bean Element
+ * @return
+ * the value of the property, or null if the property has not been found
+ */
+ private String readBeanProperty( String property, Element element )
+ {
+ Element propertyElement = getBeanPropertyElement( property, element );
+ if ( propertyElement != null )
+ {
+ Attribute valueAttribute = propertyElement.attribute( "value" );
+ if ( valueAttribute != null )
+ {
+ return valueAttribute.getValue();
+ }
+
+ Attribute refAttribute = propertyElement.attribute( "ref" );
+ if ( refAttribute != null )
+ {
+ return refAttribute.getValue();
+ }
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Gets the given property Element in the the bean
+ *
+ * @param property
+ * the propery
+ * @param element
+ * the bean Element
+ * @return
+ * the associated property, or null if the property has not been found
+ */
+ private Element getBeanPropertyElement( String property, Element element )
+ {
+ for ( Iterator i = element.elementIterator( "property" ); i.hasNext(); )
+ {
+ Element propertyElement = ( Element ) i.next();
+ Attribute nameAttribute = propertyElement.attribute( "name" );
+ if ( nameAttribute != null && ( nameAttribute.getValue().equals( property ) ) )
+ {
+ return propertyElement;
+ }
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Parses the string argument as a boolean.
+ *
+ * @param s
+ * a String containing the boolean representation to be parsed
+ * @return
+ * the boolean value represented by the argument.
+ * @throws BooleanFormatException
+ * if the string does not contain a parsable boolean.
+ */
+ private boolean parseBoolean( String s ) throws BooleanFormatException
+ {
+ if ( "true".equals( s ) )
+ {
+ return true;
+ }
+ else if ( "false".equals( s ) )
+ {
+ return false;
+ }
+ else
+ {
+ throw new BooleanFormatException( "The String '" + s + "' could not be parsed as a boolean." );
+ }
+ }
+
+ /**
+ * Thrown to indicate that the application has attempted to convert a string to a boolean,
+ * but that the string does not have the appropriate format.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ private class BooleanFormatException extends Exception
+ {
+ /** The Serial Version UID */
+ private static final long serialVersionUID = -6426955193802317452L;
+
+
+ /**
+ * Creates a new instance of BooleanFormatException.
+ *
+ * @param message
+ * @param cause
+ */
+ public BooleanFormatException( String message )
+ {
+ super( message );
+ }
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationParserException.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationParserException.java
new file mode 100644
index 0000000..2b7fef4
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationParserException.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.model;
+
+
+/**
+ * This class represents the Server Configuration Parser Exception, that can be thrown
+ * when an error is detected when reading the Server Configuration file.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ServerConfigurationParserException extends Exception
+{
+ /** The Serial Version UID */
+ private static final long serialVersionUID = 7274953743060751973L;
+
+
+ /**
+ * Creates a new instance of ServerConfigurationParserException.
+ *
+ * @param message
+ * the detail message (which is saved for later retrieval by the
+ * getMessage() method).
+ */
+ public ServerConfigurationParserException( String message )
+ {
+ super( message );
+ }
+
+
+ /**
+ * Creates a new instance of ServerConfigurationParserException.
+ *
+ * @param message
+ * the detail message (which is saved for later retrieval by the
+ * getMessage() method).
+ * @param cause
+ * the cause (which is saved for later retrieval by the getCause()
+ * method). (A null value is permitted, and indicates that the cause
+ * is nonexistent or unknown.)
+ */
+ public ServerConfigurationParserException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationWriter.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationWriter.java
new file mode 100644
index 0000000..5759a3e
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationWriter.java
@@ -0,0 +1,480 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.model;
+
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.directory.studio.apacheds.configuration.Activator;
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.io.DocumentResult;
+import org.dom4j.io.DocumentSource;
+
+
+/**
+ * This class represents the Server Configuration Writer. It can be used to save a 'server.xml' file from.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ServerConfigurationWriter
+{
+ /**
+ * Writes the Server Configuration to disk.
+ *
+ * @param serverConfiguration
+ * the Server Configuration
+ * @throws ServerConfigurationWriterException
+ * if an error occurrs when writing the Server Configuration file
+ */
+ public void write( ServerConfiguration serverConfiguration ) throws ServerConfigurationWriterException
+ {
+ try
+ {
+ BufferedWriter outFile = new BufferedWriter( new FileWriter( serverConfiguration.getPath() ) );
+
+ Document document = DocumentHelper.createDocument();
+ Element root = document.addElement( "beans" );
+
+ // Environment Bean
+ createEnvironmentBean( root, serverConfiguration );
+
+ // Configuration Bean
+ createConfigurationBean( root, serverConfiguration );
+
+ // System Partition Configuration Bean
+ createSystemPartitionConfigurationBean( root, serverConfiguration );
+
+ // User Partitions Beans
+ createUserPartitionsConfigurationsBean( root, serverConfiguration );
+
+ // CustomEditors Bean
+ createCustomEditorsBean( root );
+
+ Document stylizedDocuement = styleDocument( document );
+ stylizedDocuement.addDocType( "beans", "-//SPRING//DTD BEAN//EN",
+ "http://www.springframework.org/dtd/spring-beans.dtd" );
+ outFile.write( stylizedDocuement.asXML() );
+ outFile.close();
+ }
+ catch ( Exception e )
+ {
+ ServerConfigurationWriterException exception = new ServerConfigurationWriterException( e.getMessage(), e
+ .getCause() );
+ exception.setStackTrace( e.getStackTrace() );
+ throw exception;
+ }
+ }
+
+
+ /**
+ * Creates the Environment Bean
+ *
+ * @param root
+ * the root Element
+ * @param serverConfiguration
+ * the Server Configuration
+ */
+ private void createEnvironmentBean( Element root, ServerConfiguration serverConfiguration )
+ {
+ Element environmentBean = root.addElement( "bean" );
+ environmentBean.addAttribute( "id", "environment" );
+ environmentBean.addAttribute( "class", "org.springframework.beans.factory.config.PropertiesFactoryBean" );
+
+ Element propertyElement = environmentBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "properties" );
+ Element propsElement = propertyElement.addElement( "props" );
+
+ // Key 'java.naming.security.authentication'
+ Element propElement = propsElement.addElement( "prop" );
+ propElement.addAttribute( "key", "java.naming.security.authentication" );
+ propElement.setText( "simple" );
+
+ // Key 'java.naming.security.principal'
+ propElement = propsElement.addElement( "prop" );
+ propElement.addAttribute( "key", "java.naming.security.principal" );
+ propElement.setText( serverConfiguration.getPrincipal() );
+
+ // Key 'java.naming.security.credentials'
+ propElement = propsElement.addElement( "prop" );
+ propElement.addAttribute( "key", "java.naming.security.credentials" );
+ propElement.setText( serverConfiguration.getPassword() );
+
+ // Key 'java.naming.ldap.attributes.binary'
+ if ( !serverConfiguration.getBinaryAttributes().isEmpty() )
+ {
+ propElement = propsElement.addElement( "prop" );
+ propElement.addAttribute( "key", "java.naming.ldap.attributes.binary" );
+ StringBuffer sb = new StringBuffer();
+ for ( String attribute : serverConfiguration.getBinaryAttributes() )
+ {
+ sb.append( attribute );
+ sb.append( " " );
+ }
+ String attributes = sb.toString();
+ propElement.setText( attributes.substring( 0, attributes.length() - 1 ) );
+ }
+
+ }
+
+
+ /**
+ * Creates the Configuration Bean.
+ *
+ * @param root
+ * the root Element
+ * @param serverConfiguration
+ * the Server Configuration
+ */
+ private void createConfigurationBean( Element root, ServerConfiguration serverConfiguration )
+ {
+ Element configurationBean = root.addElement( "bean" );
+ configurationBean.addAttribute( "id", "configuration" );
+ configurationBean.addAttribute( "class",
+ "org.apache.directory.server.configuration.MutableServerStartupConfiguration" );
+
+ // Working directory
+ Element propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "workingDirectory" );
+ propertyElement.addAttribute( "value", "example.com" ); // Ask Alex about this value.
+
+ // SynchPeriodMillis
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "synchPeriodMillis" );
+ propertyElement.addAttribute( "value", "" + serverConfiguration.getSynchronizationPeriod() );
+
+ // MaxTimeLimit
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "maxTimeLimit" );
+ propertyElement.addAttribute( "value", "" + serverConfiguration.getMaxTimeLimit() );
+
+ // MaxSizeLimit
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "maxSizeLimit" );
+ propertyElement.addAttribute( "value", "" + serverConfiguration.getMaxSizeLimit() );
+
+ // MaxThreads
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "maxThreads" );
+ propertyElement.addAttribute( "value", "" + serverConfiguration.getMaxThreads() );
+
+ // AllowAnonymousAccess
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "allowAnonymousAccess" );
+ propertyElement.addAttribute( "value", "" + serverConfiguration.isAllowAnonymousAccess() );
+
+ // AccessControlEnabled
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "accessControlEnabled" );
+ propertyElement.addAttribute( "value", "" + serverConfiguration.isEnableAccessControl() );
+
+ // Enable NTP
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "enableNtp" );
+ propertyElement.addAttribute( "value", "" + serverConfiguration.isEnableNTP() );
+
+ // EnableKerberos
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "enableKerberos" );
+ propertyElement.addAttribute( "value", "" + serverConfiguration.isEnableKerberos() );
+
+ // EnableChangePassword
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "enableChangePassword" );
+ propertyElement.addAttribute( "value", "" + serverConfiguration.isEnableChangePassword() );
+
+ // DenormalizeOpAttrsEnabled
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "denormalizeOpAttrsEnabled" );
+ propertyElement.addAttribute( "value", "" + serverConfiguration.isDenormalizeOpAttr() );
+
+ // LdapPort
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "ldapPort" );
+ propertyElement.addAttribute( "value", "" + serverConfiguration.getPort() );
+
+ // SystemPartitionConfiguration
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "systemPartitionConfiguration" );
+ propertyElement.addAttribute( "ref", "systemPartitionConfiguration" );
+
+ // PartitionConfigurations
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "partitionConfigurations" );
+ if ( serverConfiguration.getPartitions().size() > 1 )
+ {
+ Element setElement = propertyElement.addElement( "set" );
+ int partitionCounter = 1;
+ for ( Partition partition : serverConfiguration.getPartitions() )
+ {
+ if ( !partition.isSystemPartition() )
+ {
+ setElement.addElement( "ref" ).addAttribute( "bean", "partition-" + partitionCounter );
+ partitionCounter++;
+ }
+ }
+ }
+
+ // ExtendedOperationHandlers
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "extendedOperationHandlers" );
+ if ( serverConfiguration.getExtendedOperations().size() > 1 )
+ {
+ Element listElement = propertyElement.addElement( "list" );
+ for ( ExtendedOperation extendedOperation : serverConfiguration.getExtendedOperations() )
+ {
+ listElement.addElement( "bean" ).addAttribute( "class", extendedOperation.getClassType() );
+ }
+ }
+
+ // InterceptorConfigurations
+ propertyElement = configurationBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "interceptorConfigurations" );
+ if ( serverConfiguration.getInterceptors().size() > 1 )
+ {
+ Element listElement = propertyElement.addElement( "list" );
+ for ( Interceptor interceptor : serverConfiguration.getInterceptors() )
+ {
+ Element interceptorBeanElement = listElement.addElement( "bean" );
+ interceptorBeanElement.addAttribute( "class",
+ "org.apache.directory.server.core.configuration.MutableInterceptorConfiguration" );
+
+ Element interceptorPropertyElement = interceptorBeanElement.addElement( "property" );
+ interceptorPropertyElement.addAttribute( "name", "name" );
+ interceptorPropertyElement.addAttribute( "value", interceptor.getName() );
+
+ interceptorPropertyElement = interceptorBeanElement.addElement( "property" );
+ interceptorPropertyElement.addAttribute( "name", "interceptor" );
+ interceptorPropertyElement.addElement( "bean" ).addAttribute( "class",
+ ( interceptor.getClassType() == null ? "" : interceptor.getClassType() ) );
+ }
+ }
+
+ }
+
+
+ /**
+ * Creates the SystemPartitionConfiguration Bean.
+ *
+ * @param root
+ * the root Element
+ * @param serverConfiguration
+ * the Server Configuration
+ */
+ private void createSystemPartitionConfigurationBean( Element root, ServerConfiguration serverConfiguration )
+ {
+ Partition systemPartition = null;
+ for ( Partition partition : serverConfiguration.getPartitions() )
+ {
+ if ( partition.isSystemPartition() )
+ {
+ systemPartition = partition;
+ break;
+ }
+ }
+
+ if ( systemPartition != null )
+ {
+ createPartitionConfigurationBean( root, systemPartition, "systemPartitionConfiguration" );
+ }
+ }
+
+
+ /**
+ * Creates the UserPartitionConfigurations Bean.
+ *
+ * @param root
+ * the root Element
+ * @param serverConfiguration
+ * the Server Configuration
+ */
+ private void createUserPartitionsConfigurationsBean( Element root, ServerConfiguration serverConfiguration )
+ {
+ int counter = 1;
+ for ( Partition partition : serverConfiguration.getPartitions() )
+ {
+ if ( !partition.isSystemPartition() )
+ {
+ createPartitionConfigurationBean( root, partition, "partition-" + counter );
+ counter++;
+ }
+ }
+ }
+
+
+ /**
+ * Creates a Partition Configuration Bean.
+ *
+ * @param root
+ * the root Element
+ * @param partition
+ * the Partition
+ * @param name
+ * the name to use
+ */
+ private void createPartitionConfigurationBean( Element root, Partition partition, String name )
+ {
+ Element partitionBean = root.addElement( "bean" );
+ partitionBean.addAttribute( "id", name );
+ partitionBean.addAttribute( "class",
+ "org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration" );
+
+ // Name
+ Element propertyElement = partitionBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "name" );
+ propertyElement.addAttribute( "value", partition.getName() );
+
+ // CacheSize
+ propertyElement = partitionBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "cacheSize" );
+ propertyElement.addAttribute( "value", "" + partition.getCacheSize() );
+
+ // Suffix
+ propertyElement = partitionBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "suffix" );
+ propertyElement.addAttribute( "value", partition.getSuffix() );
+
+ // OptimizerEnabled
+ propertyElement = partitionBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "optimizerEnabled" );
+ propertyElement.addAttribute( "value", "" + partition.isEnableOptimizer() );
+
+ // SynchOnWrite
+ propertyElement = partitionBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "synchOnWrite" );
+ propertyElement.addAttribute( "value", "" + partition.isSynchronizationOnWrite() );
+
+ // Indexed Attributes
+ propertyElement = partitionBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "indexedAttributes" );
+ if ( partition.getIndexedAttributes().size() > 1 )
+ {
+ Element setElement = propertyElement.addElement( "set" );
+ for ( IndexedAttribute indexedAttribute : partition.getIndexedAttributes() )
+ {
+ Element beanElement = setElement.addElement( "bean" );
+ beanElement.addAttribute( "class",
+ "org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration" );
+
+ // AttributeID
+ Element beanPropertyElement = beanElement.addElement( "property" );
+ beanPropertyElement.addAttribute( "name", "attributeId" );
+ beanPropertyElement.addAttribute( "value", indexedAttribute.getAttributeId() );
+
+ // CacheSize
+ beanPropertyElement = beanElement.addElement( "property" );
+ beanPropertyElement.addAttribute( "name", "cacheSize" );
+ beanPropertyElement.addAttribute( "value", "" + indexedAttribute.getCacheSize() );
+ }
+ }
+
+ // ContextEntry
+ propertyElement = partitionBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "contextEntry" );
+ if ( partition.getContextEntry() != null )
+ {
+ Element valueElement = propertyElement.addElement( "value" );
+
+ Attributes contextEntry = partition.getContextEntry();
+ StringBuffer sb = new StringBuffer();
+ NamingEnumeration<? extends Attribute> ne = contextEntry.getAll();
+ while ( ne.hasMoreElements() )
+ {
+ Attribute attribute = ( Attribute ) ne.nextElement();
+ try
+ {
+ NamingEnumeration<?> values = attribute.getAll();
+ while ( values.hasMoreElements() )
+ {
+ sb.append( attribute.getID() + ": " + values.nextElement() + "\n" );
+ }
+ }
+ catch ( NamingException e )
+ {
+ }
+ }
+
+ valueElement.setText( sb.toString() );
+ }
+ }
+
+
+ /**
+ * Creates the Custom Editors Bean.
+ *
+ * @param root
+ * the root Element
+ */
+ private void createCustomEditorsBean( Element root )
+ {
+ Element customEditorsBean = root.addElement( "bean" );
+ customEditorsBean.addAttribute( "class", "org.springframework.beans.factory.config.CustomEditorConfigurer" );
+ Element propertyElement = customEditorsBean.addElement( "property" );
+ propertyElement.addAttribute( "name", "customEditors" );
+ Element mapElement = propertyElement.addElement( "map" );
+ Element entryElement = mapElement.addElement( "entry" );
+ entryElement.addAttribute( "key", "javax.naming.directory.Attributes" );
+ Element entryBeanElement = entryElement.addElement( "bean" );
+ entryBeanElement.addAttribute( "class",
+ "org.apache.directory.server.core.configuration.AttributesPropertyEditor" );
+ }
+
+
+ /**
+ * XML Pretty Printer XSLT Tranformation
+ *
+ * @param document
+ * the Dom4j Document
+ * @return
+ * the stylized Document
+ * @throws TransformerException
+ */
+ private Document styleDocument( Document document ) throws TransformerException
+ {
+ // load the transformer using JAXP
+ TransformerFactory factory = TransformerFactory.newInstance();
+ Transformer transformer = null;
+
+ transformer = factory
+ .newTransformer( new StreamSource( Activator.class.getResourceAsStream( "template.xslt" ) ) );
+
+ // now lets style the given document
+ DocumentSource source = new DocumentSource( document );
+ DocumentResult result = new DocumentResult();
+
+ transformer.transform( source, result );
+
+ // return the transformed document
+ Document transformedDoc = result.getDocument();
+ return transformedDoc;
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationWriterException.java b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationWriterException.java
new file mode 100644
index 0000000..8eb22a5
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationWriterException.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.apacheds.configuration.model;
+
+
+/**
+ * This class represents the Server Configuration Writer Exception, that can be thrown
+ * when an error is detected when writing the Server Configuration file.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ServerConfigurationWriterException extends Exception
+{
+ /** The Serial Version UID */
+ private static final long serialVersionUID = -2360825137845553569L;
+
+
+ /**
+ * Creates a new instance of ServerConfigurationParserException.
+ *
+ * @param message
+ * the detail message (which is saved for later retrieval by the
+ * getMessage() method).
+ * @param cause
+ * the cause (which is saved for later retrieval by the getCause()
+ * method). (A null value is permitted, and indicates that the cause
+ * is nonexistent or unknown.)
+ */
+ public ServerConfigurationWriterException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+}
diff --git a/studio-apacheds-configuration/src/main/resources/org/apache/directory/studio/apacheds/configuration/default-server.xml b/studio-apacheds-configuration/src/main/resources/org/apache/directory/studio/apacheds/configuration/default-server.xml
new file mode 100644
index 0000000..07baf94
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/resources/org/apache/directory/studio/apacheds/configuration/default-server.xml
@@ -0,0 +1,368 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+ "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+ <bean id="environment" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
+ <property name="properties">
+ <props>
+ <prop key="java.naming.security.authentication">simple</prop>
+ <prop key="java.naming.security.principal">uid=admin,ou=system</prop>
+ <prop key="java.naming.security.credentials">secret</prop>
+ <!--<prop key="kdc.entryBaseDn">ou=users,dc=example,dc=com</prop>-->
+ <!--<prop key="kdc.java.naming.security.credentials">secret</prop>-->
+ <!--<prop key="changepw.entryBaseDn">ou=users,dc=example,dc=com</prop>-->
+ <!--<prop key="changepw.java.naming.security.credentials">secret</prop>-->
+ <!-- Set this key to a space delimited set of attributeType descriptions
+ and their OID's if you want an attributeType to be handled as
+ binary content.
+
+ The server will use the schema to derive the set of attributeTypes
+ to treat as binary. The union if the values you provide here
+ will be taken as the set of binaries. Note to be consistent you
+ must add both the OID and all the names an attributeType can have.
+ -->
+ <!--
+ <prop key="java.naming.ldap.attributes.binary"></prop>
+ -->
+ </props>
+ </property>
+ </bean>
+
+ <bean id="configuration" class="org.apache.directory.server.configuration.MutableServerStartupConfiguration">
+ <property name="workingDirectory" value="example.com" />
+
+ <!-- Uncomment below to have the server load entries on startup! -->
+ <!-- ldifDirectory property can point to a relative file, directory or -->
+ <!-- can point to an absolute path to either using the URL path -->
+ <!-- notation: i.e. file:///Users/jack/apacheds/ldifs -->
+
+ <!-- Entries will optionally be filtered using LdifLoadFilters in the -->
+ <!-- order specified. The included Krb5KdcEntryFilter will filter -->
+ <!-- kerberos principals creating keys for them using their -->
+ <!-- userPassword attribute if present. -->
+
+ <!--<property name="ldifDirectory">
+ <value>example.ldif</value>
+ </property>
+ <property name="ldifFilters">
+ <list>
+ <bean class="org.apache.directory.server.protocol.shared.store.Krb5KdcEntryFilter"/>
+ </list>
+ </property>-->
+
+ <!-- the number of milliseconds before issuing a synch (flush to disk) -->
+ <!-- which writes out dirty pages back to disk. To turn off synchs all -->
+ <!-- together simply set this value to <= 0. Make sure you turn on -->
+ <!-- synchOnWrite for all partitions if you do choose to do this or else-->
+ <!-- writes may never persist to disk. -->
+ <property name="synchPeriodMillis" value="15000" />
+
+ <!-- limits searches by non-admin users to a max time of 15000 -->
+ <!-- milliseconds and has a default value of 10000 -->
+ <property name="maxTimeLimit" value="15000" />
+ <!-- limits searches to max size of 1000 entries: default value is 100 -->
+ <property name="maxSizeLimit" value="1000" />
+ <!-- maximum number of threads used by mina is set to 8: default is 4 -->
+ <property name="maxThreads" value="8" />
+
+ <property name="allowAnonymousAccess" value="false" />
+ <property name="accessControlEnabled" value="false" />
+ <property name="enableNtp" value="false" />
+ <property name="enableKerberos" value="false" />
+ <property name="enableChangePassword" value="false" />
+
+ <!--
+ It's more efficient to keep this feature turned off but you may not like
+ having the creatorsName and modifiersName contain OIDs instead of short
+ attributeType names instead. So if you want the creatorsName to change
+ from the normalized form which is the internal representation of
+
+ '0.9.2342.19200300.100.1.1=admin,2.5.4.11=system'
+
+ to a more human readabile form like:
+
+ 'uid=admin,ou=system'
+
+ then set this property to true.
+ -->
+ <property name="denormalizeOpAttrsEnabled" value="false" />
+
+ <property name="ldapPort" value="10389" />
+
+ <property name="systemPartitionConfiguration" ref="systemPartitionConfiguration" />
+
+ <property name="partitionConfigurations">
+ <set>
+ <ref bean="examplePartitionConfiguration"/>
+ </set>
+ </property>
+
+ <property name="extendedOperationHandlers">
+ <list>
+ <bean class="org.apache.directory.server.ldap.support.extended.GracefulShutdownHandler"/>
+ <bean class="org.apache.directory.server.ldap.support.extended.LaunchDiagnosticUiHandler"/>
+ </list>
+ </property>
+
+ <property name="interceptorConfigurations">
+ <list>
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="normalizationService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.server.core.normalization.NormalizationService" />
+ </property>
+ </bean>
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="authenticationService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.server.core.authn.AuthenticationService" />
+ </property>
+ </bean>
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="referralService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.server.core.referral.ReferralService" />
+ </property>
+ </bean>
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="authorizationService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.server.core.authz.AuthorizationService" />
+ </property>
+ </bean>
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="defaultAuthorizationService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.server.core.authz.DefaultAuthorizationService" />
+ </property>
+ </bean>
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="exceptionService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.server.core.exception.ExceptionService" />
+ </property>
+ </bean>
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="operationalAttributeService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.server.core.operational.OperationalAttributeService" />
+ </property>
+ </bean>
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="schemaService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.server.core.schema.SchemaService" />
+ </property>
+ </bean>
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="subentryService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.server.core.subtree.SubentryService" />
+ </property>
+ </bean>
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="collectiveAttributeService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.server.core.collective.CollectiveAttributeService" />
+ </property>
+ </bean>
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="eventService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.server.core.event.EventService" />
+ </property>
+ </bean>
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="triggerService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.server.core.trigger.TriggerService" />
+ </property>
+ </bean>
+
+ <!-- Uncomment to enable replication service
+ <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+ <property name="name" value="replicationService" />
+ <property name="interceptor">
+ <bean class="org.apache.directory.mitosis.service.ReplicationService">
+ <property name="configuration">
+ <bean class="org.apache.directory.mitosis.configuration.ReplicationConfiguration">
+ <property name="replicaId" value="instance_a" />
+ <property name="serverPort" value="10390" />
+ <property name="peerReplicas" value="instance_b@localhost:10392" />
+ </bean>
+ </property>
+ </bean>
+ </property>
+ </bean>
+ -->
+ </list>
+ </property>
+ </bean>
+
+ <!-- use the following partitionConfiguration to override defaults for -->
+ <!-- the system partition -->
+ <bean id="systemPartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
+ <property name="name" value="system" />
+ <property name="cacheSize" value="100" />
+ <property name="suffix" value="ou=system" />
+
+ <!-- the optimizer is enabled by default but may not always be what -->
+ <!-- you want if your queries are really simple -->
+ <property name="optimizerEnabled" value="true" />
+
+ <!--
+ Synchronization on writes does not wait for synch operations
+ to flush dirty pages. Writes persist immediately to disk at
+ a cost to performance with increased data integrity. Otherwise
+ the periodic synch operation will flush dirty pages using the
+ synchPeriodMillis parameter in the main configuration.
+ -->
+ <property name="synchOnWrite" value="true" />
+ <property name="indexedAttributes">
+ <set>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.1" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.2" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.3" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.4" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.5" />
+ <property name="cacheSize" value="10" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.6" />
+ <property name="cacheSize" value="10" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.7" />
+ <property name="cacheSize" value="10" />
+ </bean>
+
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="ou" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="uid" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="objectClass" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ </set>
+ </property>
+ <property name="contextEntry">
+ <value>
+ objectClass: top
+ objectClass: organizationalUnit
+ objectClass: extensibleObject
+ ou: system
+ </value>
+ </property>
+ </bean>
+
+
+ <bean id="examplePartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
+ <property name="name" value="example" />
+ <property name="cacheSize" value="100" />
+ <property name="suffix" value="dc=example,dc=com" />
+
+ <!-- the optimizer is enabled by default but may not always be what -->
+ <!-- you want if your queries are really simple -->
+ <property name="optimizerEnabled" value="true" />
+
+ <!--
+ Synchronization on writes does not wait for synch operations
+ to flush dirty pages. Writes persist immediately to disk at
+ a cost to performance with increased data integrity. Otherwise
+ the periodic synch operation will flush dirty pages using the
+ synchPeriodMillis parameter in the main configuration.
+ -->
+ <property name="synchOnWrite" value="true" />
+ <property name="indexedAttributes">
+ <set>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.1" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.2" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.3" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.4" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.5" />
+ <property name="cacheSize" value="10" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.6" />
+ <property name="cacheSize" value="10" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.7" />
+ <property name="cacheSize" value="10" />
+ </bean>
+
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="dc" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="ou" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="krb5PrincipalName" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="uid" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+ <property name="attributeId" value="objectClass" />
+ <property name="cacheSize" value="100" />
+ </bean>
+ </set>
+ </property>
+ <property name="contextEntry">
+ <value>
+ objectClass: top
+ objectClass: domain
+ objectClass: extensibleObject
+ dc: example
+ </value>
+ </property>
+ </bean>
+
+ <bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+ <property name="customEditors">
+ <map>
+ <entry key="javax.naming.directory.Attributes">
+ <bean class="org.apache.directory.server.core.configuration.AttributesPropertyEditor"/>
+ </entry>
+ </map>
+ </property>
+ </bean>
+</beans>
diff --git a/studio-apacheds-configuration/src/main/resources/org/apache/directory/studio/apacheds/configuration/template.xslt b/studio-apacheds-configuration/src/main/resources/org/apache/directory/studio/apacheds/configuration/template.xslt
new file mode 100644
index 0000000..f017c72
--- /dev/null
+++ b/studio-apacheds-configuration/src/main/resources/org/apache/directory/studio/apacheds/configuration/template.xslt
@@ -0,0 +1,48 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="xml"/>
+ <xsl:param name="indent-increment" select="' '" />
+
+ <xsl:template match="*">
+ <xsl:param name="indent" select="'
'"/>
+
+ <xsl:value-of select="$indent"/>
+ <xsl:copy>
+ <xsl:copy-of select="@*" />
+ <xsl:apply-templates>
+ <xsl:with-param name="indent"
+ select="concat($indent, $indent-increment)"/>
+ </xsl:apply-templates>
+ <xsl:if test="*">
+ <xsl:value-of select="$indent"/>
+ </xsl:if>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="comment()|processing-instruction()">
+ <xsl:copy />
+ </xsl:template>
+
+ <!-- WARNING: this is dangerous. Handle with care -->
+ <!-- <xsl:template match="text()[normalize-space(.)='']"/> -->
+
+</xsl:stylesheet>
diff --git a/studio-apacheds-configuration/studio.png b/studio-apacheds-configuration/studio.png
new file mode 100644
index 0000000..7aba2d3
--- /dev/null
+++ b/studio-apacheds-configuration/studio.png
Binary files differ
diff --git a/studio-build/.project b/studio-build/.project
new file mode 100644
index 0000000..6792082
--- /dev/null
+++ b/studio-build/.project
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>studio-build</name>
+ <comment/>
+ <projects/>
+ <buildSpec/>
+ <natures/>
+</projectDescription>
diff --git a/studio-build/build.xml b/studio-build/build.xml
new file mode 100644
index 0000000..27efbce
--- /dev/null
+++ b/studio-build/build.xml
@@ -0,0 +1,375 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<project name="studio-build" default="jar" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
+
+ <!-- Setting standard project properties -->
+ <property name="src" value="${basedir}/src" />
+ <property name="src.main.java" value="${src}/main/java" />
+ <property name="src.main.resources" value="${src}/main/resources" />
+ <property name="src.test.java" value="${src}/test/java" />
+ <property name="src.test.resources" value="${src}/test/resources" />
+ <property name="target" value="${basedir}/target" />
+ <property name="target.classes" value="${target}/classes" />
+ <property name="target.test-classes" value="${target}/test-classes" />
+ <property name="target.build" value="${target}/build" />
+ <property name="target.doc" value="${target}/doc" />
+ <property name="target.html" value="${target}/html" />
+ <property name="target.pdf" value="${target}/pdf" />
+ <property name="lib.dir" value="${basedir}/lib" />
+
+ <!-- Loading specific project, plugin or feature properties -->
+ <property file="${basedir}/project.properties" />
+ <property file="${basedir}/plugin.properties" />
+ <property file="${basedir}/feature.properties" />
+
+
+ <!-- INSTALL-IVY TASK -->
+ <target name="install-ivy">
+ <!-- Installing Ivy -->
+ <path id="ivy.lib.path">
+ <fileset dir="../tools" includes="ivy.jar" />
+ </path>
+ <taskdef resource="fr/jayasoft/ivy/ant/antlib.xml" uri="antlib:fr.jayasoft.ivy.ant" classpathref="ivy.lib.path" />
+ <!-- Configuring Ivy -->
+ <property name="repository.dir" location="../dependencies/externals/" />
+ <ivy:configure file="../tools/ivyconf.xml" />
+ </target>
+
+
+ <!-- RETRIEVE-DEPENDENCIES TASK -->
+ <target name="retrieve-dependencies" depends="install-ivy" description="Retreive dependencies with ivy">
+ <echo>Retrieving dependencies for ${project.name} (${project.id}) version ${project.version}</echo>
+ <mkdir dir="${lib.dir}" />
+ <ivy:retrieve />
+ </target>
+
+
+ <!-- BUILD-CLASSPATH TASK -->
+ <target name="build-classpath" description="Computes the classpath">
+ <echo>Building classpath for ${project.name} (${project.id}) version ${project.version}</echo>
+ <path id="classpath">
+ <!-- Project dependencies -->
+ <fileset dir="${lib.dir}" />
+ </path>
+ </target>
+
+
+ <!-- COMPILE TASK -->
+ <target name="compile" depends="retrieve-dependencies,build-classpath" description="Compiles the sources">
+ <echo>Compiling ${project.name} (${project.id}) version ${project.version}</echo>
+ <!-- Compiling main sources -->
+ <mkdir dir="${target.classes}" />
+ <javac source="1.5" srcdir="${src.main.java}" destdir="${target.classes}" classpathref="classpath" />
+ <copy todir="${target.classes}" failonerror="false">
+ <fileset dir="${src.main.resources}" />
+ </copy>
+ <!-- Compiling test sources -->
+ <mkdir dir="${target.test-classes}" />
+ <javac source="1.5" srcdir="${src.test.java}" destdir="${target.test-classes}" classpathref="classpath">
+ <classpath>
+ <pathelement path="${target.classes}" />
+ </classpath>
+ </javac>
+ <copy todir="${target.test-classes}" failonerror="false">
+ <fileset dir="${src.test.resources}" />
+ </copy>
+ </target>
+
+
+ <!-- JAR TASK -->
+ <target name="jar" depends="compile" description="Creates a Jar from the compiled sources">
+ <copy todir="${target.build}" failonerror="false">
+ <fileset dir="${target.classes}">
+ <include name="**" />
+ </fileset>
+ <fileset dir="${basedir}">
+ <include name="META-INF/**" />
+ </fileset>
+ </copy>
+ <jar destfile="${target}/${project.name}-${project.version}.jar" manifest="${target.build}/META-INF/MANIFEST.MF">
+ <fileset dir="${target.build}" />
+ </jar>
+ </target>
+
+
+ <!-- PLUGIN TASK -->
+ <target name="plugin" depends="compile" description="Creates a Plugin Jar from the compiled sources">
+ <copy todir="${target.build}" failonerror="false">
+ <fileset dir="${target.classes}">
+ <include name="**" />
+ </fileset>
+ <fileset dir="${basedir}">
+ <include name="about.html" />
+ <include name="lib/**" />
+ <include name="META-INF/**" />
+ <include name="plugin.properties" />
+ <include name="plugin.xml" />
+ <include name="resources/**" />
+ </fileset>
+ </copy>
+ <jar destfile="${target}/${project.id}_${project.version}.jar" manifest="${target.build}/META-INF/MANIFEST.MF">
+ <fileset dir="${target.build}" />
+ </jar>
+ </target>
+
+
+ <!-- FEATURE TASK -->
+ <target name="feature" description="Creates a Feature Jar">
+ <copy todir="${target}/${project.id}_${project.version}" failonerror="false">
+ <fileset dir="${basedir}">
+ <include name="feature.xml" />
+ <include name="feature.properties" />
+ <include name="META-INF/**" />
+ <include name="studio.png**" />
+ </fileset>
+ </copy>
+ <jar destfile="${target}/${project.id}_${project.version}.jar" manifest="${target}/${project.id}_${project.version}/META-INF/MANIFEST.MF">
+ <fileset dir="${target}/${project.id}_${project.version}" />
+ </jar>
+ </target>
+
+
+ <!-- JAVADOC TASK -->
+ <target name="javadoc" depends="build-classpath" description="Generate Javadoc files">
+ <mkdir dir="${target.doc}" />
+ <javadoc destdir="${target.doc}" classpathref="classpath">
+ <fileset dir="${src.main.java}" defaultexcludes="yes">
+ <include name="**/*.java" />
+ </fileset>
+ </javadoc>
+ </target>
+
+
+ <!-- CLEAN TASK -->
+ <target name="clean" description="Deletes any generated file (javadoc, classes, jars, distribution)">
+ <echo>Cleaning ${project.name} (${project.id}) version ${project.version}</echo>
+ <delete dir="${lib.dir}" />
+ <delete dir="${target}" />
+ <delete dir="${basedir}/docbook-xml" />
+ <delete dir="${basedir}/docbook-xsl" />
+ </target>
+
+
+ <!-- PREPARE-HELP TASK -->
+ <target name="prepare-help" depends="retrieve-dependencies" description="Prepares the help generation">
+ <mkdir dir="${basedir}/docbook-xml" />
+ <unzip dest="${basedir}/docbook-xml">
+ <fileset dir="${basedir}/lib">
+ <include name="**/docbook-xml*.zip" />
+ </fileset>
+ </unzip>
+ <unzip dest="${basedir}">
+ <fileset dir="${basedir}/lib">
+ <include name="**/docbook-xsl*.zip" />
+ </fileset>
+ </unzip>
+ <property name="fromregexp" value="^(docbook-xsl-[^/]+)/(.*)" />
+ <property name="toregexp" value="docbook-xsl/\2" />
+ <move todir="${basedir}">
+ <fileset dir="${basedir}">
+ <include name="docbook-xsl-*/**" />
+ </fileset>
+ <!--<mapper type="regexp" from="${fromregexp}" to="${toregexp}" />-->
+ <regexpmapper from="${fromregexp}" to="${toregexp}" handledirsep="true" />
+ </move>
+ <delete includeemptydirs="true">
+ <fileset dir="${basedir}">
+ <include name="docbook-xsl-*" />
+ </fileset>
+ </delete>
+ </target>
+
+
+ <!-- HELP-ECLIPSE TASK -->
+ <target name="help-eclipse" depends="check-help-eclipse" unless="help-eclipse-up2date" description="Generates the help for Eclipse">
+ <antcall target="prepare-help" />
+ <mkdir dir="${target.build}" />
+ <xslt in="${src.main.resources}/0_index.xml" out="${target.build}/index.html" style="${basedir}/docbook-xsl/eclipse/eclipse.xsl">
+ <classpath location="${lib.dir}/xalan-2.7.0.jar" />
+ <param name="ignore.image.scaling" expression="1" />
+ <param name="manifest.in.base.dir" expression="0" />
+ <param name="base.dir" expression="html/" />
+ <param name="html.stylesheet" expression="css/book.css" />
+ <param name="table.cell.borders.thickness" expression="1" />
+ <!-- <param name="table.borders.with.css" expression="1" /> -->
+ <param name="generate.section.toc.level" expression="5" />
+ <param name="toc.max.depth" expression="1" />
+ <param name="chunk.first.sections" expression="1" />
+ <param name="chunk.section.depth" expression="5" />
+ <param name="chunk.fast" expression="1" />
+ <param name="chunk.separate.lots" expression="1" />
+ <!--<param name="chunk.tocs.and.lots" expression="1" />-->
+ <param name="ulink.target" expression="_self" />
+ <param name="suppress.navigation" expression="1" />
+ <param name="html.cleanup" expression="1" />
+ <param name="html.cellpadding" expression="3" />
+ <param name="use.id.as.filename" expression="1" />
+ <param name="chapter.autolabel" expression="0" />
+ <param name="section.autolabel" expression="0" />
+ <outputproperty name="method" value="xml" />
+ <outputproperty name="standalone" value="yes" />
+ <outputproperty name="encoding" value="iso8859_1" />
+ <outputproperty name="indent" value="es" />
+ </xslt>
+ <replaceregexp file="${target.build}/toc.xml" match="<toc [^>]*>" replace="<toc topic="html/index.html" label="${project.name}\">" byline="true" />
+ <copy todir="${target.build}" overwrite="true">
+ <fileset dir="${basedir}">
+ <include name="plugin.xml" />
+ <include name="plugin.properties" />
+ <include name="about.html" />
+ </fileset>
+ </copy>
+ <mkdir dir="${target.build}/META-INF" />
+ <copy todir="${target.build}/META-INF">
+ <fileset dir="${basedir}/META-INF">
+ <include name="**" />
+ </fileset>
+ </copy>
+ <mkdir dir="${target.build}/about_files" />
+ <copy todir="${target.build}/about_files">
+ <fileset dir="${basedir}/about_files">
+ <include name="**" />
+ </fileset>
+ </copy>
+ <mkdir dir="${target.build}/html" />
+ <copy todir="${target.build}/html">
+ <fileset dir="${basedir}/resources">
+ <include name="**" />
+ </fileset>
+ </copy>
+ <jar destfile="${target}/${project.id}_${project.version}.jar" manifest="${target.build}/META-INF/MANIFEST.MF">
+ <fileset dir="${target.build}" />
+ </jar>
+ <tstamp>
+ <format pattern="yyyy-MMM-dd, HH:mm 'GMT'Z" property="timestamp" locale="en" />
+ </tstamp>
+ <echo message="${project.name} (${project.id}) version ${project.version} compiled ${timestamp} by ${user.name}" file="${target}/help-eclipse.timestamp" />
+ </target>
+
+ <!-- CHECK-HELP-ECLIPSE TASK -->
+ <target name="check-help-eclipse">
+ <uptodate property="help-eclipse-up2date" targetfile="${target}/help-eclipse.timestamp">
+ <srcfiles dir="${src}" />
+ </uptodate>
+ </target>
+
+
+ <!-- HELP-HTML TASK -->
+ <target name="help-html" depends="check-help-html" unless="help-html-up2date" description="Generates the help in HTML">
+ <antcall target="prepare-help" />
+ <mkdir dir="${target.html}" />
+ <copy todir="${target.html}">
+ <fileset dir="${basedir}/resources">
+ <include name="**" />
+ </fileset>
+ </copy>
+ <xslt in="${src.main.resources}/0_index.xml" out="${target.html}/index.html" style="${basedir}/docbook-xsl/html/chunk.xsl">
+ <classpath location="lib/xalan-2.7.0.jar" />
+ <param name="ignore.image.scaling" expression="1" />
+ <param name="manifest.in.base.dir" expression="0" />
+ <!-- <param name="base.dir" expression="html/" /> -->
+ <param name="html.stylesheet" expression="css/book.css" />
+ <param name="table.cell.borders.thickness" expression="1" />
+ <!-- <param name="table.borders.with.css" expression="1" /> -->
+ <param name="generate.section.toc.level" expression="5" />
+ <param name="toc.max.depth" expression="3" />
+ <param name="chunk.first.sections" expression="1" />
+ <param name="chunk.section.depth" expression="5" />
+ <param name="chunk.fast" expression="1" />
+ <param name="chunk.separate.lots" expression="1" />
+ <!--<param name="chunk.tocs.and.lots" expression="1" />-->
+ <param name="ulink.target" expression="_self" />
+ <param name="suppress.navigation" expression="0" />
+ <param name="html.cleanup" expression="1" />
+ <param name="html.cellpadding" expression="3" />
+ <param name="use.id.as.filename" expression="1" />
+ <param name="chapter.autolabel" expression="0" />
+ <param name="section.autolabel" expression="0" />
+ <outputproperty name="method" value="xml" />
+ <outputproperty name="standalone" value="yes" />
+ <outputproperty name="encoding" value="iso8859_1" />
+ <outputproperty name="indent" value="es" />
+ </xslt>
+ <tstamp>
+ <format pattern="yyyy-MMM-dd, HH:mm 'GMT'Z" property="timestamp" locale="en" />
+ </tstamp>
+ <echo message="${project.name} (${project.id}) version ${project.version} compiled ${timestamp} by ${user.name}" file="${target}/help-html.timestamp" />
+ </target>
+
+ <!-- CHECK-HELP-HTML TASK -->
+ <target name="check-help-html">
+ <uptodate property="help-html-up2date" targetfile="${target}/help-html.timestamp">
+ <srcfiles dir="${src}" />
+ </uptodate>
+ </target>
+
+
+ <!-- HELP-PDF TASK -->
+ <target name="help-pdf" depends="check-help-pdf" unless="help-pdf-up2date" description="Generates the help in PDF">
+ <antcall target="prepare-help" />
+ <property name="fop.dir" value="${lib.dir}" />
+ <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop">
+ <classpath>
+ <pathelement location="${fop.dir}/avalon-framework-api-4.2.0.jar" />
+ <pathelement location="${fop.dir}/avalon-framework-impl-4.2.0.jar" />
+ <pathelement location="${fop.dir}/commons-logging-1.1.jar" />
+ <pathelement location="${fop.dir}/commons-io-1.3.1.jar" />
+ <pathelement location="${fop.dir}/fop-0.9.3.jar" />
+ <pathelement location="${fop.dir}/batik-all-1.6.jar" />
+ <pathelement location="${fop.dir}/xmlgraphics-commons-1.1.jar" />
+ </classpath>
+ </taskdef>
+
+ <mkdir dir="${target.pdf}" />
+ <copy todir="${target.pdf}">
+ <fileset dir="${basedir}/resources">
+ <include name="**" />
+ </fileset>
+ </copy>
+
+ <xslt in="${src.main.resources}/0_index.xml" out="${target.pdf}/${project.name}.fo" style="${basedir}/docbook-xsl/fo/docbook.xsl">
+ <classpath location="lib/xalan-2.7.0.jar" />
+ <param name="manifest.in.base.dir" expression="0" />
+ <param name="generate.section.toc.level" expression="5" />
+ <param name="toc.max.depth" expression="3" />
+ <param name="ulink.target" expression="_self" />
+ <param name="suppress.navigation" expression="0" />
+ <param name="use.id.as.filename" expression="1" />
+ <param name="chapter.autolabel" expression="I" />
+ <param name="section.autolabel" expression="1" />
+ <outputproperty name="method" value="xml" />
+ <outputproperty name="standalone" value="yes" />
+ <outputproperty name="encoding" value="iso8859_1" />
+ <outputproperty name="indent" value="es" />
+ </xslt>
+ <fop format="application/pdf" basedir="${target.pdf}" fofile="${target.pdf}/${project.name}.fo" outfile="${target.pdf}/${project.name}.pdf" />
+ <tstamp>
+ <format pattern="yyyy-MMM-dd, HH:mm 'GMT'Z" property="timestamp" locale="en" />
+ </tstamp>
+ <echo message="${project.name} (${project.id}) version ${project.version} compiled ${timestamp} by ${user.name}" file="${target}/help-pdf.timestamp" />
+ </target>
+
+ <!-- CHECK-HELP-PDF TASK -->
+ <target name="check-help-pdf">
+ <uptodate property="help-pdf-up2date" targetfile="${target}/help-pdf.timestamp">
+ <srcfiles dir="${src}" />
+ </uptodate>
+ </target>
+
+</project>
\ No newline at end of file
diff --git a/studio-build/plugin.properties b/studio-build/plugin.properties
new file mode 100644
index 0000000..6b95e9f
--- /dev/null
+++ b/studio-build/plugin.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+project.name=Apache Directory Studio Build
+project.version=1.0.0
+project.id=org.apache.directory.studio.build
diff --git a/studio-connection-core/.classpath b/studio-connection-core/.classpath
new file mode 100644
index 0000000..820c66b
--- /dev/null
+++ b/studio-connection-core/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-io-1.3.1.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/studio-connection-core/.project b/studio-connection-core/.project
new file mode 100644
index 0000000..cdf9216
--- /dev/null
+++ b/studio-connection-core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>studio-connection-core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/studio-connection-core/META-INF/LICENSE.txt b/studio-connection-core/META-INF/LICENSE.txt
new file mode 100755
index 0000000..d645695
--- /dev/null
+++ b/studio-connection-core/META-INF/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/studio-connection-core/META-INF/MANIFEST.MF b/studio-connection-core/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..775b90e
--- /dev/null
+++ b/studio-connection-core/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Apache Directory Studio Connection Core
+Bundle-SymbolicName: org.apache.directory.studio.connection.core
+Bundle-Version: 1.0.0
+Bundle-Activator: org.apache.directory.studio.connection.core.ConnectionCorePlugin
+Bundle-Vendor: Apache Software Foundation
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.apache.directory.studio.jars
+Eclipse-LazyStart: true
+Bundle-ClassPath: lib/commons-io-1.3.1.jar,
+ .
+Export-Package: org.apache.directory.studio.connection.core,
+ org.apache.directory.studio.connection.core.event,
+ org.apache.directory.studio.connection.core.io,
+ org.apache.directory.studio.connection.core.io.jndi,
+ org.apache.directory.studio.connection.core.jobs
diff --git a/studio-connection-core/META-INF/NOTICE.txt b/studio-connection-core/META-INF/NOTICE.txt
new file mode 100644
index 0000000..3fa431b
--- /dev/null
+++ b/studio-connection-core/META-INF/NOTICE.txt
Binary files differ
diff --git a/studio-connection-core/build.properties b/studio-connection-core/build.properties
new file mode 100644
index 0000000..a60017e
--- /dev/null
+++ b/studio-connection-core/build.properties
@@ -0,0 +1,5 @@
+source.. = src/main/java/
+output.. = target/classes/
+bin.includes = META-INF/,\
+ .,\
+ lib/commons-io-1.3.1.jar
diff --git a/studio-connection-core/build.xml b/studio-connection-core/build.xml
new file mode 100644
index 0000000..59094b2
--- /dev/null
+++ b/studio-connection-core/build.xml
@@ -0,0 +1,44 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<project default="plugin">
+ <import file="../studio-build/build.xml"/>
+
+
+ <!-- RETRIEVE-STUDIO-JAR-DEPENDENCIES TASK -->
+ <target name="retrieve-studio-jar-dependencies" description="Compiles the dependencies of the project" >
+ <ant dir="../studio-jars" target="retrieve-dependencies" inheritall="false" />
+ </target>
+
+
+ <!-- BUILD-CLASSPATH TASK -->
+ <target name="build-classpath" depends="retrieve-studio-jar-dependencies" description="Computes the classpath" >
+ <echo>Building classpath for ${project.name} (${project.id}) version ${project.version}</echo>
+ <path id="classpath">
+ <!-- Project dependencies -->
+ <fileset dir="${lib.dir}" />
+ <!-- Eclipse dependencies -->
+ <fileset dir="../dependencies/eclipse/3.2">
+ <include name="**/*.jar"/>
+ </fileset>
+ <!-- Plugin dependencies -->
+ <fileset dir="../studio-jars/lib/" />
+ </path>
+ </target>
+
+</project>
diff --git a/studio-connection-core/ivy.xml b/studio-connection-core/ivy.xml
new file mode 100644
index 0000000..c4a2d6e
--- /dev/null
+++ b/studio-connection-core/ivy.xml
@@ -0,0 +1,24 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.studio" module="studio-connection-core"/>
+ <dependencies>
+ <dependency org="commons-io" name="commons-io" rev="1.3.1"/>
+ </dependencies>
+</ivy-module>
\ No newline at end of file
diff --git a/studio-connection-core/plugin.properties b/studio-connection-core/plugin.properties
new file mode 100644
index 0000000..ac59dcf
--- /dev/null
+++ b/studio-connection-core/plugin.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+project.name=Apache Directory Studio Connection Core
+project.version=1.0.0
+project.id=org.apache.directory.studio.connection.core
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
new file mode 100644
index 0000000..e624a02
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
@@ -0,0 +1,297 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core;
+
+
+import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
+import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
+import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+import org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper;
+import org.eclipse.core.runtime.IAdaptable;
+
+
+/**
+ * The Connection class is the central .
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Connection implements ConnectionPropertyPageProvider, IAdaptable
+{
+
+ private ConnectionParameter connectionParameter;
+
+ private JNDIConnectionWrapper jndiConnectionWrapper;
+
+
+ /**
+ * Creates a new instance of Connection.
+ *
+ * @param connectionParameter
+ */
+ public Connection( ConnectionParameter connectionParameter )
+ {
+ this.connectionParameter = connectionParameter;
+ }
+
+
+ /**
+ * @see java.lang.Object#clone()
+ */
+ public Object clone()
+ {
+ ConnectionParameter cp = new ConnectionParameter( getName(), getHost(), getPort(), getEncryptionMethod(),
+ getAuthMethod(), getBindPrincipal(), getBindPassword(), getConnectionParameter().getExtendedProperties() );
+
+ Connection clone = new Connection( cp );
+
+ return clone;
+ }
+
+
+ /**
+ * Gets the JNDI connection wrapper.
+ *
+ * @return the JNDI connection wrapper
+ */
+ public JNDIConnectionWrapper getJNDIConnectionWrapper()
+ {
+ if ( jndiConnectionWrapper == null )
+ {
+ jndiConnectionWrapper = new JNDIConnectionWrapper( this );
+ }
+ return jndiConnectionWrapper;
+ }
+
+
+ /**
+ * Gets the connection parameter.
+ *
+ * @return the connection parameter
+ */
+ public ConnectionParameter getConnectionParameter()
+ {
+ return connectionParameter;
+ }
+
+
+ /**
+ * Sets the connection parameter.
+ *
+ * @param connectionParameter the connection parameter
+ */
+ public void setConnectionParameter( ConnectionParameter connectionParameter )
+ {
+ this.connectionParameter = connectionParameter;
+ ConnectionEventRegistry.fireConnectionUpdated( this, this );
+ }
+
+
+ /**
+ * Gets the auth method.
+ *
+ * @return the auth method
+ */
+ public AuthenticationMethod getAuthMethod()
+ {
+ return connectionParameter.getAuthMethod();
+ }
+
+
+ /**
+ * Gets the bind password.
+ *
+ * @return the bind password
+ */
+ public String getBindPassword()
+ {
+ return connectionParameter.getBindPassword();
+ }
+
+
+ /**
+ * Gets the bind principal.
+ *
+ * @return the bind principal
+ */
+ public String getBindPrincipal()
+ {
+ return connectionParameter.getBindPrincipal();
+ }
+
+
+ /**
+ * Gets the encryption method.
+ *
+ * @return the encryption method
+ */
+ public EncryptionMethod getEncryptionMethod()
+ {
+ return connectionParameter.getEncryptionMethod();
+ }
+
+
+ /**
+ * Gets the id.
+ *
+ * @return the id
+ */
+ public String getId()
+ {
+ return connectionParameter.getId();
+ }
+
+
+ /**
+ * Gets the host.
+ *
+ * @return the host
+ */
+ public String getHost()
+ {
+ return connectionParameter.getHost();
+ }
+
+
+ /**
+ * Gets the name.
+ *
+ * @return the name
+ */
+ public String getName()
+ {
+ return connectionParameter.getName();
+ }
+
+
+ /**
+ * Gets the port.
+ *
+ * @return the port
+ */
+ public int getPort()
+ {
+ return connectionParameter.getPort();
+ }
+
+
+ /**
+ * Sets the auth method.
+ *
+ * @param authMethod the auth method
+ */
+ public void setAuthMethod( AuthenticationMethod authMethod )
+ {
+ connectionParameter.setAuthMethod( authMethod );
+ ConnectionEventRegistry.fireConnectionUpdated( this, this );
+ }
+
+
+ /**
+ * Sets the bind password.
+ *
+ * @param bindPassword the bind password
+ */
+ public void setBindPassword( String bindPassword )
+ {
+ connectionParameter.setBindPassword( bindPassword );
+ ConnectionEventRegistry.fireConnectionUpdated( this, this );
+ }
+
+
+ /**
+ * Sets the bind principal.
+ *
+ * @param bindPrincipal the bind principal
+ */
+ public void setBindPrincipal( String bindPrincipal )
+ {
+ connectionParameter.setBindPrincipal( bindPrincipal );
+ ConnectionEventRegistry.fireConnectionUpdated( this, this );
+ }
+
+
+ /**
+ * Sets the encryption method.
+ *
+ * @param encryptionMethod the encryption method
+ */
+ public void setEncryptionMethod( EncryptionMethod encryptionMethod )
+ {
+ connectionParameter.setEncryptionMethod( encryptionMethod );
+ ConnectionEventRegistry.fireConnectionUpdated( this, this );
+ }
+
+
+ /**
+ * Sets the host.
+ *
+ * @param host the host
+ */
+ public void setHost( String host )
+ {
+ connectionParameter.setHost( host );
+ ConnectionEventRegistry.fireConnectionUpdated( this, this );
+ }
+
+
+ /**
+ * Sets the name.
+ *
+ * @param name the name
+ */
+ public void setName( String name )
+ {
+ connectionParameter.setName( name );
+ ConnectionEventRegistry.fireConnectionUpdated( this, this );
+ }
+
+
+ /**
+ * Sets the port.
+ *
+ * @param port the port
+ */
+ public void setPort( int port )
+ {
+ connectionParameter.setPort( port );
+ ConnectionEventRegistry.fireConnectionUpdated( this, this );
+ }
+
+
+ /**
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
+ public Object getAdapter( Class adapter )
+ {
+ // if ( adapter.isAssignableFrom( ISearchPageScoreComputer.class ) )
+ // {
+ // return new LdapSearchPageScoreComputer();
+ // }
+ if ( adapter == Connection.class )
+ {
+ return this;
+ }
+
+ return null;
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java
new file mode 100644
index 0000000..c18b059
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.connection.core;
+
+
+/**
+ * Constants for the connection core plugin.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ConnectionCoreConstants
+{
+
+ /** The line separator. */
+ public static final String LINE_SEPARATOR = System.getProperty( "line.separator" ); //$NON-NLS-1$
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java
new file mode 100644
index 0000000..03ed77e
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java
@@ -0,0 +1,161 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.connection.core;
+
+
+import org.apache.directory.studio.connection.core.event.CoreEventRunner;
+import org.apache.directory.studio.connection.core.event.EventRunner;
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class ConnectionCorePlugin extends Plugin
+{
+
+ /** The plug-in ID */
+ public static final String PLUGIN_ID = "org.apache.directory.studio.connection.core";
+
+ /** The shared instance */
+ private static ConnectionCorePlugin plugin;
+
+ /** The connection manager */
+ private ConnectionManager connectionManager;
+
+ /** The event runner. */
+ private EventRunner eventRunner;
+
+ /** The credential provider */
+ private IAuthHandler authHandler;
+
+
+ /**
+ * The constructor
+ */
+ public ConnectionCorePlugin()
+ {
+ plugin = this;
+ }
+
+
+ /**
+ * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start( BundleContext context ) throws Exception
+ {
+ super.start( context );
+
+ if ( eventRunner == null )
+ {
+ eventRunner = new CoreEventRunner();
+ }
+
+ if ( connectionManager == null )
+ {
+ connectionManager = new ConnectionManager();
+ }
+ }
+
+
+ /**
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop( BundleContext context ) throws Exception
+ {
+ plugin = null;
+ super.stop( context );
+
+ if ( eventRunner != null )
+ {
+ eventRunner = null;
+ }
+
+ if ( connectionManager != null )
+ {
+ Connection[] connections = connectionManager.getConnections();
+ for ( int i = 0; i < connections.length; i++ )
+ {
+ connections[i].getJNDIConnectionWrapper().disconnect();
+ }
+ connectionManager = null;
+ }
+ }
+
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static ConnectionCorePlugin getDefault()
+ {
+ return plugin;
+ }
+
+
+ /**
+ * Gets the Connection Manager
+ *
+ * @return
+ * the connection manager
+ */
+ public ConnectionManager getConnectionManager()
+ {
+ return connectionManager;
+ }
+
+
+ /**
+ * Gets the event runner.
+ *
+ * @return the event runner
+ */
+ public EventRunner getEventRunner()
+ {
+ return eventRunner;
+ }
+
+
+ /**
+ * Gets the AuthHandler
+ *
+ * @return
+ * the AuthHandler
+ */
+ public IAuthHandler getAuthHandler()
+ {
+ return authHandler;
+ }
+
+
+ /**
+ * Sets the AuthHandler
+ *
+ * @param authHandler
+ * the authHandler to set
+ */
+ public void setAuthHandler( IAuthHandler authHandler )
+ {
+ this.authHandler = authHandler;
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java
new file mode 100644
index 0000000..46ce957
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java
@@ -0,0 +1,368 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core;
+
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+import org.apache.directory.studio.connection.core.event.ConnectionUpdateListener;
+import org.apache.directory.studio.connection.core.io.ConnectionIO;
+import org.apache.directory.studio.connection.core.io.ConnectionIOException;
+
+
+/**
+ * This class is used to manage {@link Connection}s.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionManager implements ConnectionUpdateListener
+{
+
+ /** The list of connections. */
+ private List<Connection> connectionList;
+
+
+ /**
+ * Creates a new instance of ConnectionManager.
+ */
+ public ConnectionManager()
+ {
+ this.connectionList = new ArrayList<Connection>();
+ loadConnections();
+ ConnectionEventRegistry.addConnectionUpdateListener( this, ConnectionCorePlugin.getDefault().getEventRunner() );
+ }
+
+
+ /**
+ * Gets the filename of the Connection Store.
+ *
+ * @return
+ * the filename of the Connection Store
+ */
+ public static final String getConnectionStoreFileName()
+ {
+ String filename = ConnectionCorePlugin.getDefault().getStateLocation().append( "connections.xml" ).toOSString(); //$NON-NLS-1$
+ // File file = new File( filename );
+ // if ( !file.exists() )
+ // {
+ // // try to convert old connections.xml:
+ // // 1st search it in current workspace with the old ldapstudio plugin ID
+ // // 2nd search it in old .ldapstudio workspace with the old ldapstudio plugin ID
+ // String[] oldFilenames = new String[2];
+ // oldFilenames[0] = filename.replace( "org.apache.directory.studio.ldapbrowser.core",
+ // "org.apache.directory.ldapstudio.browser.core" );
+ // oldFilenames[1] = oldFilenames[0].replace( ".ApacheDirectoryStudio",
+ // ".ldapstudio" );
+ // for ( int i = 0; i < oldFilenames.length; i++ )
+ // {
+ // File oldFile = new File( oldFilenames[i] );
+ // if ( oldFile.exists() )
+ // {
+ // try
+ // {
+ // String oldContent = FileUtils.readFileToString( oldFile, "UTF-8" );
+ // String newContent = oldContent.replace( "org.apache.directory.ldapstudio.browser.core",
+ // "org.apache.directory.studio.ldapbrowser.core" );
+ // FileUtils.writeStringToFile( file, newContent, "UTF-8" );
+ // break;
+ // }
+ // catch ( IOException e )
+ // {
+ // e.printStackTrace();
+ // }
+ // }
+ // }
+ // }
+
+ return filename;
+ }
+
+
+ /**
+ * Adds the connection to the end of the connection list. If there is
+ * already a connection with this name, the new connection is renamed.
+ *
+ * @param connection
+ */
+ public void addConnection( Connection connection )
+ {
+ addConnection( connectionList.size(), connection );
+ }
+
+
+ /**
+ * Adds the connection at the specified position of the connection list.
+ * If there is already a connection with this name the new connection is
+ * renamed.
+ *
+ * @param index
+ * @param connection
+ */
+ public void addConnection( int index, Connection connection )
+ {
+ if ( getConnectionByName( connection.getConnectionParameter().getName() ) != null )
+ {
+ String newConnectionName = Messages.bind( Messages.copy_n_of_s,
+ "", connection.getConnectionParameter().getName() ); //$NON-NLS-1$
+ for ( int i = 2; getConnectionByName( newConnectionName ) != null; i++ )
+ {
+ newConnectionName = Messages.bind( Messages.copy_n_of_s,
+ i + " ", connection.getConnectionParameter().getName() ); //$NON-NLS-1$
+ }
+ connection.getConnectionParameter().setName( newConnectionName );
+ }
+
+ connectionList.add( index, connection );
+ ConnectionEventRegistry.fireConnectionAdded( connection, this );
+ }
+
+
+ /**
+ * Gets a connection from its id.
+ *
+ * @param id
+ * the id of the Connection
+ * @return
+ * the corresponding Connection
+ */
+ public Connection getConnectionById( String id )
+ {
+ for ( Iterator<?> it = connectionList.iterator(); it.hasNext(); )
+ {
+ Connection conn = ( Connection ) it.next();
+ if ( conn.getConnectionParameter().getId().equals( id ) )
+ {
+ return conn;
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ * Gets a connection from its name.
+ *
+ * @param name
+ * the name of the Connection
+ * @return
+ * the corresponding Connection
+ */
+ public Connection getConnectionByName( String name )
+ {
+ for ( Iterator<?> it = connectionList.iterator(); it.hasNext(); )
+ {
+ Connection conn = ( Connection ) it.next();
+ if ( conn.getConnectionParameter().getName().equals( name ) )
+ {
+ return conn;
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ * Gets the index in the Connection list of the first occurrence of the specified Connection.
+ *
+ * @param connection
+ * the Connection to search for
+ * @return
+ * the index in the Connection list of the first occurrence of the specified Connection
+ */
+ public int indexOf( Connection connection )
+ {
+ return connectionList.indexOf( connection );
+ }
+
+
+ /**
+ * Removes the given Connection from the Connection list.
+ *
+ * @param connection
+ * the connection to remove
+ */
+ public void removeConnection( Connection connection )
+ {
+ connectionList.remove( connection );
+ ConnectionEventRegistry.fireConnectionRemoved( connection, this );
+ }
+
+
+ /**
+ * Gets an array containing all the Connections.
+ *
+ * @return
+ * an array containing all the Connections
+ */
+ public Connection[] getConnections()
+ {
+ return ( Connection[] ) connectionList.toArray( new Connection[0] );
+ }
+
+
+ /**
+ * Gets the number of Connections.
+ *
+ * @return
+ * the number of Connections
+ */
+ public int getConnectionCount()
+ {
+ return connectionList.size();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionAdded(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionAdded( Connection connection )
+ {
+ saveConnections();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionRemoved(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionRemoved( Connection connection )
+ {
+ saveConnections();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionUpdated(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionUpdated( Connection connection )
+ {
+ saveConnections();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionOpened(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionOpened( Connection connection )
+ {
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionClosed(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionClosed( Connection connection )
+ {
+ }
+
+
+ /**
+ * Saves the Connections
+ */
+ private synchronized void saveConnections()
+ {
+ List<ConnectionParameter> connectionParameters = new ArrayList<ConnectionParameter>();
+ for ( Connection connection : connectionList )
+ {
+ connectionParameters.add( connection.getConnectionParameter() );
+ }
+
+ // To avoid a corrupt file, save object to a temp file first
+ try
+ {
+ ConnectionIO.save( connectionParameters, new FileWriter( getConnectionStoreFileName() + "-temp" ) );
+ }
+ catch ( IOException e )
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ // move temp file to good file
+ File file = new File( getConnectionStoreFileName() );
+ File tempFile = new File( getConnectionStoreFileName() + "-temp" );
+ if ( file.exists() )
+ {
+ file.delete();
+ }
+
+ try
+ {
+ String content = FileUtils.readFileToString( tempFile, "UTF-8" );
+ FileUtils.writeStringToFile( file, content, "UTF-8" );
+ }
+ catch ( IOException e )
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+
+ /**
+ * Loads the Connections
+ */
+ private synchronized void loadConnections()
+ {
+ List<ConnectionParameter> connectionParameters = null;
+
+ try
+ {
+ connectionParameters = ConnectionIO.load( new FileReader( getConnectionStoreFileName() ) );
+ }
+ catch ( Exception e )
+ {
+ // If loading failed, try with temp file
+ try
+ {
+ connectionParameters = ConnectionIO.load( new FileReader( getConnectionStoreFileName() + "-temp" ) );
+ }
+ catch ( FileNotFoundException e1 )
+ {
+ // TODO Auto-generated catch block
+ return;
+ }
+ catch ( ConnectionIOException e1 )
+ {
+ // TODO Auto-generated catch block
+ return;
+ }
+ }
+
+ if ( connectionParameters != null )
+ {
+ for ( ConnectionParameter connectionParameter : connectionParameters )
+ {
+ Connection conn = new Connection( connectionParameter );
+ connectionList.add( conn );
+ }
+ }
+ }
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
new file mode 100644
index 0000000..a6024d4
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionParameter.java
@@ -0,0 +1,458 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core;
+
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+
+
+/**
+ * A Bean class to hold the connection parameters.
+ * It is used to make connections persistent.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionParameter
+{
+
+ /**
+ * Enum for the used encryption method.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ public enum EncryptionMethod
+ {
+
+ /** No encryption. */
+ NONE,
+
+ /** SSL encryption. */
+ LDAPS,
+
+ /** Encryption using Start TLS extension. */
+ START_TLS
+ }
+
+ /**
+ * Enum for the used authentication method.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ public enum AuthenticationMethod
+ {
+
+ /** No authentication, anonymous bind. */
+ NONE,
+
+ /** Simple authentication, simple bind. */
+ SIMPLE,
+
+ /** SASL authentication using DIGEST-MD5. */
+ SASL_DIGEST_MD5,
+
+ /** SASL authentication using CRAM-MD5. */
+ SASL_CRAM_MD5,
+
+ /** SASL authentication using GSSAPI. */
+ SASL_GSSAPI
+
+ }
+
+ /** The unique id. */
+ private String id;
+
+ /** The symbolic name. */
+ private String name;
+
+ /** The host name or IP address of the LDAP server. */
+ private String host;
+
+ /** The port of the LDAP server. */
+ private int port;
+
+ /** The encryption method. */
+ private EncryptionMethod encryptionMethod;
+
+ /** The authentication method. */
+ private AuthenticationMethod authMethod;
+
+ /** The bind principal, typically a DN. */
+ private String bindPrincipal;
+
+ /** The bind password. */
+ private String bindPassword;
+
+ /** The extended properties. */
+ private Map<String, String> extendedProperties;
+
+
+
+ /**
+ * Creates a new instance of ConnectionParameter.
+ */
+ public ConnectionParameter()
+ {
+ this.extendedProperties = new HashMap<String, String>();
+ }
+
+
+ /**
+ * Creates a new instance of ConnectionParameter.
+ *
+ * @param name the connection name
+ * @param host the host
+ * @param port the port
+ * @param encryptionMethod the encryption method
+ * @param authMethod the authentication method
+ * @param bindPrincipal the bind principal
+ * @param bindPassword the bind password
+ * @param extendedProperties the extended properties
+ */
+ public ConnectionParameter( String name, String host, int port, EncryptionMethod encryptionMethod,
+ AuthenticationMethod authMethod, String bindPrincipal, String bindPassword,
+ Map<String, String> extendedProperties )
+ {
+ this.id = createId();
+ this.name = name;
+ this.host = host;
+ this.port = port;
+ this.encryptionMethod = encryptionMethod;
+ this.authMethod = authMethod;
+ this.bindPrincipal = bindPrincipal;
+ this.bindPassword = bindPassword;
+ this.extendedProperties = new HashMap<String, String>();
+ if ( extendedProperties != null )
+ {
+ this.extendedProperties.putAll( extendedProperties );
+ }
+ }
+
+
+ /**
+ * Gets the auth method.
+ *
+ * @return the auth method
+ */
+ public AuthenticationMethod getAuthMethod()
+ {
+ return authMethod;
+ }
+
+
+ /**
+ * Sets the auth method.
+ *
+ * @param authMethod the auth method
+ */
+ public void setAuthMethod( AuthenticationMethod authMethod )
+ {
+ this.authMethod = authMethod;
+ }
+
+
+ /**
+ * Gets the bind password.
+ *
+ * @return the bind password
+ */
+ public String getBindPassword()
+ {
+ return bindPassword;
+ }
+
+
+ /**
+ * Sets the bind password.
+ *
+ * @param bindPassword the bind password
+ */
+ public void setBindPassword( String bindPassword )
+ {
+ this.bindPassword = bindPassword;
+ }
+
+
+ /**
+ * Gets the bind principal.
+ *
+ * @return the bind principal
+ */
+ public String getBindPrincipal()
+ {
+ return bindPrincipal;
+ }
+
+
+ /**
+ * Sets the bind principal.
+ *
+ * @param bindPrincipal the bind principal
+ */
+ public void setBindPrincipal( String bindPrincipal )
+ {
+ this.bindPrincipal = bindPrincipal;
+ }
+
+
+ /**
+ * Gets the encryption method.
+ *
+ * @return the encryption method
+ */
+ public EncryptionMethod getEncryptionMethod()
+ {
+ return encryptionMethod;
+ }
+
+
+ /**
+ * Sets the encryption method.
+ *
+ * @param encryptionMethod the encryption method
+ */
+ public void setEncryptionMethod( EncryptionMethod encryptionMethod )
+ {
+ this.encryptionMethod = encryptionMethod;
+ }
+
+
+ /**
+ * Gets the id.
+ *
+ * @return the id
+ */
+ public String getId()
+ {
+ if ( id == null )
+ {
+ id = createId();
+ }
+ return id;
+ }
+
+
+ /**
+ * Sets the id.
+ *
+ * @param id the id
+ */
+ public void setId( String id )
+ {
+ this.id = id;
+ }
+
+
+ /**
+ * Gets the host.
+ *
+ * @return the host
+ */
+ public String getHost()
+ {
+ return host;
+ }
+
+
+ /**
+ * Sets the host.
+ *
+ * @param host the host
+ */
+ public void setHost( String host )
+ {
+ this.host = host;
+ }
+
+
+ /**
+ * Gets the name.
+ *
+ * @return the name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+
+ /**
+ * Sets the name.
+ *
+ * @param name the name
+ */
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+
+ /**
+ * Gets the port.
+ *
+ * @return the port
+ */
+ public int getPort()
+ {
+ return port;
+ }
+
+
+ /**
+ * Sets the port.
+ *
+ * @param port the port
+ */
+ public void setPort( int port )
+ {
+ this.port = port;
+ }
+
+
+ /**
+ * Gets the extended properties.
+ *
+ * @return the extended properties
+ */
+ public Map<String, String> getExtendedProperties()
+ {
+ return extendedProperties;
+ }
+
+
+ /**
+ * Sets the extended properties.
+ *
+ * @param extendedProperties the extended properties
+ */
+ public void setExtendedProperties( Map<String, String> extendedProperties )
+ {
+ this.extendedProperties = extendedProperties;
+ }
+
+
+ /**
+ * Sets the extended property.
+ *
+ * @param key the key
+ * @param value the value
+ */
+ public void setExtendedProperty( String key, String value )
+ {
+ extendedProperties.put( key, value );
+ }
+
+
+ /**
+ * Gets the extended property.
+ *
+ * @param key the key
+ *
+ * @return the extended property or null if the property doesn't exist
+ */
+ public String getExtendedProperty( String key )
+ {
+ return extendedProperties.get( key );
+ }
+
+
+ /**
+ * Sets the extended int property.
+ *
+ * @param key the key
+ * @param value the value
+ */
+ public void setExtendedIntProperty( String key, int value )
+ {
+ extendedProperties.put( key, new Integer( value ).toString() );
+ }
+
+
+ /**
+ * Gets the extended int property.
+ *
+ * @param key the key
+ *
+ * @return the extended int property or -1 if the property doesn't exist
+ */
+ public int getExtendedIntProperty( String key )
+ {
+ String s = extendedProperties.get( key );
+ if ( s != null )
+ {
+ return new Integer( s ).intValue();
+ }
+ else
+ {
+ return -1;
+ }
+ }
+
+
+ /**
+ * Sets the extended bool property.
+ *
+ * @param key the key
+ * @param value the value
+ */
+ public void setExtendedBoolProperty( String key, boolean value )
+ {
+ extendedProperties.put( key, Boolean.valueOf( value ).toString() );
+ }
+
+
+ /**
+ * Gets the extended bool property.
+ *
+ * @param key the key
+ *
+ * @return the extended bool property or false if the property doesn'T exist
+ */
+ public boolean getExtendedBoolProperty( String key )
+ {
+ String s = extendedProperties.get( key );
+ if ( s != null )
+ {
+ return Boolean.valueOf( s ).booleanValue();
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+
+ /**
+ * Creates a unique id.
+ *
+ * @return the created id
+ */
+ private String createId()
+ {
+ long id = new Random( System.currentTimeMillis() ).nextLong();
+ return Long.valueOf( id ).toString();
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionPropertyPageProvider.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionPropertyPageProvider.java
new file mode 100644
index 0000000..22519ca
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionPropertyPageProvider.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core;
+
+
+import org.eclipse.core.runtime.IAdaptable;
+
+
+/**
+ * Tagging interface for objects that provide input for the connection
+ * property page. Implementations must also implement the IAdaptable interface
+ * and the getAdaptable() metho must return the right {@link Connection} object.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ConnectionPropertyPageProvider extends IAdaptable
+{
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Credentials.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Credentials.java
new file mode 100644
index 0000000..7392d3f
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Credentials.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core;
+
+
+/**
+ * Default implementation of ICredentials.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Credentials implements ICredentials
+{
+
+ /** The bind principal. */
+ private String bindPrincipal;
+
+ /** The bind password. */
+ private String bindPassword;
+
+ /** The connection parameter. */
+ private ConnectionParameter connectionParameter;
+
+
+ /**
+ * Creates a new instance of Credentials.
+ *
+ * @param bindPrincipal the bind principal, typically a DN
+ * @param bindPassword the bind password
+ * @param connectionParameter the connection parameter
+ */
+ public Credentials( String bindPrincipal, String bindPassword, ConnectionParameter connectionParameter )
+ {
+ this.bindPrincipal = bindPrincipal;
+ this.bindPassword = bindPassword;
+ this.connectionParameter = connectionParameter;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public ConnectionParameter getConnectionParameter()
+ {
+ return connectionParameter;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getBindPrincipal()
+ {
+ return bindPrincipal;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getBindPassword()
+ {
+ return bindPassword;
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/IAuthHandler.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/IAuthHandler.java
new file mode 100644
index 0000000..a338351
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/IAuthHandler.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core;
+
+
+/**
+ * Callback interface to request credentials from a
+ * higher-level layer (from the UI plugin).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface IAuthHandler
+{
+
+ /**
+ * Gets credentials from this authentication handler.
+ * The credentials are used to bind to the given connection.
+ * The authentication handler may display a dialog to the user.
+ *
+ * @param connectionParameter the connection to bind to
+ * @return the credentials
+ */
+ public ICredentials getCredentials( ConnectionParameter connectionParameter );
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ICredentials.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ICredentials.java
new file mode 100644
index 0000000..22c5341
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ICredentials.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core;
+
+
+/**
+ * An ICredential holds authentication information for a connection.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ICredentials
+{
+
+ /**
+ * Gets the connection parameter.
+ *
+ * @return the connection parameter
+ */
+ public ConnectionParameter getConnectionParameter();
+
+
+ /**
+ * Gets the bind principal, typically a DN.
+ *
+ * @return the bind principal
+ */
+ public String getBindPrincipal();
+
+
+ /**
+ * Gets the bind password.
+ *
+ * @return the bind password
+ */
+ public String getBindPassword();
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Messages.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Messages.java
new file mode 100644
index 0000000..197b52c
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Messages.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core;
+
+
+import org.eclipse.osgi.util.NLS;
+
+
+/**
+ * This class contains most of the Strings used by the Plugin
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Messages extends NLS
+{
+ private static final String BUNDLE_NAME = "org.apache.directory.studio.connection.core.messages"; //$NON-NLS-1$
+
+
+ /**
+ * Creates a new instance of Messages.
+ */
+ private Messages()
+ {
+ }
+
+ static
+ {
+ // initialize resource bundle
+ NLS.initializeMessages( BUNDLE_NAME, Messages.class );
+ }
+
+ public static String copy_n_of_s;
+
+ public static String model__no_auth_handler;
+ public static String model__no_credentials;
+
+ public static String jobs__error_occurred;
+ public static String jobs__progressmonitor_check_cancellation;
+ public static String jobs__progressmonitor_report_progress;
+
+ public static String jobs__check_bind_name;
+ public static String jobs__check_bind_task;
+ public static String jobs__check_bind_error;
+ public static String jobs__check_network_name;
+ public static String jobs__check_network_task;
+ public static String jobs__check_network_error;
+
+ public static String jobs__open_connections_name_1;
+ public static String jobs__open_connections_name_n;
+ public static String jobs__open_connections_task;
+ public static String jobs__open_connections_error_1;
+ public static String jobs__open_connections_error_n;
+
+ public static String jobs__close_connections_name_1;
+ public static String jobs__close_connections_name_n;
+ public static String jobs__close_connections_task;
+ public static String jobs__close_connections_error_1;
+ public static String jobs__close_connections_error_n;
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/StudioProgressMonitor.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/StudioProgressMonitor.java
new file mode 100644
index 0000000..6bcb311
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/StudioProgressMonitor.java
@@ -0,0 +1,385 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core;
+
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.ProgressMonitorWrapper;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+
+
+/**
+ * The StudioProgressMonitor extends the the Eclipse
+ * Progress Monitor with active cancellation capabilities.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class StudioProgressMonitor extends ProgressMonitorWrapper
+{
+
+ private boolean done;
+
+ private List<Status> errorStatusList;
+
+ private List<CancelListener> cancelListenerList;
+
+ private Job checkCanceledJob;
+
+ private Job reportProgressJob = null;
+
+ private String reportProgressMessage = null;
+
+
+ /**
+ * Creates a new instance of ExtendedProgressMonitor.
+ *
+ * @param monitor the progress monitor to forward to
+ */
+ public StudioProgressMonitor( IProgressMonitor monitor )
+ {
+ super( monitor );
+ this.done = false;
+
+ this.checkCanceledJob = new Job( Messages.jobs__progressmonitor_check_cancellation )
+ {
+ protected IStatus run( IProgressMonitor monitor )
+ {
+ while ( !done )
+ {
+ if ( isCanceled() )
+ {
+ fireCancelRequested();
+ break;
+ }
+ else
+ {
+ try
+ {
+ Thread.sleep( 1000 );
+ }
+ catch ( InterruptedException e )
+ {
+ }
+ }
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ this.checkCanceledJob.setSystem( true );
+ this.checkCanceledJob.schedule();
+ }
+
+
+ /**
+ * @see org.eclipse.core.runtime.ProgressMonitorWrapper#setCanceled(boolean)
+ */
+ public void setCanceled( boolean b )
+ {
+ super.setCanceled( b );
+ if ( b )
+ {
+ fireCancelRequested();
+ }
+ }
+
+
+ /**
+ * @see org.eclipse.core.runtime.ProgressMonitorWrapper#done()
+ */
+ public void done()
+ {
+ synchronized ( this )
+ {
+ done = true;
+ super.done();
+ }
+ }
+
+
+ /**
+ * Adds the cancel listener.
+ *
+ * @param listener the listener
+ */
+ public void addCancelListener( CancelListener listener )
+ {
+ if ( cancelListenerList == null )
+ {
+ cancelListenerList = new ArrayList<CancelListener>();
+ }
+ if ( !cancelListenerList.contains( listener ) )
+ {
+ cancelListenerList.add( listener );
+ }
+ }
+
+
+ /**
+ * Removes the cancel listener.
+ *
+ * @param listener the listener
+ */
+ public void removeCancelListener( CancelListener listener )
+ {
+ if ( cancelListenerList != null && cancelListenerList.contains( listener ) )
+ {
+ cancelListenerList.remove( listener );
+ }
+ }
+
+
+ private void fireCancelRequested()
+ {
+ CancelEvent event = new CancelEvent( this );
+ if ( cancelListenerList != null )
+ {
+ for ( int i = 0; i < cancelListenerList.size(); i++ )
+ {
+ CancelListener listener = cancelListenerList.get( i );
+ listener.cancelRequested( event );
+ }
+ }
+ }
+
+
+ /**
+ * Report progress.
+ *
+ * @param message the message
+ */
+ public void reportProgress( String message )
+ {
+ synchronized ( this )
+ {
+ if ( !done )
+ {
+ if ( reportProgressJob == null )
+ {
+ reportProgressJob = new Job( Messages.jobs__progressmonitor_report_progress )
+ {
+ protected IStatus run( IProgressMonitor monitor )
+ {
+ synchronized ( StudioProgressMonitor.this )
+ {
+ if ( !done )
+ {
+ subTask( reportProgressMessage );
+ }
+ return Status.OK_STATUS;
+ }
+ }
+ };
+ reportProgressJob.setSystem( true );
+ }
+
+ reportProgressMessage = message;
+ reportProgressJob.schedule( 1000 );
+ }
+ }
+ }
+
+
+ /**
+ * Report error.
+ *
+ * @param message the message
+ */
+ public void reportError( String message )
+ {
+ this.reportError( message, null );
+ }
+
+
+ /**
+ * Report error.
+ *
+ * @param throwable the throwable
+ */
+ public void reportError( Throwable throwable )
+ {
+ reportError( throwable.getMessage() != null ? throwable.getMessage() : throwable.toString(), throwable );
+ }
+
+
+ /**
+ * Report error.
+ *
+ * @param exception the exception
+ * @param message the message
+ */
+ public void reportError( String message, Throwable exception )
+ {
+ if ( errorStatusList == null )
+ {
+ errorStatusList = new ArrayList<Status>( 3 );
+ }
+
+ do
+ {
+ if ( message == null )
+ {
+ message = ""; //$NON-NLS-1$
+ }
+
+ Status errorStatus = new Status( IStatus.ERROR, ConnectionCorePlugin.PLUGIN_ID, IStatus.ERROR, message,
+ exception );
+ errorStatusList.add( errorStatus );
+
+ if ( exception != null )
+ {
+ exception = exception.getCause();
+ }
+ if ( exception != null )
+ {
+ message = exception.getMessage();
+ }
+ }
+ while ( exception != null );
+ }
+
+
+ /**
+ * Errors reported.
+ *
+ * @return true, if errors reported
+ */
+ public boolean errorsReported()
+ {
+ return errorStatusList != null;
+ }
+
+
+ /**
+ * Gets the error status.
+ *
+ * @param message the message
+ *
+ * @return the error status
+ */
+ public IStatus getErrorStatus( String message )
+ {
+ if ( errorStatusList != null && !errorStatusList.isEmpty() )
+ {
+ Throwable exception = null;
+ for ( Iterator<Status> it = errorStatusList.iterator(); it.hasNext(); )
+ {
+ Status status = it.next();
+ if ( status.getException() != null )
+ {
+ exception = status.getException();
+ break;
+ }
+ }
+
+ MultiStatus multiStatus = new MultiStatus( ConnectionCorePlugin.PLUGIN_ID, IStatus.ERROR, message,
+ exception );
+
+ for ( Iterator<Status> it = errorStatusList.iterator(); it.hasNext(); )
+ {
+ Status status = it.next();
+ multiStatus.add( new Status( status.getSeverity(), status.getPlugin(), status.getCode(), status
+ .getMessage(), null ) );
+ }
+
+ return multiStatus;
+
+ }
+ else
+ {
+ return Status.OK_STATUS;
+ }
+ }
+
+
+ /**
+ * Gets the exception.
+ *
+ * @return the exception
+ */
+ public Throwable getException()
+ {
+
+ if ( errorStatusList != null )
+ {
+ return errorStatusList.get( 0 ).getException();
+ }
+ return null;
+ }
+
+ /**
+ * CancelEvent.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ public static class CancelEvent
+ {
+ private IProgressMonitor monitor;
+
+
+ /**
+ * Creates a new instance of CancelEvent.
+ *
+ * @param monitor the progress monitor
+ */
+ public CancelEvent( IProgressMonitor monitor )
+ {
+ this.monitor = monitor;
+ }
+
+
+ /**
+ * Gets the monitor.
+ *
+ * @return the progress monitor
+ */
+ public IProgressMonitor getMonitor()
+ {
+ return monitor;
+ }
+ }
+
+ /**
+ * CancelListener.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ public interface CancelListener
+ {
+
+ /**
+ * Cancel requested.
+ *
+ * @param event the event
+ */
+ public void cancelRequested( CancelEvent event );
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
new file mode 100644
index 0000000..643452c
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core;
+
+
+/**
+ * Some utils.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Utils
+{
+
+ /**
+ * Shortens the given label to the given maximum length.
+ *
+ * @param label the label
+ * @param maxLength the max length
+ *
+ * @return the shortened label
+ */
+ public static String shorten( String label, int maxLength )
+ {
+ if ( label == null )
+ {
+ return null;
+ }
+ if ( maxLength < 3 )
+ {
+ return "...";
+ }
+ if ( label.length() > maxLength )
+ {
+ label = label.substring( 0, maxLength / 2 ) + "..."
+ + label.substring( label.length() - maxLength / 2, label.length() );
+
+ }
+ StringBuffer sb = new StringBuffer( maxLength + 3 );
+ for ( int i = 0; i < label.length(); i++ )
+ {
+ char c = label.charAt( i );
+ if ( c > 31 && c < 127 )
+ sb.append( c );
+ else
+ sb.append( '.' );
+ }
+ return sb.toString();
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/ConnectionEventRegistry.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/ConnectionEventRegistry.java
new file mode 100644
index 0000000..ca5f4fc
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/ConnectionEventRegistry.java
@@ -0,0 +1,298 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core.event;
+
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.directory.studio.connection.core.Connection;
+
+
+/**
+ * The ConnectionEventRegistry is a central point to register for connection specific
+ * events and to fire events to registered listeners.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionEventRegistry
+{
+
+ /** The list of threads with suspended event fireing. */
+ private static Set<Thread> suspendedEventFireringThreads = new HashSet<Thread>();;
+
+ /** The lock used to synchronize event fireings */
+ private static Object lock = new Object();
+
+
+ /**
+ * Checks if event fireing is suspended in the current thread.
+ *
+ * @return true, if event fireing is suspended in the current thread
+ */
+ public static boolean isEventFireingSuspendedInCurrentThread()
+ {
+ return suspendedEventFireringThreads.contains( Thread.currentThread() );
+ }
+
+
+ /**
+ * Resumes event fireing in the current thread.
+ */
+ public static void resumeEventFireingInCurrentThread()
+ {
+ suspendedEventFireringThreads.remove( Thread.currentThread() );
+ }
+
+
+ /**
+ * Suspends event fireing in the current thread.
+ */
+ public static void suspendEventFireingInCurrentThread()
+ {
+ suspendedEventFireringThreads.add( Thread.currentThread() );
+ }
+
+ /** The map with connection update listeners and their runners */
+ private static Map<ConnectionUpdateListener, EventRunner> connectionUpdateListeners = new HashMap<ConnectionUpdateListener, EventRunner>();
+
+
+ /**
+ * Adds the connection update listener.
+ *
+ * @param listener the listener
+ * @param runner the runner
+ */
+ public static void addConnectionUpdateListener( ConnectionUpdateListener listener, EventRunner runner )
+ {
+ assert listener != null;
+ assert runner != null;
+
+ if ( !connectionUpdateListeners.containsKey( listener ) )
+ {
+ connectionUpdateListeners.put( listener, runner );
+ }
+ }
+
+
+ /**
+ * Removes the connection update listener.
+ *
+ * @param listener the listener
+ */
+ public static void removeConnectionUpdateListener( ConnectionUpdateListener listener )
+ {
+ if ( connectionUpdateListeners.containsKey( listener ) )
+ {
+ connectionUpdateListeners.remove( listener );
+ }
+ }
+
+
+ /**
+ * Notifies each {@link ConnectionUpdateListener} about the opened connection.
+ * Uses the {@link EventRunner}s.
+ *
+ * @param connection the opened connection
+ * @param source the source
+ */
+ public static void fireConnectionOpened( final Connection connection, final Object source )
+ {
+ if ( isEventFireingSuspendedInCurrentThread() )
+ {
+ return;
+ }
+
+ Map<ConnectionUpdateListener, EventRunner> listeners = new HashMap<ConnectionUpdateListener, EventRunner>(
+ connectionUpdateListeners );
+ Iterator<ConnectionUpdateListener> it = listeners.keySet().iterator();
+ while ( it.hasNext() )
+ {
+ final ConnectionUpdateListener listener = it.next();
+ EventRunnable runnable = new EventRunnable()
+ {
+ public void run()
+ {
+ listener.connectionOpened( connection );
+ }
+ };
+
+ EventRunner runner = listeners.get( listener );
+ synchronized ( lock )
+ {
+ runner.execute( runnable );
+ }
+ }
+ }
+
+
+ /**
+ * Notifies each {@link ConnectionUpdateListener} about the closed connection.
+ * Uses the {@link EventRunner}s.
+ *
+ * @param connection the closed connection
+ * @param source the source
+ */
+ public static void fireConnectionClosed( final Connection connection, final Object source )
+ {
+ if ( isEventFireingSuspendedInCurrentThread() )
+ {
+ return;
+ }
+
+ Map<ConnectionUpdateListener, EventRunner> listeners = new HashMap<ConnectionUpdateListener, EventRunner>(
+ connectionUpdateListeners );
+ Iterator<ConnectionUpdateListener> it = listeners.keySet().iterator();
+ while ( it.hasNext() )
+ {
+ final ConnectionUpdateListener listener = it.next();
+ EventRunnable runnable = new EventRunnable()
+ {
+ public void run()
+ {
+ listener.connectionClosed( connection );
+ }
+ };
+
+ EventRunner runner = listeners.get( listener );
+ synchronized ( lock )
+ {
+ runner.execute( runnable );
+ }
+ }
+ }
+
+
+ /**
+ * Notifies each {@link ConnectionUpdateListener} about the updated connection.
+ * Uses the {@link EventRunner}s.
+ *
+ * @param connection the updated connection
+ * @param source the source
+ */
+ public static void fireConnectionUpdated( final Connection connection, final Object source )
+ {
+ if ( isEventFireingSuspendedInCurrentThread() )
+ {
+ return;
+ }
+
+ Map<ConnectionUpdateListener, EventRunner> listeners = new HashMap<ConnectionUpdateListener, EventRunner>(
+ connectionUpdateListeners );
+ Iterator<ConnectionUpdateListener> it = listeners.keySet().iterator();
+ while ( it.hasNext() )
+ {
+ final ConnectionUpdateListener listener = it.next();
+ EventRunnable runnable = new EventRunnable()
+ {
+ public void run()
+ {
+ listener.connectionUpdated( connection );
+ }
+ };
+
+ EventRunner runner = listeners.get( listener );
+ synchronized ( lock )
+ {
+ runner.execute( runnable );
+ }
+ }
+ }
+
+
+ /**
+ * Notifies each {@link ConnectionUpdateListener} about the added connection.
+ * Uses the {@link EventRunner}s.
+ *
+ * @param connection the added connection
+ * @param source the source
+ */
+ public static void fireConnectionAdded( final Connection connection, final Object source )
+ {
+ if ( isEventFireingSuspendedInCurrentThread() )
+ {
+ return;
+ }
+
+ Map<ConnectionUpdateListener, EventRunner> listeners = new HashMap<ConnectionUpdateListener, EventRunner>(
+ connectionUpdateListeners );
+ Iterator<ConnectionUpdateListener> it = listeners.keySet().iterator();
+ while ( it.hasNext() )
+ {
+ final ConnectionUpdateListener listener = it.next();
+ EventRunnable runnable = new EventRunnable()
+ {
+ public void run()
+ {
+ listener.connectionAdded( connection );
+ }
+ };
+
+ EventRunner runner = listeners.get( listener );
+ synchronized ( lock )
+ {
+ runner.execute( runnable );
+ }
+ }
+ }
+
+
+ /**
+ * Notifies each {@link ConnectionUpdateListener} about the removed connection.
+ * Uses the {@link EventRunner}s.
+ *
+ * @param connection the removed connection
+ * @param source the source
+ */
+ public static void fireConnectionRemoved( final Connection connection, final Object source )
+ {
+ if ( isEventFireingSuspendedInCurrentThread() )
+ {
+ return;
+ }
+
+ Map<ConnectionUpdateListener, EventRunner> listeners = new HashMap<ConnectionUpdateListener, EventRunner>(
+ connectionUpdateListeners );
+ Iterator<ConnectionUpdateListener> it = listeners.keySet().iterator();
+ while ( it.hasNext() )
+ {
+ final ConnectionUpdateListener listener = it.next();
+ EventRunnable runnable = new EventRunnable()
+ {
+ public void run()
+ {
+ listener.connectionRemoved( connection );
+ }
+ };
+
+ EventRunner runner = listeners.get( listener );
+ synchronized ( lock )
+ {
+ runner.execute( runnable );
+ }
+ }
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/ConnectionUpdateListener.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/ConnectionUpdateListener.java
new file mode 100644
index 0000000..df03ccc
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/ConnectionUpdateListener.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core.event;
+
+
+import java.util.EventListener;
+
+import org.apache.directory.studio.connection.core.Connection;
+
+
+/**
+ * A listener for connection updates
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ConnectionUpdateListener extends EventListener
+{
+
+ /**
+ * Called when an {@link Connection} was opened.
+ *
+ * @param connection the opened connection
+ */
+ public void connectionOpened( Connection connection );
+
+
+ /**
+ * Called when an {@link Connection} was closed.
+ *
+ * @param connection the closed connection
+ */
+ public void connectionClosed( Connection connection );
+
+
+ /**
+ * Called when an {@link Connection} was added.
+ *
+ * @param connection the added connection
+ */
+ public void connectionAdded( Connection connection );
+
+
+ /**
+ * Called when an {@link Connection} was removed.
+ *
+ * @param connection the removed connection
+ */
+ public void connectionRemoved( Connection connection );
+
+
+ /**
+ * Called when {@link Connection} parameters were updated.
+ *
+ * @param connection the updated connection
+ */
+ public void connectionUpdated( Connection connection );
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/CoreEventRunner.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/CoreEventRunner.java
new file mode 100644
index 0000000..48028e2
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/CoreEventRunner.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.connection.core.event;
+
+
+/**
+ * Default implementation of {@link EventRunner} that executes an {@link EventRunnable}
+ * withing the current thread.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CoreEventRunner implements EventRunner
+{
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation executes the given {@link EventRunnable} within
+ * the current thread.
+ */
+ public void execute( EventRunnable runnable )
+ {
+ runnable.run();
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/EventRunnable.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/EventRunnable.java
new file mode 100644
index 0000000..de81521
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/EventRunnable.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core.event;
+
+
+/**
+ * The <code>EventRunnable</code> interface should be implemented by any
+ * class whose instances are intended to be executed by an {@link EventRunner}.
+ * The class must define a method of no arguments called <code>run</code>.
+ * <p>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface EventRunnable extends Runnable
+{
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/EventRunner.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/EventRunner.java
new file mode 100644
index 0000000..2b5484b
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/event/EventRunner.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.connection.core.event;
+
+
+/**
+ * An EventRunner is used to execute an {@link EventRunnable}.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface EventRunner
+{
+
+ /**
+ * Executes the given {@link EventRunnable}.
+ *
+ * @param runnable the event runnable to run
+ */
+ public void execute( EventRunnable runnable );
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java
new file mode 100644
index 0000000..ed573ed
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIO.java
@@ -0,0 +1,362 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.connection.core.io;
+
+
+import java.io.BufferedWriter;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.ConnectionParameter;
+import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
+import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
+import org.dom4j.Attribute;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.io.DocumentResult;
+import org.dom4j.io.DocumentSource;
+import org.dom4j.io.SAXReader;
+
+
+/**
+ * This class is used to read/write the 'connections.xml' file.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionIO
+{
+ // XML tags
+ private static final String CONNECTIONS_TAG = "connections";
+ private static final String CONNECTION_TAG = "connection";
+ private static final String ID_TAG = "id";
+ private static final String NAME_TAG = "name";
+ private static final String HOST_TAG = "host";
+ private static final String PORT_TAG = "port";
+ private static final String ENCRYPTION_METHOD_TAG = "encryptionMethod";
+ private static final String AUTH_METHOD_TAG = "authMethod";
+ private static final String BIND_PRINCIPAL_TAG = "bindPrincipal";
+ private static final String BIND_PASSWORD_TAG = "bindPassword";
+ private static final String EXTENDED_PROPERTIES_TAG = "extendedProperties";
+ private static final String EXTENDED_PROPERTY_TAG = "extendedProperty";
+ private static final String KEY_TAG = "key";
+ private static final String VALUE_TAG = "value";
+
+
+ /**
+ * Loads the connections using the reader
+ *
+ * @param reader
+ * the reader
+ * @return
+ * the connections
+ * @throws ConnectionIOException
+ * if an error occurs when converting the document
+ */
+ public static List<ConnectionParameter> load( FileReader reader ) throws ConnectionIOException
+ {
+ List<ConnectionParameter> connections = new ArrayList<ConnectionParameter>();
+
+ SAXReader saxReader = new SAXReader();
+ Document document = null;
+
+ try
+ {
+ document = saxReader.read( reader );
+ }
+ catch ( DocumentException e )
+ {
+ throw new ConnectionIOException( e.getMessage() );
+ }
+
+ Element rootElement = document.getRootElement();
+ if ( !rootElement.getName().equals( CONNECTIONS_TAG ) )
+ {
+ throw new ConnectionIOException( "The file does not seem to be a valid Connections file." );
+ }
+
+ for ( Iterator<?> i = rootElement.elementIterator( CONNECTION_TAG ); i.hasNext(); )
+ {
+ Element connectionElement = ( Element ) i.next();
+ connections.add( readConnection( connectionElement ) );
+ }
+
+ return connections;
+ }
+
+
+ /**
+ * Reads a connection from the given Element.
+ *
+ * @param element
+ * the element
+ * @return
+ * the corresponding connection
+ * @throws ConnectionIOException
+ * if an error occurs when converting values
+ */
+ private static ConnectionParameter readConnection( Element element ) throws ConnectionIOException
+ {
+ ConnectionParameter connection = new ConnectionParameter();
+
+ // ID
+ Attribute idAttribute = element.attribute( ID_TAG );
+ if ( idAttribute != null )
+ {
+ connection.setId( idAttribute.getValue() );
+ }
+
+ // Name
+ Attribute nameAttribute = element.attribute( NAME_TAG );
+ if ( nameAttribute != null )
+ {
+ connection.setName( nameAttribute.getValue() );
+ }
+
+ // Host
+ Attribute hostAttribute = element.attribute( HOST_TAG );
+ if ( hostAttribute != null )
+ {
+ connection.setHost( hostAttribute.getValue() );
+ }
+
+ // Port
+ Attribute portAttribute = element.attribute( PORT_TAG );
+ if ( portAttribute != null )
+ {
+ try
+ {
+ connection.setPort( Integer.parseInt( portAttribute.getValue() ) );
+ }
+ catch ( NumberFormatException e )
+ {
+ throw new ConnectionIOException( "Unable to parse 'Port' of connection '" + connection.getName()
+ + "' as int value. Port value :" + portAttribute.getValue() );
+ }
+ }
+
+ // Encryption Method
+ Attribute encryptionMethodAttribute = element.attribute( ENCRYPTION_METHOD_TAG );
+ if ( encryptionMethodAttribute != null )
+ {
+ try
+ {
+ connection.setEncryptionMethod( EncryptionMethod.valueOf( encryptionMethodAttribute.getValue() ) );
+ }
+ catch ( IllegalArgumentException e )
+ {
+ throw new ConnectionIOException( "Unable to parse 'Encryption Method' of connection '"
+ + connection.getName() + "' as int value. Encryption Method value :"
+ + encryptionMethodAttribute.getValue() );
+ }
+ }
+
+ // Auth Method
+ Attribute authMethodAttribute = element.attribute( AUTH_METHOD_TAG );
+ if ( authMethodAttribute != null )
+ {
+ try
+ {
+ connection.setAuthMethod( AuthenticationMethod.valueOf( authMethodAttribute.getValue() ) );
+ }
+ catch ( IllegalArgumentException e )
+ {
+ throw new ConnectionIOException( "Unable to parse 'Authentication Method' of connection '"
+ + connection.getName() + "' as int value. Authentication Method value :"
+ + authMethodAttribute.getValue() );
+ }
+ }
+
+ // Bind Principal
+ Attribute bindPrincipalAttribute = element.attribute( BIND_PRINCIPAL_TAG );
+ if ( bindPrincipalAttribute != null )
+ {
+ connection.setBindPrincipal( bindPrincipalAttribute.getValue() );
+ }
+
+ // Bind Password
+ Attribute bindPasswordAttribute = element.attribute( BIND_PASSWORD_TAG );
+ if ( bindPasswordAttribute != null )
+ {
+ connection.setBindPassword( bindPasswordAttribute.getValue() );
+ }
+
+ // Extended Properties
+ Element extendedPropertiesElement = element.element( EXTENDED_PROPERTIES_TAG );
+ if ( extendedPropertiesElement != null )
+ {
+ for ( Iterator<?> i = extendedPropertiesElement.elementIterator( EXTENDED_PROPERTY_TAG ); i.hasNext(); )
+ {
+ Element extendedPropertyElement = ( Element ) i.next();
+
+ Attribute keyAttribute = extendedPropertyElement.attribute( KEY_TAG );
+ Attribute valueAttribute = extendedPropertyElement.attribute( VALUE_TAG );
+
+ if ( keyAttribute != null && valueAttribute != null )
+ {
+ connection.setExtendedProperty( keyAttribute.getValue(), valueAttribute.getValue() );
+ }
+ }
+ }
+
+ return connection;
+ }
+
+
+ /**
+ * Saves the connections using the writer.
+ *
+ * @param connections
+ * the connections
+ * @param writer
+ * the writer
+ * @throws IOException
+ * if an I/O error occurs
+ */
+ public static void save( List<ConnectionParameter> connections, FileWriter writer ) throws IOException
+ {
+ // Creating the Document
+ Document document = DocumentHelper.createDocument();
+
+ // Creating the root element
+ Element root = document.addElement( CONNECTIONS_TAG );
+
+ if ( connections != null )
+ {
+ for ( ConnectionParameter connection : connections )
+ {
+ addConnection( root, connection );
+ }
+ }
+
+ // Writing the file to disk
+ BufferedWriter buffWriter = new BufferedWriter( writer );
+ buffWriter.write( styleDocument( document ).asXML() );
+ buffWriter.close();
+ }
+
+
+ /**
+ * Adds the given connection to the given parent Element.
+ *
+ * @param parent
+ * the parent Element
+ * @param connection
+ * the connection
+ */
+ private static void addConnection( Element parent, ConnectionParameter connection )
+ {
+ Element connectionElement = parent.addElement( CONNECTION_TAG );
+
+ // ID
+ connectionElement.addAttribute( ID_TAG, connection.getId() );
+
+ // Name
+ connectionElement.addAttribute( NAME_TAG, connection.getName() );
+
+ // Host
+ connectionElement.addAttribute( HOST_TAG, connection.getHost() );
+
+ // Port
+ connectionElement.addAttribute( PORT_TAG, "" + connection.getPort() );
+
+ // Encryption Method
+ connectionElement.addAttribute( ENCRYPTION_METHOD_TAG, connection.getEncryptionMethod().toString() );
+
+ // Auth Method
+ connectionElement.addAttribute( AUTH_METHOD_TAG, connection.getAuthMethod().toString() );
+
+ // Bind Principal
+ connectionElement.addAttribute( BIND_PRINCIPAL_TAG, connection.getBindPrincipal() );
+
+ // Bind Password
+ connectionElement.addAttribute( BIND_PASSWORD_TAG, connection.getBindPassword() );
+
+ // Extended Properties
+ Element extendedPropertiesElement = connectionElement.addElement( EXTENDED_PROPERTIES_TAG );
+ Map<String, String> extendedProperties = connection.getExtendedProperties();
+ if ( extendedProperties != null )
+ {
+ for ( Iterator<Entry<String, String>> iter = extendedProperties.entrySet().iterator(); iter.hasNext(); )
+ {
+ Map.Entry<String, String> element = ( Map.Entry<String, String> ) iter.next();
+
+ Element extendedPropertyElement = extendedPropertiesElement.addElement( EXTENDED_PROPERTY_TAG );
+ extendedPropertyElement.addAttribute( KEY_TAG, element.getKey() );
+ extendedPropertyElement.addAttribute( VALUE_TAG, element.getValue() );
+ }
+ }
+ }
+
+
+ /**
+ * XML Pretty Printer XSLT Transformation
+ *
+ * @param document
+ * the Dom4j Document
+ * @return
+ */
+ private static Document styleDocument( Document document )
+ {
+ // load the transformer using JAXP
+ TransformerFactory factory = TransformerFactory.newInstance();
+ Transformer transformer = null;
+ try
+ {
+ transformer = factory.newTransformer( new StreamSource( ConnectionCorePlugin.class
+ .getResourceAsStream( "XmlFileFormat.xslt" ) ) );
+ }
+ catch ( TransformerConfigurationException e1 )
+ {
+ // Will never occur
+ }
+
+ // now lets style the given document
+ DocumentSource source = new DocumentSource( document );
+ DocumentResult result = new DocumentResult();
+ try
+ {
+ transformer.transform( source, result );
+ }
+ catch ( TransformerException e )
+ {
+ // Will never occur
+ }
+
+ // return the transformed document
+ Document transformedDoc = result.getDocument();
+ return transformedDoc;
+ }
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIOException.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIOException.java
new file mode 100644
index 0000000..e53e035
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionIOException.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.connection.core.io;
+
+
+/**
+ * This exception can be raised when loading the Connections file.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionIOException extends Exception
+{
+ private static final long serialVersionUID = 1L;
+
+
+ /**
+ * Creates a new instance of ConnectionIOException.
+ *
+ * @param message
+ * the message
+ */
+ public ConnectionIOException( String message )
+ {
+ super( message );
+ }
+}
\ No newline at end of file
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
new file mode 100644
index 0000000..4c81bf5
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.connection.core.io;
+
+
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+
+
+/**
+ * A ConnectionWrapper is a wrapper for a real directory connection implementation.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ConnectionWrapper
+{
+
+ /**
+ * Connects to the directory server.
+ *
+ * @param monitor the progres monitor
+ */
+ public void connect( StudioProgressMonitor monitor );
+
+
+ /**
+ * Disconnects from the directory server.
+ */
+ public void disconnect();
+
+
+ /**
+ * Binds to the directory server.
+ *
+ * @param monitor the progress monitor
+ */
+ public void bind( StudioProgressMonitor monitor );
+
+
+ /**
+ * Unbinds from the directory server.
+ */
+ public void unbind();
+
+
+ /**
+ * Checks if is connected.
+ *
+ * @return true, if is connected
+ */
+ public boolean isConnected();
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/CancelException.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/CancelException.java
new file mode 100644
index 0000000..36c490e
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/CancelException.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core.io.jndi;
+
+
+import javax.naming.NamingException;
+
+
+/**
+ * A specific {@link NamingException} that represents the cancellation of an request.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CancelException extends NamingException
+{
+
+ private static final long serialVersionUID = 1L;
+
+
+ /**
+ * Creates a new instance of CancelException.
+ */
+ public CancelException()
+ {
+ super();
+ }
+
+
+ /**
+ * Creates a new instance of CancelException.
+ *
+ * @param message the message
+ */
+ public CancelException( String message )
+ {
+ super( message );
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/DummySSLSocketFactory.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/DummySSLSocketFactory.java
new file mode 100644
index 0000000..78597ae
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/DummySSLSocketFactory.java
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core.io.jndi;
+
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.net.UnknownHostException;
+import java.security.SecureRandom;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSocketFactory;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+
+
+/**
+ * A SSLSocketFactory that accepts every certificat without validation.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class DummySSLSocketFactory extends SSLSocketFactory
+{
+
+ /** The delegate. */
+ private SSLSocketFactory delegate;
+
+
+ /**
+ * Creates a new instance of DummySSLSocketFactory.
+ */
+ public DummySSLSocketFactory()
+ {
+ try
+ {
+ TrustManager tm = new X509TrustManager()
+ {
+ public X509Certificate[] getAcceptedIssuers()
+ {
+ return new X509Certificate[0];
+ }
+
+
+ public void checkClientTrusted( X509Certificate[] arg0, String arg1 ) throws CertificateException
+ {
+ }
+
+
+ public void checkServerTrusted( X509Certificate[] arg0, String arg1 ) throws CertificateException
+ {
+ }
+ };
+ TrustManager[] tma =
+ { tm };
+ SSLContext sc = SSLContext.getInstance( "TLS" ); //$NON-NLS-1$
+ sc.init( null, tma, new SecureRandom() );
+ delegate = sc.getSocketFactory();
+
+ }
+ catch ( Exception e )
+ {
+ e.printStackTrace();
+ }
+ }
+
+
+ /**
+ * @see javax.net.ssl.SSLSocketFactory#getDefaultCipherSuites()
+ */
+ public String[] getDefaultCipherSuites()
+ {
+ return delegate.getDefaultCipherSuites();
+ }
+
+
+ /**
+ * @see javax.net.ssl.SSLSocketFactory#getSupportedCipherSuites()
+ */
+ public String[] getSupportedCipherSuites()
+ {
+ return delegate.getSupportedCipherSuites();
+ }
+
+
+ /**
+ * @see javax.net.ssl.SSLSocketFactory#createSocket(java.net.Socket, java.lang.String, int, boolean)
+ */
+ public Socket createSocket( Socket arg0, String arg1, int arg2, boolean arg3 ) throws IOException
+ {
+ try
+ {
+ return delegate.createSocket( arg0, arg1, arg2, arg3 );
+ }
+ catch ( IOException e )
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+
+ /**
+ * @see javax.net.SocketFactory#createSocket(java.lang.String, int)
+ */
+ public Socket createSocket( String arg0, int arg1 ) throws IOException, UnknownHostException
+ {
+ try
+ {
+ return delegate.createSocket( arg0, arg1 );
+ }
+ catch ( IOException e )
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+
+ /**
+ * @see javax.net.SocketFactory#createSocket(java.net.InetAddress, int)
+ */
+ public Socket createSocket( InetAddress arg0, int arg1 ) throws IOException
+ {
+ try
+ {
+ return delegate.createSocket( arg0, arg1 );
+ }
+ catch ( IOException e )
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+
+ /**
+ * @see javax.net.SocketFactory#createSocket(java.lang.String, int, java.net.InetAddress, int)
+ */
+ public Socket createSocket( String arg0, int arg1, InetAddress arg2, int arg3 ) throws IOException,
+ UnknownHostException
+ {
+ try
+ {
+ return delegate.createSocket( arg0, arg1, arg2, arg3 );
+ }
+ catch ( IOException e )
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+
+ /**
+ * @see javax.net.SocketFactory#createSocket(java.net.InetAddress, int, java.net.InetAddress, int)
+ */
+ public Socket createSocket( InetAddress arg0, int arg1, InetAddress arg2, int arg3 ) throws IOException
+ {
+ try
+ {
+ return delegate.createSocket( arg0, arg1, arg2, arg3 );
+ }
+ catch ( IOException e )
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
new file mode 100644
index 0000000..0bf627a
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
@@ -0,0 +1,889 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.connection.core.io.jndi;
+
+
+import java.util.Hashtable;
+
+import javax.naming.CommunicationException;
+import javax.naming.Context;
+import javax.naming.InsufficientResourcesException;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.ServiceUnavailableException;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.ModificationItem;
+import javax.naming.directory.SearchControls;
+import javax.naming.ldap.Control;
+import javax.naming.ldap.InitialLdapContext;
+import javax.naming.ldap.LdapContext;
+import javax.naming.ldap.LdapName;
+import javax.naming.ldap.StartTlsRequest;
+import javax.naming.ldap.StartTlsResponse;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.SSLSession;
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.ConnectionParameter;
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.IAuthHandler;
+import org.apache.directory.studio.connection.core.ICredentials;
+import org.apache.directory.studio.connection.core.Messages;
+import org.apache.directory.studio.connection.core.io.ConnectionWrapper;
+
+
+/**
+ * A connection wrapper that uses JNDI.
+ *
+ * - asychron + cancelable
+ * - SSL certificate
+ * - manages broken/closed connections
+ * - delete old RDN
+ * - exception handling
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class JNDIConnectionWrapper implements ConnectionWrapper
+{
+ private Connection connection;
+
+ private boolean useLdaps;
+
+ private boolean useStartTLS;
+
+ private String authMethod;
+
+ private String bindPrincipal;
+
+ private String bindCredentials;
+
+ private Hashtable<String, String> environment;
+
+ private InitialLdapContext context;
+
+ private boolean isConnected;
+
+ private Thread jobThread;
+
+
+ /**
+ * Creates a new instance of JNDIConnectionContext.
+ *
+ * @param connection the connection
+ */
+ public JNDIConnectionWrapper( Connection connection )
+ {
+ this.connection = connection;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.io.ConnectionWrapper#connect(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+ */
+ public void connect( StudioProgressMonitor monitor )
+ {
+ context = null;
+ isConnected = false;
+ jobThread = null;
+
+ try
+ {
+ doConnect( monitor );
+ }
+ catch ( NamingException ne )
+ {
+ disconnect();
+ monitor.reportError( ne.getMessage(), ne );
+ }
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.io.ConnectionWrapper#disconnect()
+ */
+ public void disconnect()
+ {
+ if ( jobThread != null )
+ {
+ Thread t = jobThread;
+ jobThread = null;
+ t.interrupt();
+ }
+ if ( context != null )
+ {
+ try
+ {
+ context.close();
+ }
+ catch ( NamingException e )
+ {
+ // ignore
+ }
+ context = null;
+ }
+ isConnected = false;
+ System.gc();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.io.ConnectionWrapper#bind(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+ */
+ public void bind( StudioProgressMonitor monitor )
+ {
+ try
+ {
+ doBind( monitor );
+ }
+ catch ( NamingException ne )
+ {
+ disconnect();
+ monitor.reportError( ne.getMessage(), ne );
+ }
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.io.ConnectionWrapper#unbind()
+ */
+ public void unbind()
+ {
+ disconnect();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.io.ConnectionWrapper#isConnected()
+ */
+ public boolean isConnected()
+ {
+ return context != null;
+ }
+
+
+ /**
+ * Search.
+ *
+ * @param searchBase the search base
+ * @param filter the filter
+ * @param searchControls the controls
+ * @param derefAliasMethod the deref alias method
+ * @param handleReferralsMethod the handle referrals method
+ * @param controls the ldap controls
+ * @param monitor the progress monitor
+ *
+ * @return the naming enumeration or null if an exception occurs.
+ */
+ public NamingEnumeration search( final String searchBase, final String filter, final SearchControls searchControls,
+ final String derefAliasMethod, final String handleReferralsMethod, final Control[] controls,
+ final StudioProgressMonitor monitor )
+ {
+ // start
+ InnerRunnable runnable = new InnerRunnable()
+ {
+ private NamingEnumeration namingEnumeration = null;
+ private NamingException namingException = null;
+
+
+ public void run()
+ {
+ try
+ {
+ LdapContext searchCtx = context.newInstance( controls );
+ try
+ {
+ searchCtx.addToEnvironment( "java.naming.ldap.derefAliases", derefAliasMethod ); //$NON-NLS-1$
+ searchCtx.addToEnvironment( Context.REFERRAL, handleReferralsMethod );
+
+ }
+ catch ( NamingException e )
+ {
+ namingException = e;
+ }
+
+ try
+ {
+ namingEnumeration = searchCtx.search( new LdapName( searchBase ), filter, searchControls );
+ }
+ catch ( NamingException ne )
+ {
+ namingException = ne;
+ }
+
+ }
+ catch ( NamingException e )
+ {
+ namingException = e;
+ }
+ }
+
+
+ public NamingException getException()
+ {
+ return namingException;
+ }
+
+
+ public Object getResult()
+ {
+ return namingEnumeration;
+ }
+
+
+ public void reset()
+ {
+ namingEnumeration = null;
+ namingException = null;
+ }
+
+ };
+
+ try
+ {
+ checkConnectionAndRunAndMonitor( runnable, monitor );
+ }
+ catch ( NamingException ne )
+ {
+ monitor.reportError( ne.getMessage(), ne );
+ return null;
+ }
+
+ if ( runnable.getException() != null )
+ {
+ monitor.reportError( runnable.getException().getMessage(), runnable.getException() );
+ return null;
+ }
+ else if ( runnable.getResult() != null && runnable.getResult() instanceof NamingEnumeration )
+ {
+ return ( NamingEnumeration ) runnable.getResult();
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+
+ /**
+ * Modify attributes.
+ *
+ * @param dn the dn
+ * @param modificationItems the modification items
+ * @param controls the controls
+ * @param monitor the progress monitor
+ */
+ public void modifyAttributes( final String dn, final ModificationItem[] modificationItems,
+ final Control[] controls, final StudioProgressMonitor monitor )
+ {
+ InnerRunnable runnable = new InnerRunnable()
+ {
+ private NamingException namingException = null;
+
+
+ public void run()
+ {
+ try
+ {
+ LdapContext modCtx = context.newInstance( controls );
+ modCtx.addToEnvironment( Context.REFERRAL, "throw" ); //$NON-NLS-1$
+
+ modCtx.modifyAttributes( new LdapName( dn ), modificationItems );
+ }
+ catch ( NamingException ne )
+ {
+ namingException = ne;
+ }
+ }
+
+
+ public NamingException getException()
+ {
+ return namingException;
+ }
+
+
+ public Object getResult()
+ {
+ return null;
+ }
+
+
+ public void reset()
+ {
+ namingException = null;
+ }
+ };
+
+ try
+ {
+ checkConnectionAndRunAndMonitor( runnable, monitor );
+ }
+ catch ( NamingException ne )
+ {
+ monitor.reportError( ne.getMessage(), ne );
+ }
+
+ if ( runnable.getException() != null )
+ {
+ monitor.reportError( runnable.getException().getMessage(), runnable.getException() );
+ }
+ }
+
+
+ /**
+ * Renames an entry.
+ *
+ * @param oldDn the old dn
+ * @param newDn the new dn
+ * @param deleteOldRdn the delete old rdn flag
+ * @param controls the controls
+ * @param monitor the monitor
+ */
+ public void rename( final String oldDn, final String newDn, final boolean deleteOldRdn, final Control[] controls,
+ final StudioProgressMonitor monitor )
+ {
+ InnerRunnable runnable = new InnerRunnable()
+ {
+ private NamingException namingException = null;
+
+
+ // TODO: delteOldRdn
+
+ public void run()
+ {
+ try
+ {
+ LdapContext modCtx = context.newInstance( controls );
+ modCtx.addToEnvironment( Context.REFERRAL, "throw" ); //$NON-NLS-1$
+ modCtx.rename( new LdapName( oldDn ), new LdapName( newDn ) );
+ }
+ catch ( NamingException ne )
+ {
+ namingException = ne;
+ }
+ }
+
+
+ public NamingException getException()
+ {
+ return namingException;
+ }
+
+
+ public Object getResult()
+ {
+ return null;
+ }
+
+
+ public void reset()
+ {
+ namingException = null;
+ }
+ };
+
+ try
+ {
+ checkConnectionAndRunAndMonitor( runnable, monitor );
+ }
+ catch ( NamingException ne )
+ {
+ monitor.reportError( ne.getMessage(), ne );
+ }
+
+ if ( runnable.getException() != null )
+ {
+ monitor.reportError( runnable.getException().getMessage(), runnable.getException() );
+ }
+ }
+
+
+ /**
+ * Creates an entry.
+ *
+ * @param dn the dn
+ * @param attributes the attributes
+ * @param controls the controls
+ * @param monitor the monitor
+ */
+ public void createEntry( final String dn, final Attributes attributes, final Control[] controls,
+ final StudioProgressMonitor monitor )
+ {
+ InnerRunnable runnable = new InnerRunnable()
+ {
+ private NamingException namingException = null;
+
+
+ public void run()
+ {
+ try
+ {
+ LdapContext modCtx = context.newInstance( controls );
+ modCtx.addToEnvironment( Context.REFERRAL, "throw" ); //$NON-NLS-1$
+ modCtx.createSubcontext( new LdapName( dn ), attributes );
+ }
+ catch ( NamingException ne )
+ {
+ namingException = ne;
+ }
+ }
+
+
+ public NamingException getException()
+ {
+ return namingException;
+ }
+
+
+ public Object getResult()
+ {
+ return null;
+ }
+
+
+ public void reset()
+ {
+ namingException = null;
+ }
+ };
+
+ try
+ {
+ checkConnectionAndRunAndMonitor( runnable, monitor );
+ }
+ catch ( NamingException ne )
+ {
+ monitor.reportError( ne.getMessage(), ne );
+ }
+
+ if ( runnable.getException() != null )
+ {
+ monitor.reportError( runnable.getException().getMessage(), runnable.getException() );
+ }
+ }
+
+
+ /**
+ * Deletes an entry.
+ *
+ * @param dn the dn
+ * @param controls the controls
+ * @param monitor the monitor
+ */
+ public void deleteEntry( final String dn, final Control[] controls, final StudioProgressMonitor monitor )
+ {
+ InnerRunnable runnable = new InnerRunnable()
+ {
+ private NamingException namingException = null;
+
+
+ public void run()
+ {
+ try
+ {
+ LdapContext modCtx = context.newInstance( controls );
+ modCtx.addToEnvironment( Context.REFERRAL, "throw" ); //$NON-NLS-1$
+
+ modCtx.destroySubcontext( new LdapName( dn ) );
+ }
+ catch ( NamingException ne )
+ {
+ namingException = ne;
+ }
+ }
+
+
+ public NamingException getException()
+ {
+ return namingException;
+ }
+
+
+ public Object getResult()
+ {
+ return null;
+ }
+
+
+ public void reset()
+ {
+ namingException = null;
+ }
+ };
+
+ try
+ {
+ checkConnectionAndRunAndMonitor( runnable, monitor );
+ }
+ catch ( NamingException ne )
+ {
+ monitor.reportError( ne.getMessage(), ne );
+ }
+
+ if ( runnable.getException() != null )
+ {
+ monitor.reportError( runnable.getException().getMessage(), runnable.getException() );
+ }
+ }
+
+
+ private void doConnect( final StudioProgressMonitor monitor ) throws NamingException
+ {
+ context = null;
+ isConnected = true;
+
+ // setup connection parameters
+ String host = connection.getConnectionParameter().getHost();
+ int port = connection.getConnectionParameter().getPort();
+
+ useLdaps = connection.getConnectionParameter().getEncryptionMethod() == ConnectionParameter.EncryptionMethod.LDAPS;
+ useStartTLS = connection.getConnectionParameter().getEncryptionMethod() == ConnectionParameter.EncryptionMethod.START_TLS;
+
+ environment = new Hashtable<String, String>();
+ environment.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" ); //$NON-NLS-1$
+ environment.put( "java.naming.ldap.version", "3" ); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // timeouts
+ if ( !useLdaps )
+ {
+ environment.put( "com.sun.jndi.ldap.connect.timeout", "10000" ); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ environment.put( "com.sun.jndi.dns.timeout.initial", "2000" ); //$NON-NLS-1$ //$NON-NLS-2$
+ environment.put( "com.sun.jndi.dns.timeout.retries", "3" ); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // ldaps://
+ if ( useLdaps )
+ {
+ environment.put( Context.PROVIDER_URL, "ldaps://" + host + ":" + port ); //$NON-NLS-1$ //$NON-NLS-2$
+ environment.put( Context.SECURITY_PROTOCOL, "ssl" ); //$NON-NLS-1$
+ environment.put( "java.naming.ldap.factory.socket", DummySSLSocketFactory.class.getName() ); //$NON-NLS-1$
+ }
+ else
+ {
+ environment.put( Context.PROVIDER_URL, "ldap://" + host + ":" + port ); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ InnerRunnable runnable = new InnerRunnable()
+ {
+ private NamingException namingException = null;
+
+
+ public void run()
+ {
+ try
+ {
+ context = new InitialLdapContext( environment, null );
+
+ if ( useStartTLS )
+ {
+ try
+ {
+ StartTlsResponse tls = ( StartTlsResponse ) context
+ .extendedOperation( new StartTlsRequest() );
+ tls.setHostnameVerifier( new HostnameVerifier()
+ {
+ public boolean verify( String arg0, SSLSession arg1 )
+ {
+ return true;
+ }
+ } );
+ tls.negotiate( new DummySSLSocketFactory() );
+
+ }
+ catch ( Exception e )
+ {
+ namingException = new NamingException( e.getMessage() != null ? e.getMessage()
+ : "Error while establishing TLS session" ); //$NON-NLS-1$
+ namingException.setRootCause( e );
+ context.close();
+ }
+ }
+ }
+ catch ( NamingException ne )
+ {
+ namingException = ne;
+ }
+ }
+
+
+ public NamingException getException()
+ {
+ return namingException;
+ }
+
+
+ public Object getResult()
+ {
+ return null;
+ }
+
+
+ public void reset()
+ {
+ namingException = null;
+ }
+ };
+
+ runAndMonitor( runnable, monitor );
+
+ if ( runnable.getException() != null )
+ {
+ throw runnable.getException();
+ }
+ else if ( context != null )
+ {
+ // all OK
+ }
+ else
+ {
+ throw new NamingException( "???" ); //$NON-NLS-1$
+ }
+ }
+
+
+ private void doBind( final StudioProgressMonitor monitor ) throws NamingException
+ {
+ if ( context != null && isConnected )
+ {
+ // setup authentication methdod
+ authMethod = "none";
+ if ( connection.getConnectionParameter().getAuthMethod() == ConnectionParameter.AuthenticationMethod.SIMPLE )
+ {
+ authMethod = "simple";
+ }
+ else if ( connection.getConnectionParameter().getAuthMethod() == ConnectionParameter.AuthenticationMethod.SASL_DIGEST_MD5 )
+ {
+ authMethod = "DIGEST-MD5";
+ }
+ else if ( connection.getConnectionParameter().getAuthMethod() == ConnectionParameter.AuthenticationMethod.SASL_CRAM_MD5 )
+ {
+ authMethod = "CRAM-MD5";
+ }
+
+ // setup credentials
+ IAuthHandler authHandler = ConnectionCorePlugin.getDefault().getAuthHandler();
+ if ( authHandler == null )
+ {
+ monitor.reportError( Messages.model__no_auth_handler, new Exception() );
+ }
+ ICredentials credentials = authHandler.getCredentials( connection.getConnectionParameter() );
+ if ( credentials == null )
+ {
+ monitor.reportError( Messages.model__no_credentials, new Exception() );
+ }
+ bindPrincipal = credentials.getBindPrincipal();
+ bindCredentials = credentials.getBindPassword();
+
+ InnerRunnable runnable = new InnerRunnable()
+ {
+ private NamingException namingException = null;
+
+
+ public void run()
+ {
+ try
+ {
+ context.removeFromEnvironment( Context.SECURITY_AUTHENTICATION );
+ context.removeFromEnvironment( Context.SECURITY_PRINCIPAL );
+ context.removeFromEnvironment( Context.SECURITY_CREDENTIALS );
+
+ context.addToEnvironment( Context.SECURITY_PRINCIPAL, bindPrincipal );
+ context.addToEnvironment( Context.SECURITY_CREDENTIALS, bindCredentials );
+ context.addToEnvironment( Context.SECURITY_AUTHENTICATION, authMethod );
+
+ context.reconnect( context.getConnectControls() );
+ }
+ catch ( NamingException ne )
+ {
+ namingException = ne;
+ }
+ }
+
+
+ public NamingException getException()
+ {
+ return namingException;
+ }
+
+
+ public Object getResult()
+ {
+ return null;
+ }
+
+
+ public void reset()
+ {
+ namingException = null;
+ }
+ };
+
+ runAndMonitor( runnable, monitor );
+
+ if ( runnable.getException() != null )
+ {
+ throw runnable.getException();
+ }
+ else if ( context != null )
+ {
+ // all OK
+ }
+ else
+ {
+ throw new NamingException( "???" ); //$NON-NLS-1$
+ }
+
+ }
+ else
+ {
+ throw new NamingException( "No connection" );
+ }
+ }
+
+
+ private void checkConnectionAndRunAndMonitor( final InnerRunnable runnable, final StudioProgressMonitor monitor )
+ throws NamingException
+ {
+ // check connection
+ if ( !isConnected || context == null )
+ {
+ doConnect( monitor );
+ doBind( monitor );
+ }
+ if ( context == null )
+ {
+ throw new NamingException( "No connection" );
+ }
+
+ // loop for reconnection
+ for ( int i = 0; i <= 1; i++ )
+ {
+ runAndMonitor( runnable, monitor );
+
+ // check reconnection
+ if ( i == 0
+ && runnable.getException() != null
+ && ( ( runnable.getException() instanceof CommunicationException )
+ || ( runnable.getException() instanceof ServiceUnavailableException ) || ( runnable.getException() instanceof InsufficientResourcesException ) ) )
+ {
+
+ doConnect( monitor );
+ doBind( monitor );
+ runnable.reset();
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+
+
+ private void runAndMonitor( final InnerRunnable runnable, final StudioProgressMonitor monitor )
+ throws CancelException
+ {
+ if ( !monitor.isCanceled() )
+ {
+ // monitor
+ StudioProgressMonitor.CancelListener listener = new StudioProgressMonitor.CancelListener()
+ {
+ public void cancelRequested( StudioProgressMonitor.CancelEvent event )
+ {
+ if ( monitor.isCanceled() )
+ {
+ if ( jobThread.isAlive() )
+ {
+ jobThread.interrupt();
+ }
+ if ( context != null )
+ {
+ try
+ {
+ context.close();
+ }
+ catch ( NamingException ne )
+ {
+ }
+ isConnected = false;
+ context = null;
+ System.gc();
+ }
+ isConnected = false;
+ }
+ }
+ };
+ monitor.addCancelListener( listener );
+ jobThread = Thread.currentThread();
+
+ // run
+ try
+ {
+ // try {
+ // Thread.sleep(5000);
+ // } catch (InterruptedException e) {
+ // System.out.println(System.currentTimeMillis() + ": sleep
+ // interrupted!");
+ // }
+ // System.out.println(System.currentTimeMillis() + ": " +
+ // runnable);
+
+ runnable.run();
+ }
+ finally
+ {
+ monitor.removeCancelListener( listener );
+ jobThread = null;
+ }
+
+ if ( monitor.isCanceled() )
+ {
+ throw new CancelException();
+ }
+ }
+ }
+
+ interface InnerRunnable extends Runnable
+ {
+
+ /**
+ * Gets the exception.
+ *
+ * @return the exception
+ */
+ NamingException getException();
+
+
+ /**
+ * Gets the result.
+ *
+ * @return the result
+ */
+ Object getResult();
+
+
+ /**
+ * Reset.
+ */
+ void reset();
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/AbstractAsyncBulkJob.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/AbstractAsyncBulkJob.java
new file mode 100644
index 0000000..220d191
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/AbstractAsyncBulkJob.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core.jobs;
+
+
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+
+
+/**
+ * Base class for bulk jobs. It is used to execute large modifications without
+ * firering modification events. The notification of the listeners is done after
+ * the job is executed.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class AbstractAsyncBulkJob extends AbstractConnectionJob
+{
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#executeAsyncJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+ */
+ protected final void executeAsyncJob( StudioProgressMonitor pm )
+ {
+ ConnectionEventRegistry.suspendEventFireingInCurrentThread();
+
+ try
+ {
+ executeBulkJob( pm );
+ }
+ finally
+ {
+ ConnectionEventRegistry.resumeEventFireingInCurrentThread();
+ }
+
+ this.runNotification();
+ }
+
+
+ /**
+ * Executes the bulk job.
+ *
+ * @param pm the pm
+ */
+ protected abstract void executeBulkJob( StudioProgressMonitor pm );
+
+
+ /**
+ * Notifies about changed objects.
+ */
+ protected abstract void runNotification();
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/AbstractConnectionJob.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/AbstractConnectionJob.java
new file mode 100644
index 0000000..2dad5b1
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/AbstractConnectionJob.java
@@ -0,0 +1,256 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core.jobs;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.Messages;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+
+
+/**
+ * Base class for all connections related jobs.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class AbstractConnectionJob extends Job
+{
+
+ /** The external progress monitor. */
+ private IProgressMonitor externalProgressMonitor;
+
+ /** The external result. */
+ private IStatus externalResult;
+
+
+ /**
+ * Creates a new instance of AbstractConnectionJob.
+ */
+ protected AbstractConnectionJob()
+ {
+ super( "" ); //$NON-NLS-1$
+ }
+
+
+ /**
+ * Executes the job asynchronously.
+ *
+ * @param monitor the progress monitor
+ *
+ * @throws Exception the exception
+ */
+ protected abstract void executeAsyncJob( StudioProgressMonitor monitor ) throws Exception;
+
+
+ /**
+ * Gets the error message.
+ *
+ * @return the error message.
+ */
+ protected String getErrorMessage()
+ {
+ return Messages.jobs__error_occurred;
+ }
+
+
+ /**
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected final IStatus run( IProgressMonitor ipm )
+ {
+ StudioProgressMonitor monitor = new StudioProgressMonitor( externalProgressMonitor == null ? ipm
+ : externalProgressMonitor );
+
+ // execute job
+ if ( !monitor.errorsReported() )
+ {
+ try
+ {
+ executeAsyncJob( monitor );
+ }
+ catch ( Exception e )
+ {
+ monitor.reportError( e );
+ }
+ finally
+ {
+ monitor.done();
+ ipm.done();
+ }
+ }
+
+ // error handling
+ if ( monitor.isCanceled() )
+ {
+ // System.out.println("Job: CANCEL+CANCEL");
+ externalResult = Status.CANCEL_STATUS;
+ return Status.CANCEL_STATUS;
+ }
+ else if ( monitor.errorsReported() )
+ {
+ externalResult = monitor.getErrorStatus( getErrorMessage() );
+ if ( externalProgressMonitor == null )
+ {
+ // System.out.println("Job: ERROR+ERROR");
+ return externalResult;
+ }
+ else
+ {
+ // System.out.println("Job: ERROR+OK");
+ return Status.OK_STATUS;
+ }
+ }
+ else
+ {
+ // System.out.println("Job: OK+OK");
+ externalResult = Status.OK_STATUS;
+ return Status.OK_STATUS;
+ }
+ }
+
+
+ /**
+ * Sets the external progress monitor.
+ *
+ * @param externalProgressMonitor the external progress monitor
+ */
+ public void setExternalProgressMonitor( IProgressMonitor externalProgressMonitor )
+ {
+ this.externalProgressMonitor = externalProgressMonitor;
+ }
+
+
+ /**
+ * Gets the result of the executed job. Either Status.OK_STATUS,
+ * Status.CANCEL_STATUS or an error status.
+ *
+ * @return the result of the executed job
+ */
+ public IStatus getExternalResult()
+ {
+ return this.externalResult;
+ }
+
+
+ /**
+ * Executes the job.
+ */
+ public final void execute()
+ {
+ setUser( true );
+ schedule();
+ }
+
+
+ /**
+ * Gets the locked objects.
+ *
+ * @return the locked objects
+ */
+ protected abstract Object[] getLockedObjects();
+
+
+ /**
+ * @see org.eclipse.core.runtime.jobs.Job#shouldSchedule()
+ */
+ public boolean shouldSchedule()
+ {
+ Object[] myLockedObjects = getLockedObjects();
+ String[] myLockedObjectsIdentifiers = getLockIdentifiers( myLockedObjects );
+
+ // TODO: read, write
+
+ Job[] jobs = Platform.getJobManager().find( null );
+ for ( int i = 0; i < jobs.length; i++ )
+ {
+ Job job = jobs[i];
+
+ // if(job instanceof AbstractEclipseJob) {
+ if ( job.getClass() == this.getClass() && job != this )
+ {
+ AbstractConnectionJob otherJob = ( AbstractConnectionJob ) job;
+ Object[] otherLockedObjects = otherJob.getLockedObjects();
+ String[] otherLockedObjectIdentifiers = getLockIdentifiers( otherLockedObjects );
+
+ for ( int j = 0; j < otherLockedObjectIdentifiers.length; j++ )
+ {
+ String other = otherLockedObjectIdentifiers[j];
+ for ( int k = 0; k < myLockedObjectsIdentifiers.length; k++ )
+ {
+ String my = myLockedObjectsIdentifiers[k];
+
+ //System.out.print( "other:" + other + ", my: " + my );
+ if ( other.startsWith( my ) || my.startsWith( other ) )
+ {
+ //System.out.println( ", shouldSchedule() = " + false );
+ return false;
+ }
+ else
+ {
+ //System.out.println();
+ }
+
+ }
+ }
+
+ }
+ }
+ return super.shouldSchedule();
+ }
+
+
+ private static String[] getLockIdentifiers( Object[] objects )
+ {
+ String[] identifiers = new String[objects.length];
+ for ( int i = 0; i < identifiers.length; i++ )
+ {
+ Object o = objects[i];
+ if ( o instanceof Connection )
+ {
+ identifiers[i] = getLockIdentifier( ( Connection ) o );
+ }
+ else
+ {
+ identifiers[i] = getLockIdentifier( objects[i] );
+ }
+ }
+ return identifiers;
+ }
+
+
+ private static String getLockIdentifier( Connection connection )
+ {
+ return connection.getHost() + ":" + connection.getPort();
+ }
+
+
+ private static String getLockIdentifier( Object object )
+ {
+ return object.toString();
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindJob.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindJob.java
new file mode 100644
index 0000000..40e8c0a
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindJob.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core.jobs;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.Messages;
+
+
+/**
+ * Job to check binding (authentication) to a directory server
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CheckBindJob extends AbstractConnectionJob
+{
+
+ private Connection connection;
+
+
+ /**
+ * Creates a new instance of CheckBindJob.
+ *
+ * @param connection the connection
+ */
+ public CheckBindJob( Connection connection )
+ {
+ this.connection = connection;
+ setName( Messages.jobs__check_bind_name );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getLockedObjects()
+ */
+ protected Object[] getLockedObjects()
+ {
+ return new Object[]
+ { connection };
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#executeAsyncJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+ */
+ protected void executeAsyncJob( StudioProgressMonitor monitor )
+ {
+ monitor.beginTask( Messages.jobs__check_bind_task, 4 );
+ monitor.reportProgress( " " ); //$NON-NLS-1$
+ monitor.worked( 1 );
+
+ connection.getJNDIConnectionWrapper().connect( monitor );
+ connection.getJNDIConnectionWrapper().bind( monitor );
+ connection.getJNDIConnectionWrapper().disconnect();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getErrorMessage()
+ */
+ protected String getErrorMessage()
+ {
+ return Messages.jobs__check_bind_error;
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterJob.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterJob.java
new file mode 100644
index 0000000..dc52bd6
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterJob.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core.jobs;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.Messages;
+
+
+/**
+ * Job to check if a connection to a directory server could be established
+ * using the given connection parmeter.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CheckNetworkParameterJob extends AbstractConnectionJob
+{
+
+ private Connection connection;
+
+
+ /**
+ * Creates a new instance of CheckNetworkParameterJob.
+ *
+ * @param connection the connection
+ */
+ public CheckNetworkParameterJob( Connection connection )
+ {
+ this.connection = connection;
+ setName( Messages.jobs__check_network_name );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getLockedObjects()
+ */
+ protected Object[] getLockedObjects()
+ {
+ return new Object[]
+ { connection };
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#executeAsyncJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+ */
+ protected void executeAsyncJob( StudioProgressMonitor monitor )
+ {
+ monitor.beginTask( Messages.jobs__check_network_task, 3 );
+ monitor.reportProgress( " " ); //$NON-NLS-1$
+ monitor.worked( 1 );
+
+ connection.getJNDIConnectionWrapper().connect( monitor );
+ connection.getJNDIConnectionWrapper().disconnect();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getErrorMessage()
+ */
+ protected String getErrorMessage()
+ {
+ return Messages.jobs__check_network_error;
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsJob.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsJob.java
new file mode 100644
index 0000000..0117193
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsJob.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core.jobs;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.Messages;
+import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+
+
+/**
+ * Job to close a connection to a directory server.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CloseConnectionsJob extends AbstractAsyncBulkJob
+{
+
+ private Connection[] connections;
+
+
+ /**
+ * Creates a new instance of CloseConnectionsJob.
+ *
+ * @param connection the connection
+ */
+ public CloseConnectionsJob( Connection connection )
+ {
+ this( new Connection[]
+ { connection } );
+ }
+
+
+ /**
+ * Creates a new instance of CloseConnectionsJob.
+ *
+ * @param connections the connections
+ */
+ public CloseConnectionsJob( Connection[] connections )
+ {
+ this.connections = connections;
+ setName( connections.length == 1 ? Messages.jobs__close_connections_name_1
+ : Messages.jobs__close_connections_name_n );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getLockedObjects()
+ */
+ protected Object[] getLockedObjects()
+ {
+ return connections;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getErrorMessage()
+ */
+ protected String getErrorMessage()
+ {
+ return connections.length == 1 ? Messages.jobs__close_connections_error_1
+ : Messages.jobs__close_connections_error_n;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractAsyncBulkJob#executeBulkJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+ */
+ protected void executeBulkJob( StudioProgressMonitor monitor )
+ {
+
+ monitor.beginTask( " ", connections.length * 6 + 1 ); //$NON-NLS-1$
+ monitor.reportProgress( " " ); //$NON-NLS-1$
+
+ for ( int i = 0; i < connections.length; i++ )
+ {
+ if ( connections[i].getJNDIConnectionWrapper().isConnected() )
+ {
+ monitor.setTaskName( Messages.bind( Messages.jobs__close_connections_task, new String[]
+ { this.connections[i].getName() } ) );
+ monitor.worked( 1 );
+
+ connections[i].getJNDIConnectionWrapper().unbind();
+ connections[i].getJNDIConnectionWrapper().disconnect();
+ }
+ }
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractAsyncBulkJob#runNotification()
+ */
+ protected void runNotification()
+ {
+ for ( int i = 0; i < connections.length; i++ )
+ {
+ if ( !connections[i].getJNDIConnectionWrapper().isConnected() )
+ {
+ ConnectionEventRegistry.fireConnectionClosed( connections[i], this );
+ }
+ }
+ }
+
+}
diff --git a/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsJob.java b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsJob.java
new file mode 100644
index 0000000..b9933e0
--- /dev/null
+++ b/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsJob.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.core.jobs;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.Messages;
+import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+
+
+/**
+ * Job to open a connection to a directory server.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class OpenConnectionsJob extends AbstractAsyncBulkJob
+{
+
+ private Connection[] connections;
+
+
+ /**
+ * Creates a new instance of OpenConnectionsJob.
+ *
+ * @param connection the connection
+ */
+ public OpenConnectionsJob( Connection connection )
+ {
+ this( new Connection[]
+ { connection } );
+ }
+
+
+ /**
+ * Creates a new instance of OpenConnectionsJob.
+ *
+ * @param connections the connections
+ */
+ public OpenConnectionsJob( Connection[] connections )
+ {
+ this.connections = connections;
+ setName( connections.length == 1 ? Messages.jobs__open_connections_name_1
+ : Messages.jobs__open_connections_name_n );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getLockedObjects()
+ */
+ protected Object[] getLockedObjects()
+ {
+ return connections;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getErrorMessage()
+ */
+ protected String getErrorMessage()
+ {
+ return connections.length == 1 ? Messages.jobs__open_connections_error_1
+ : Messages.jobs__open_connections_error_n;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractAsyncBulkJob#executeBulkJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+ */
+ protected void executeBulkJob( StudioProgressMonitor monitor )
+ {
+
+ monitor.beginTask( " ", connections.length * 6 + 1 ); //$NON-NLS-1$
+ monitor.reportProgress( " " ); //$NON-NLS-1$
+
+ for ( int i = 0; i < connections.length; i++ )
+ {
+ if ( !connections[i].getJNDIConnectionWrapper().isConnected() )
+ {
+ monitor.setTaskName( Messages.bind( Messages.jobs__open_connections_task, new String[]
+ { connections[i].getName() } ) );
+ monitor.worked( 1 );
+
+ connections[i].getJNDIConnectionWrapper().connect( monitor );
+ connections[i].getJNDIConnectionWrapper().bind( monitor );
+ }
+ }
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.jobs.AbstractAsyncBulkJob#runNotification()
+ */
+ protected void runNotification()
+ {
+ for ( int i = 0; i < connections.length; i++ )
+ {
+ if ( connections[i].getJNDIConnectionWrapper().isConnected() )
+ {
+ ConnectionEventRegistry.fireConnectionOpened( connections[i], this );
+ }
+ }
+ }
+
+}
diff --git a/studio-connection-core/src/main/resources/org/apache/directory/studio/connection/core/XmlFileFormat.xslt b/studio-connection-core/src/main/resources/org/apache/directory/studio/connection/core/XmlFileFormat.xslt
new file mode 100644
index 0000000..f017c72
--- /dev/null
+++ b/studio-connection-core/src/main/resources/org/apache/directory/studio/connection/core/XmlFileFormat.xslt
@@ -0,0 +1,48 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="xml"/>
+ <xsl:param name="indent-increment" select="' '" />
+
+ <xsl:template match="*">
+ <xsl:param name="indent" select="'
'"/>
+
+ <xsl:value-of select="$indent"/>
+ <xsl:copy>
+ <xsl:copy-of select="@*" />
+ <xsl:apply-templates>
+ <xsl:with-param name="indent"
+ select="concat($indent, $indent-increment)"/>
+ </xsl:apply-templates>
+ <xsl:if test="*">
+ <xsl:value-of select="$indent"/>
+ </xsl:if>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="comment()|processing-instruction()">
+ <xsl:copy />
+ </xsl:template>
+
+ <!-- WARNING: this is dangerous. Handle with care -->
+ <!-- <xsl:template match="text()[normalize-space(.)='']"/> -->
+
+</xsl:stylesheet>
diff --git a/studio-connection-core/src/main/resources/org/apache/directory/studio/connection/core/messages.properties b/studio-connection-core/src/main/resources/org/apache/directory/studio/connection/core/messages.properties
new file mode 100644
index 0000000..38bc0fe
--- /dev/null
+++ b/studio-connection-core/src/main/resources/org/apache/directory/studio/connection/core/messages.properties
@@ -0,0 +1,44 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+copy_n_of_s=Copy {0}of {1}
+
+model__no_auth_handler=No authentification handler
+model__no_credentials=No credentials
+
+jobs__error_occurred=Error occurred
+jobs__progressmonitor_check_cancellation=Check Cancellation
+jobs__progressmonitor_report_progress=Report Progress
+
+jobs__check_bind_name=Check Authentication
+jobs__check_bind_task=Checking authentication
+jobs__check_bind_error=The authentication failed
+jobs__check_network_name=Check Network Parameter
+jobs__check_network_task=Checking network parameter
+jobs__check_network_error=The connection failed
+
+jobs__open_connections_name_1=Open Connection
+jobs__open_connections_name_n=Open Connections
+jobs__open_connections_task=Opening connection {0}
+jobs__open_connections_error_1=Error while opening connection
+jobs__open_connections_error_n=Error while opening connections
+
+jobs__close_connections_name_1=Close Connection
+jobs__close_connections_name_n=Close Connections
+jobs__close_connections_task=Closing connection {0}
+jobs__close_connections_error_1=Error while closing connection
+jobs__close_connections_error_n=Error while closing connections
diff --git a/studio-connection-ui/.classpath b/studio-connection-ui/.classpath
new file mode 100644
index 0000000..902eb0a
--- /dev/null
+++ b/studio-connection-ui/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/studio-connection-ui/.project b/studio-connection-ui/.project
new file mode 100644
index 0000000..907fe3d
--- /dev/null
+++ b/studio-connection-ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>studio-connection-ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/studio-connection-ui/META-INF/LICENSE.txt b/studio-connection-ui/META-INF/LICENSE.txt
new file mode 100755
index 0000000..d645695
--- /dev/null
+++ b/studio-connection-ui/META-INF/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/studio-connection-ui/META-INF/MANIFEST.MF b/studio-connection-ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..a45f99b
--- /dev/null
+++ b/studio-connection-ui/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Apache Directory Studio Connection UI
+Bundle-SymbolicName: org.apache.directory.studio.connection.ui;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: org.apache.directory.studio.connection.ui.ConnectionUIPlugin
+Bundle-Vendor: Apache Software Foundation
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.apache.directory.studio.connection.core,
+ org.eclipse.ui.workbench.texteditor
+Eclipse-LazyStart: true
+Export-Package: org.apache.directory.studio.connection.ui,
+ org.apache.directory.studio.connection.ui.actions,
+ org.apache.directory.studio.connection.ui.dnd,
+ org.apache.directory.studio.connection.ui.properties,
+ org.apache.directory.studio.connection.ui.widgets,
+ org.apache.directory.studio.connection.ui.wizards
diff --git a/studio-connection-ui/META-INF/NOTICE.txt b/studio-connection-ui/META-INF/NOTICE.txt
new file mode 100644
index 0000000..3fa431b
--- /dev/null
+++ b/studio-connection-ui/META-INF/NOTICE.txt
Binary files differ
diff --git a/studio-connection-ui/build.properties b/studio-connection-ui/build.properties
new file mode 100644
index 0000000..3b23cf4
--- /dev/null
+++ b/studio-connection-ui/build.properties
@@ -0,0 +1,5 @@
+source.. = src/main/java/
+output.. = classes/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/studio-connection-ui/build.xml b/studio-connection-ui/build.xml
new file mode 100644
index 0000000..8eaa4d2
--- /dev/null
+++ b/studio-connection-ui/build.xml
@@ -0,0 +1,49 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<project default="plugin">
+ <import file="../studio-build/build.xml"/>
+
+
+ <!-- RETRIEVE-STUDIO-JAR-DEPENDENCIES TASK -->
+ <target name="retrieve-studio-jar-dependencies" description="Compiles the dependencies of the project" >
+ <ant dir="../studio-jars" target="retrieve-dependencies" inheritall="false" />
+ </target>
+
+ <!-- COMPILE-DEPENDENCIES TASK -->
+ <target name="compile-dependencies" description="Compiles the dependencies of the project" >
+ <ant dir="../studio-connection-core" target="compile" inheritall="false" />
+ </target>
+
+ <!-- BUILD-CLASSPATH TASK -->
+ <target name="build-classpath" depends="retrieve-studio-jar-dependencies,compile-dependencies" description="Computes the classpath" >
+ <echo>Building classpath for ${project.name} (${project.id}) version ${project.version}</echo>
+ <path id="classpath">
+ <!-- Project dependencies -->
+ <fileset dir="${lib.dir}" />
+ <!-- Eclipse dependencies -->
+ <fileset dir="../dependencies/eclipse/3.2">
+ <include name="**/*.jar"/>
+ </fileset>
+ <!-- Plugin dependencies -->
+ <fileset dir="../studio-jars/lib/" />
+ <pathelement location="../studio-connection-core/target/classes"/>
+ </path>
+ </target>
+
+</project>
diff --git a/studio-connection-ui/ivy.xml b/studio-connection-ui/ivy.xml
new file mode 100644
index 0000000..cff748d
--- /dev/null
+++ b/studio-connection-ui/ivy.xml
@@ -0,0 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.studio" module="studio-connection-ui"/>
+</ivy-module>
\ No newline at end of file
diff --git a/studio-connection-ui/plugin.properties b/studio-connection-ui/plugin.properties
new file mode 100644
index 0000000..e48a29f
--- /dev/null
+++ b/studio-connection-ui/plugin.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+project.name=Apache Directory Studio Connection UI
+project.version=1.0.0
+project.id=org.apache.directory.studio.connection.ui
diff --git a/studio-connection-ui/plugin.xml b/studio-connection-ui/plugin.xml
new file mode 100644
index 0000000..3bcfec4
--- /dev/null
+++ b/studio-connection-ui/plugin.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension-point id="org.apache.directory.studio.connectionparameterpages" name="Connection Parameter Pages" schema="src/main/resources/connectionParameterPages.exsd"/>
+
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.apache.directory.studio.connection.ui.properties.ConnectionPropertyPage"
+ id="org.apache.directory.studio.connection.ui.properties.ConnectionPropertyPage"
+ name="Connection"
+ objectClass="org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider"/>
+
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <wizard
+ category="org.apache.directory.studio.ldapbrowser.newWizards"
+ class="org.apache.directory.studio.connection.ui.wizards.NewConnectionWizard"
+ hasPages="true"
+ icon="resources/icons/connection_add.gif"
+ id="org.apache.directory.studio.connection.ui.wizards.NewConnectionWizard"
+ name="LDAP Connection"
+ project="false"/>
+ </extension>
+ <extension
+ point="org.apache.directory.studio.connectionparameterpages">
+ <connectionParameterPage
+ class="org.apache.directory.studio.connection.ui.widgets.NetworkParameterPage"
+ description="Please enter connection name and network parameters."
+ name="Network Parameter"/>
+ <connectionParameterPage
+ class="org.apache.directory.studio.connection.ui.widgets.AuthenticationParameterPage"
+ description="Please select an authentification method and input authentification data."
+ name="Authentication"/>
+ </extension>
+</plugin>
diff --git a/studio-connection-ui/resources/icons/connection_add.gif b/studio-connection-ui/resources/icons/connection_add.gif
new file mode 100644
index 0000000..ea1b9c6
--- /dev/null
+++ b/studio-connection-ui/resources/icons/connection_add.gif
Binary files differ
diff --git a/studio-connection-ui/resources/icons/connection_connect.gif b/studio-connection-ui/resources/icons/connection_connect.gif
new file mode 100644
index 0000000..8ce12c4
--- /dev/null
+++ b/studio-connection-ui/resources/icons/connection_connect.gif
Binary files differ
diff --git a/studio-connection-ui/resources/icons/connection_connected.gif b/studio-connection-ui/resources/icons/connection_connected.gif
new file mode 100644
index 0000000..b0ef462
--- /dev/null
+++ b/studio-connection-ui/resources/icons/connection_connected.gif
Binary files differ
diff --git a/studio-connection-ui/resources/icons/connection_disconnect.gif b/studio-connection-ui/resources/icons/connection_disconnect.gif
new file mode 100644
index 0000000..6aebebf
--- /dev/null
+++ b/studio-connection-ui/resources/icons/connection_disconnect.gif
Binary files differ
diff --git a/studio-connection-ui/resources/icons/connection_disconnected.gif b/studio-connection-ui/resources/icons/connection_disconnected.gif
new file mode 100644
index 0000000..d38d21c
--- /dev/null
+++ b/studio-connection-ui/resources/icons/connection_disconnected.gif
Binary files differ
diff --git a/studio-connection-ui/resources/icons/connection_wizard.gif b/studio-connection-ui/resources/icons/connection_wizard.gif
new file mode 100644
index 0000000..8673dd1
--- /dev/null
+++ b/studio-connection-ui/resources/icons/connection_wizard.gif
Binary files differ
diff --git a/studio-connection-ui/resources/icons/pulldown.gif b/studio-connection-ui/resources/icons/pulldown.gif
new file mode 100644
index 0000000..28707c5
--- /dev/null
+++ b/studio-connection-ui/resources/icons/pulldown.gif
Binary files differ
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java
new file mode 100644
index 0000000..f310363
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.connection.ui;
+
+
+import org.apache.directory.studio.connection.core.ConnectionParameter;
+import org.eclipse.jface.operation.IRunnableContext;
+
+
+/**
+ * Base implementation of ConnectionParameterPage.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class AbstractConnectionParameterPage implements ConnectionParameterPage
+{
+
+ /** The page name. */
+ protected String pageName;
+
+ /** The page description. */
+ protected String pageDescription;
+
+ /** The runnable context. */
+ protected IRunnableContext runnableContext;
+
+ /** The connection parameter page modify listener. */
+ protected ConnectionParameterPageModifyListener connectionParameterPageModifyListener;
+
+ /** The message. */
+ protected String message;
+
+ /** The error message. */
+ protected String errorMessage;
+
+ /** The connection parameter. */
+ protected ConnectionParameter connectionParameter;
+
+
+ /**
+ * Creates a new instance of AbstractConnectionParameterPage.
+ */
+ protected AbstractConnectionParameterPage()
+ {
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#setConnectionParameterPageModifyListener(org.apache.directory.studio.connection.ui.ConnectionParameterPageModifyListener)
+ */
+ public void setConnectionParameterPageModifyListener( ConnectionParameterPageModifyListener listener )
+ {
+ this.connectionParameterPageModifyListener = listener;
+
+ }
+
+
+ /**
+ * Fires a connection page modified event when then page was modified.
+ */
+ protected void fireConnectionPageModified()
+ {
+ connectionParameterPageModifyListener.connectionParameterPageModified();
+ }
+
+
+ /**
+ * Sets the runnable context.
+ *
+ * @param runnableContext the runnable context
+ */
+ public void setRunnableContext( IRunnableContext runnableContext )
+ {
+ this.runnableContext = runnableContext;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#getPageName()
+ */
+ public String getPageName()
+ {
+ return pageName;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#setPageName(java.lang.String)
+ */
+ public void setPageName( String pageName )
+ {
+ this.pageName = pageName;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#getPageDescription()
+ */
+ public String getPageDescription()
+ {
+ return pageDescription;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#setPageDescription(java.lang.String)
+ */
+ public void setPageDescription( String pageDescription )
+ {
+ this.pageDescription = pageDescription;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#getErrorMessage()
+ */
+ public String getErrorMessage()
+ {
+ return errorMessage;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#getMessage()
+ */
+ public String getMessage()
+ {
+ return message;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#isValid()
+ */
+ public boolean isValid()
+ {
+ return message == null && errorMessage == null;
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPage.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPage.java
new file mode 100644
index 0000000..d4acb2c
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPage.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.connection.ui;
+
+
+import org.apache.directory.studio.connection.core.ConnectionParameter;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * An IConnectionParameterPage is used to add connection parameter pages
+ * to the connection wizard and the connection property page.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ConnectionParameterPage
+{
+
+ /**
+ * Initializes the fields with the given parameters.
+ *
+ * @param parameter the parameter
+ */
+ public void loadParameters( ConnectionParameter parameter );
+
+
+ /**
+ * Save the fields to the parameters.
+ *
+ * @param parameter the parameter
+ */
+ public void saveParameters( ConnectionParameter parameter );
+
+
+ /**
+ * Checks if is valid.
+ *
+ * @return true, if is valid
+ */
+ public boolean isValid();
+
+
+ /**
+ * Gets an error message that should be displayed
+ * to the user. Null means no error message so an
+ * existing error message should be cleared.
+ *
+ * @return the error message
+ */
+ public String getErrorMessage();
+
+
+ /**
+ * Gets a non-error message that should be displayed
+ * to the user. Null means no message so an existing
+ * message should be cleared.
+ *
+ * @return the message
+ */
+ public String getMessage();
+
+
+ /**
+ * Creates the composite.
+ *
+ * @param parent the parent
+ */
+ public void createComposite( Composite parent );
+
+
+ /**
+ * Saves the dialog settings.
+ */
+ public void saveDialogSettings();
+
+
+ /**
+ * Sets the connection parameter page modify listener.
+ *
+ * @param listener the connection parameter page modify listener
+ */
+ public void setConnectionParameterPageModifyListener( ConnectionParameterPageModifyListener listener );
+
+
+ /**
+ * Sets the runnable context.
+ *
+ * @param runnableContext the runnable context
+ */
+ public void setRunnableContext( IRunnableContext runnableContext );
+
+
+ /**
+ * Sets the page name.
+ *
+ * @param pageName the page name
+ */
+ public void setPageName( String pageName );
+
+
+ /**
+ * Gets the page name.
+ *
+ * @return the page name
+ */
+ public String getPageName();
+
+
+ /**
+ * Sets the page description.
+ *
+ * @param pageDescription the page description
+ */
+ public void setPageDescription( String pageDescription );
+
+
+ /**
+ * Gets the page description.
+ *
+ * @return the page description
+ */
+ public String getPageDescription();
+
+
+ /**
+ * Sets the focus.
+ */
+ public void setFocus();
+
+
+ /**
+ * The implementing class must return true if important
+ * connection parameters were modified that require a
+ * reconnection to take effect.
+ *
+ * @return true if a reconnection if required
+ */
+ public boolean isReconnectionRequired();
+
+
+ /**
+ * The implementing class must return true if any
+ * parameter was modified.
+ *
+ * @return true, if parameters were modifed
+ */
+ public boolean areParametersModifed();
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPageManager.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPageManager.java
new file mode 100644
index 0000000..6fa7c8f
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPageManager.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+
+
+/**
+ * The ConnectionParameterPageManager manages the {@link ConnectionParameterPage}s.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionParameterPageManager
+{
+
+ /**
+ * Gets the connection parameter pages by searching for connection parameter page
+ * extensions.
+ *
+ * @return the connection parameter pages
+ */
+ public static ConnectionParameterPage[] getConnectionParameterPages()
+ {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry
+ .getExtensionPoint( "org.apache.directory.studio.connectionparameterpages" );
+ IConfigurationElement[] members = extensionPoint.getConfigurationElements();
+ Collection<ConnectionParameterPage> pageCollection = new ArrayList<ConnectionParameterPage>();
+
+ // For each extension:
+ for ( int m = 0; m < members.length; m++ )
+ {
+ IConfigurationElement member = members[m];
+ try
+ {
+ ConnectionParameterPage page = ( ConnectionParameterPage ) member.createExecutableExtension( "class" );
+ page.setPageName( member.getAttribute( "name" ) );
+ page.setPageDescription( member.getAttribute( "description" ) );
+ pageCollection.add( page );
+ }
+ catch ( Exception e )
+ {
+ ConnectionUIPlugin.getDefault().getLog().log(
+ new Status( IStatus.ERROR, ConnectionUIPlugin.PLUGIN_ID, 1,
+ "Unable to create connection parameter page " + member.getAttribute( "class" ), e ) );
+ }
+ }
+
+ ConnectionParameterPage[] pages = pageCollection.toArray( new ConnectionParameterPage[0] );
+ return pages;
+ }
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPageModifyListener.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPageModifyListener.java
new file mode 100644
index 0000000..5914243
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPageModifyListener.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui;
+
+
+import org.apache.directory.studio.connection.core.ConnectionParameter;
+
+
+/**
+ * A ConnectionPageModifyListener listens for modifications of the
+ * ConnectionPageWrapper.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ConnectionParameterPageModifyListener
+{
+
+ /**
+ * Indicates that the connection parameter page was modified.
+ */
+ public void connectionParameterPageModified();
+
+
+ /**
+ * Gets the test connection parameters.
+ *
+ * @return the test connection parameters
+ */
+ public ConnectionParameter getTestConnectionParameters();
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIConstants.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIConstants.java
new file mode 100644
index 0000000..6b58d20
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIConstants.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui;
+
+public interface ConnectionUIConstants
+{
+
+ public static final String DIALOGSETTING_KEY_HOST_HISTORY = "hostHistory";
+
+ public static final String DIALOGSETTING_KEY_PORT_HISTORY = "portHistory";
+
+ public static final String DIALOGSETTING_KEY_PRINCIPAL_HISTORY = "principalHistory";
+
+
+ public static final String IMG_CONNECTION_ADD = "resources/icons/connection_add.gif";
+
+ public static final String IMG_CONNECTION_CONNECTED = "resources/icons/connection_connected.gif";
+
+ public static final String IMG_CONNECTION_DISCONNECTED = "resources/icons/connection_disconnected.gif";
+
+ public static final String IMG_CONNECTION_CONNECT = "resources/icons/connection_connect.gif";
+
+ public static final String IMG_CONNECTION_DISCONNECT = "resources/icons/connection_disconnect.gif";
+
+ public static final String IMG_CONNECTION_WIZARD = "resources/icons/connection_wizard.gif";
+
+ public static final String IMG_PULLDOWN = "resources/icons/pulldown.gif";
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIPlugin.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIPlugin.java
new file mode 100644
index 0000000..f65c5b2
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIPlugin.java
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui;
+
+
+import java.net.URL;
+
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.event.EventRunner;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class ConnectionUIPlugin extends AbstractUIPlugin
+{
+
+ /** The Constant PLUGIN_ID. */
+ public static final String PLUGIN_ID = "org.apache.directory.studio.connection.ui";
+
+ /** The shared plugin instande. */
+ private static ConnectionUIPlugin plugin;
+
+ /** The event dispatcher */
+ private ExceptionHandler exceptionHandler;
+
+ /** The event runner. */
+ private EventRunner eventRunner;
+
+
+ /**
+ * The constructor
+ */
+ public ConnectionUIPlugin()
+ {
+ plugin = this;
+ }
+
+
+ /**
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start( BundleContext context ) throws Exception
+ {
+ super.start( context );
+
+ if ( exceptionHandler == null )
+ {
+ exceptionHandler = new ExceptionHandler();
+ }
+
+ if ( eventRunner == null )
+ {
+ eventRunner = new UiThreadEventRunner();
+ }
+
+ ConnectionCorePlugin.getDefault().setAuthHandler( new UIAuthHandler() );
+ }
+
+
+ /**
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop( BundleContext context ) throws Exception
+ {
+ plugin = null;
+ super.stop( context );
+
+ if ( exceptionHandler != null )
+ {
+ exceptionHandler = null;
+ }
+
+ if ( eventRunner != null )
+ {
+ eventRunner = null;
+ }
+ }
+
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static ConnectionUIPlugin getDefault()
+ {
+ return plugin;
+ }
+
+
+ /**
+ * Gets the exception handler.
+ *
+ * @return the exception handler
+ */
+ public ExceptionHandler getExceptionHandler()
+ {
+ return exceptionHandler;
+ }
+
+
+ /**
+ * Use this method to get SWT images. Use the IMG_ constants from
+ * BrowserWidgetsConstants for the key.
+ *
+ * @param key
+ * The key (relative path to the image im filesystem)
+ * @return The image discriptor or null
+ */
+ public ImageDescriptor getImageDescriptor( String key )
+ {
+ if ( key != null )
+ {
+ URL url = FileLocator.find( getBundle(), new Path( key ), null );
+ if ( url != null )
+ return ImageDescriptor.createFromURL( url );
+ else
+ return null;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+
+ /**
+ * Use this method to get SWT images. Use the IMG_ constants from
+ * BrowserWidgetsConstants for the key. A ImageRegistry is used to manage the
+ * the key->Image mapping.
+ * <p>
+ * Note: Don't dispose the returned SWT Image. It is disposed
+ * automatically when the plugin is stopped.
+ *
+ * @param key
+ * The key (relative path to the image im filesystem)
+ * @return The SWT Image or null
+ */
+ public Image getImage( String key )
+ {
+ Image image = getImageRegistry().get( key );
+ if ( image == null )
+ {
+ ImageDescriptor id = getImageDescriptor( key );
+ if ( id != null )
+ {
+ image = id.createImage();
+ getImageRegistry().put( key, image );
+ }
+ }
+ return image;
+ }
+
+
+ /**
+ * Gets the event runner.
+ *
+ * @return the event runner
+ */
+ public EventRunner getEventRunner()
+ {
+ return eventRunner;
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ExceptionHandler.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ExceptionHandler.java
new file mode 100644
index 0000000..7841072
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ExceptionHandler.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui;
+
+
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ * This class is used to handle exceptions thrown at runtime.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ExceptionHandler
+{
+ /**
+ * Opens an error dialog to display the given error.
+ *
+ * @param status
+ * the error to show to the user
+ */
+ public void handleException( IStatus status )
+ {
+ display( null, status );
+ }
+
+
+ /**
+ * Opens an error dialog to display the given error.
+ *
+ * @param message
+ * the message to show in this dialog, or null to indicate that the error's message should be shown as the primary message
+ * @param status
+ * the error to show to the user
+ */
+ private void display( final String message, final IStatus status )
+ {
+ Runnable runnable = new Runnable()
+ {
+ public void run()
+ {
+ ErrorDialog.openError( Display.getDefault().getActiveShell(), "Error", message, status );
+ }
+ };
+ Display.getDefault().asyncExec( runnable );
+ ConnectionCorePlugin.getDefault().getLog().log( status );
+ }
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/UIAuthHandler.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/UIAuthHandler.java
new file mode 100644
index 0000000..85e2e06
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/UIAuthHandler.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui;
+
+
+import org.apache.directory.studio.connection.core.ConnectionParameter;
+import org.apache.directory.studio.connection.core.Credentials;
+import org.apache.directory.studio.connection.core.IAuthHandler;
+import org.apache.directory.studio.connection.core.ICredentials;
+import org.apache.directory.studio.connection.ui.dialogs.CredentialsDialog;
+import org.eclipse.ui.PlatformUI;
+
+
+public class UIAuthHandler implements IAuthHandler
+{
+
+ public ICredentials getCredentials( final ConnectionParameter connectionParameter )
+ {
+
+ if ( connectionParameter.getBindPrincipal() == null || "".equals( connectionParameter.getBindPrincipal() ) )
+ {
+ return new Credentials( "", "", connectionParameter );
+ }
+ else if ( connectionParameter.getBindPassword() != null && !"".equals( connectionParameter.getBindPassword() ) )
+ {
+ return new Credentials( connectionParameter.getBindPrincipal(), connectionParameter.getBindPassword(),
+ connectionParameter );
+ }
+ else
+ {
+ final String[] pw = new String[1];
+ PlatformUI.getWorkbench().getDisplay().syncExec( new Runnable()
+ {
+ public void run()
+ {
+ CredentialsDialog dialog = new CredentialsDialog( PlatformUI.getWorkbench().getDisplay()
+ .getActiveShell(), "Enter Password for '" + connectionParameter.getName() + "'",
+ "Please enter password of user " + connectionParameter.getBindPrincipal() + ":", "", null );
+ if ( dialog.open() == CredentialsDialog.OK )
+ {
+ pw[0] = dialog.getValue();
+ }
+ else
+ {
+ pw[0] = null;
+ }
+ }
+ } );
+
+ if ( pw[0] == null )
+ {
+ return null;
+ }
+ else
+ {
+ return new Credentials( connectionParameter.getBindPrincipal(), pw[0], connectionParameter );
+ }
+ }
+
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/UiThreadEventRunner.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/UiThreadEventRunner.java
new file mode 100644
index 0000000..da06f01
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/UiThreadEventRunner.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.connection.ui;
+
+import org.apache.directory.studio.connection.core.event.EventRunnable;
+import org.apache.directory.studio.connection.core.event.EventRunner;
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ * Implementation of {@link EventRunner} that executes an {@link EventRunnable}
+ * withing the SWT UI thread.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class UiThreadEventRunner implements EventRunner
+{
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation executes the given {@link EventRunnable} within
+ * the SWT UI thread.
+ */
+ public void execute( EventRunnable runnable )
+ {
+ Display.getDefault().asyncExec( runnable );
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/ActionHandlerManager.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/ActionHandlerManager.java
new file mode 100644
index 0000000..c313d90
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/ActionHandlerManager.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.connection.ui.actions;
+
+/**
+ * A ActionHandlerManager activates and deactives the action handlers.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ActionHandlerManager
+{
+
+ /**
+ * Deactivates global action handlers.
+ */
+ public void deactivateGlobalActionHandlers();
+
+
+ /**
+ * Activates global action handlers.
+ */
+ public void activateGlobalActionHandlers();
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java
new file mode 100644
index 0000000..a221a87
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.actions;
+
+
+import org.apache.directory.studio.connection.core.jobs.CloseConnectionsJob;
+import org.apache.directory.studio.connection.ui.ConnectionUIConstants;
+import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * This action closes the selected Connection(s).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CloseConnectionAction extends StudioAction
+{
+
+ /**
+ * Creates a new instance of CloseConnectionAction.
+ */
+ public CloseConnectionAction()
+ {
+ super();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.actions.StudioAction#run()
+ */
+ public void run()
+ {
+ CloseConnectionsJob ccj = new CloseConnectionsJob( getSelectedConnections() );
+ ccj.execute();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.actions.StudioAction#getText()
+ */
+ public String getText()
+ {
+ return getSelectedConnections().length > 1 ? "Close Connections" : "Close Connection";
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.actions.StudioAction#getImageDescriptor()
+ */
+ public ImageDescriptor getImageDescriptor()
+ {
+ return ConnectionUIPlugin.getDefault().getImageDescriptor( ConnectionUIConstants.IMG_CONNECTION_DISCONNECT );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.actions.StudioAction#getCommandId()
+ */
+ public String getCommandId()
+ {
+ return null;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.actions.StudioAction#isEnabled()
+ */
+ public boolean isEnabled()
+ {
+ boolean canClose = false;
+ for ( int i = 0; i < getSelectedConnections().length; i++ )
+ {
+ if ( getSelectedConnections()[i].getJNDIConnectionWrapper().isConnected() )
+ {
+ canClose = true;
+ break;
+ }
+ }
+ return getSelectedConnections().length > 0 && canClose;
+ }
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/ConnectionViewActionProxy.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/ConnectionViewActionProxy.java
new file mode 100644
index 0000000..e89ad04
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/ConnectionViewActionProxy.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.actions;
+
+
+import org.eclipse.jface.viewers.Viewer;
+
+
+/**
+ * The ConnectionViewActionProxy is a proxy for a real action.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionViewActionProxy extends StudioActionProxy
+{
+
+ /**
+ * Creates a new instance of ConnectionViewActionProxy.
+ *
+ * @param viewer the viewer
+ * @param actionHandlerManager the action handler manager,
+ * used to deactivate and activate the action handlers and key bindings
+ * @param action the real action
+ */
+ public ConnectionViewActionProxy( Viewer viewer, ActionHandlerManager actionHandlerManager, StudioAction action )
+ {
+ super( viewer, actionHandlerManager, action );
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CopyAction.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CopyAction.java
new file mode 100644
index 0000000..cc85bcf
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CopyAction.java
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.actions;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.ui.dnd.ConnectionTransfer;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
+
+
+/**
+ * This class implements the Copy Action
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CopyAction extends StudioAction
+{
+ private StudioActionProxy pasteActionProxy;
+
+
+ /**
+ * Creates a new instance of CopyAction.
+ *
+ * @param pasteActionProxy
+ * the associated Paste Action
+ */
+ public CopyAction( StudioActionProxy pasteActionProxy )
+ {
+ super();
+ this.pasteActionProxy = pasteActionProxy;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getText()
+ {
+
+ // connection
+ Connection[] connections = getConnections();
+ if ( connections != null )
+ {
+ return connections.length > 1 ? "Copy Connections" : "Copy Connection";
+ }
+
+ return "Copy";
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public ImageDescriptor getImageDescriptor()
+ {
+ return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor( ISharedImages.IMG_TOOL_COPY );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getCommandId()
+ {
+ return IWorkbenchActionDefinitionIds.COPY;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void run()
+ {
+ Connection[] connections = getConnections();
+
+ // connection
+ if ( connections != null )
+ {
+ copyToClipboard( new Object[]
+ { connections }, new Transfer[]
+ { ConnectionTransfer.getInstance() } );
+ }
+
+ // update paste action
+ if ( pasteActionProxy != null )
+ {
+ pasteActionProxy.updateAction();
+ }
+ }
+
+
+ /**
+ * Copies data to Clipboard
+ *
+ * @param data
+ * the data to be set in the clipboard
+ * @param dataTypes
+ * the transfer agents that will convert the data to its platform specific format;
+ * each entry in the data array must have a corresponding dataType
+ */
+ public static void copyToClipboard( Object[] data, Transfer[] dataTypes )
+ {
+ Clipboard clipboard = null;
+ try
+ {
+ clipboard = new Clipboard( Display.getCurrent() );
+ clipboard.setContents( data, dataTypes );
+ }
+ finally
+ {
+ if ( clipboard != null )
+ clipboard.dispose();
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isEnabled()
+ {
+
+ // connection
+ if ( getConnections() != null )
+ {
+ return true;
+ }
+
+ else
+ {
+ return false;
+ }
+ }
+
+
+ /**
+ * Get the Connections
+ *
+ * @return
+ * the Connections
+ */
+ private Connection[] getConnections()
+ {
+
+ if ( getSelectedConnections().length > 0 )
+ {
+ return getSelectedConnections();
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/DeleteAction.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/DeleteAction.java
new file mode 100644
index 0000000..e7a0aaf
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/DeleteAction.java
@@ -0,0 +1,182 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.actions;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCoreConstants;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
+
+
+/**
+ * This Action implements the Delete Action. It deletes Connections, Entries, Searches, Bookmarks, Attributes or Values.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class DeleteAction extends StudioAction
+{
+ /**
+ * {@inheritDoc}
+ */
+ public String getText()
+ {
+ try
+ {
+ Connection[] connections = getConnections();
+
+ if ( connections.length > 0 )
+ {
+ return connections.length > 1 ? "Delete Connections" : "Delete Connection";
+ }
+ }
+ catch ( Exception e )
+ {
+ }
+
+ return "Delete";
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public ImageDescriptor getImageDescriptor()
+ {
+ return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor( ISharedImages.IMG_TOOL_DELETE );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getCommandId()
+ {
+ return IWorkbenchActionDefinitionIds.DELETE;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void run()
+ {
+ try
+ {
+ Connection[] connections = getConnections();
+
+ StringBuffer message = new StringBuffer();
+
+ if ( connections.length > 0 )
+ {
+ if ( connections.length <= 5 )
+ {
+ message.append( connections.length == 1 ? "Are your sure to delete the following connection?"
+ : "Are your sure to delete the following connections?" );
+ for ( int i = 0; i < connections.length; i++ )
+ {
+ message.append( ConnectionCoreConstants.LINE_SEPARATOR );
+ message.append( " - " );
+ message.append( connections[i].getName() );
+ }
+ }
+ else
+ {
+ message.append( "Are your sure to delete the selected connections?" );
+ }
+ message.append( ConnectionCoreConstants.LINE_SEPARATOR );
+ message.append( ConnectionCoreConstants.LINE_SEPARATOR );
+ }
+
+ if ( message.length() == 0 || MessageDialog.openConfirm( getShell(), getText(), message.toString() ) )
+ {
+
+ if ( connections.length > 0 )
+ {
+ deleteConnections( connections );
+ }
+ }
+ }
+ catch ( Exception e )
+ {
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isEnabled()
+ {
+ try
+ {
+ Connection[] connections = getConnections();
+ return connections.length > 0;
+ }
+ catch ( Exception e )
+ {
+ // e.printStackTrace();
+ return false;
+ }
+ }
+
+
+ /**
+ * Gets the Connections
+ *
+ * @return
+ * the Connections
+ * @throws Exception
+ * when a is opened
+ */
+ protected Connection[] getConnections() throws Exception
+ {
+ for ( int i = 0; i < getSelectedConnections().length; i++ )
+ {
+ if ( getSelectedConnections()[i].getJNDIConnectionWrapper().isConnected() )
+ {
+ throw new Exception();
+ }
+ }
+
+ return getSelectedConnections();
+ }
+
+
+ /**
+ * Deletes Connections
+ *
+ * @param connections
+ * the Connections to delete
+ */
+ protected void deleteConnections( Connection[] connections )
+ {
+ for ( int i = 0; i < connections.length; i++ )
+ {
+ ConnectionCorePlugin.getDefault().getConnectionManager().removeConnection( connections[i] );
+ }
+ }
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/NewConnectionAction.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/NewConnectionAction.java
new file mode 100644
index 0000000..e687f6c
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/NewConnectionAction.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.actions;
+
+
+import org.apache.directory.studio.connection.ui.ConnectionUIConstants;
+import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
+import org.apache.directory.studio.connection.ui.wizards.NewConnectionWizard;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.WizardDialog;
+
+
+/**
+ * This Action launches the New Connection Wizard.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewConnectionAction extends StudioAction
+{
+ /**
+ * Creates a new instance of NewConnectionAction.
+ */
+ public NewConnectionAction()
+ {
+ super();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void run()
+ {
+ NewConnectionWizard wizard = new NewConnectionWizard();
+ WizardDialog dialog = new WizardDialog( getShell(), wizard );
+ dialog.setBlockOnOpen( true );
+ dialog.create();
+ dialog.open();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getText()
+ {
+ return "New Connection...";
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public ImageDescriptor getImageDescriptor()
+ {
+ return ConnectionUIPlugin.getDefault().getImageDescriptor( ConnectionUIConstants.IMG_CONNECTION_ADD );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getCommandId()
+ {
+ return null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isEnabled()
+ {
+ return true;
+ }
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java
new file mode 100644
index 0000000..f5b266f
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.actions;
+
+
+import org.apache.directory.studio.connection.core.jobs.OpenConnectionsJob;
+import org.apache.directory.studio.connection.ui.ConnectionUIConstants;
+import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+
+/**
+ * This Action opens a Connection.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class OpenConnectionAction extends StudioAction
+{
+ /**
+ * Creates a new instance of OpenConnectionAction.
+ */
+ public OpenConnectionAction()
+ {
+ super();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void run()
+ {
+ OpenConnectionsJob ocj = new OpenConnectionsJob( getSelectedConnections() );
+ ocj.execute();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getText()
+ {
+ return getSelectedConnections().length > 1 ? "Open Connections" : "Open Connection";
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public ImageDescriptor getImageDescriptor()
+ {
+ return ConnectionUIPlugin.getDefault().getImageDescriptor( ConnectionUIConstants.IMG_CONNECTION_CONNECT );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getCommandId()
+ {
+ return null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isEnabled()
+ {
+ boolean canOpen = false;
+ for ( int i = 0; i < getSelectedConnections().length; i++ )
+ {
+ if ( !getSelectedConnections()[i].getJNDIConnectionWrapper().isConnected() )
+ {
+ canOpen = true;
+ break;
+ }
+ }
+ return getSelectedConnections().length > 0 && canOpen;
+ }
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/PasteAction.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/PasteAction.java
new file mode 100644
index 0000000..1282ec1
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/PasteAction.java
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.actions;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.ui.dnd.ConnectionTransfer;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
+
+
+/**
+ * This class implements the Paste Action.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class PasteAction extends StudioAction
+{
+ /**
+ * Creates a new instance of PasteAction.
+ */
+ public PasteAction()
+ {
+ super();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getText()
+ {
+ // connection
+ Connection[] connections = getConnectionsToPaste();
+ if ( connections != null )
+ {
+ return connections.length > 1 ? "Paste Connections" : "Paste Connection";
+ }
+
+ return "Paste";
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public ImageDescriptor getImageDescriptor()
+ {
+ return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor( ISharedImages.IMG_TOOL_PASTE );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getCommandId()
+ {
+ return IWorkbenchActionDefinitionIds.PASTE;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isEnabled()
+ {
+ // connection
+ if ( getConnectionsToPaste() != null )
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void run()
+ {
+ // connection
+ Connection[] connections = getConnectionsToPaste();
+ if ( connections != null )
+ {
+ for ( int i = 0; i < connections.length; i++ )
+ {
+ Connection newConnection = ( Connection ) connections[i].clone();
+ ConnectionCorePlugin.getDefault().getConnectionManager().addConnection( newConnection );
+ }
+ return;
+ }
+ }
+
+
+ /**
+ * Conditions: - a connection is selected - there are connections in
+ * clipboard
+ *
+ * @return the connections to paste
+ */
+ private Connection[] getConnectionsToPaste()
+ {
+ if ( getSelectedConnections().length > 0 )
+ {
+
+ Object content = this.getFromClipboard( ConnectionTransfer.getInstance() );
+ if ( content != null && content instanceof Connection[] )
+ {
+ Connection[] connections = ( Connection[] ) content;
+ return connections;
+ }
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Retrieve the data of the specified type currently available on the system clipboard.
+ *
+ * @param dataType
+ * the transfer agent for the type of data being requested
+ * @return
+ * the data obtained from the clipboard or null if no data of this type is available
+ */
+ protected Object getFromClipboard( Transfer dataType )
+ {
+ Clipboard clipboard = null;
+ try
+ {
+ clipboard = new Clipboard( Display.getCurrent() );
+ return clipboard.getContents( dataType );
+ }
+ finally
+ {
+ if ( clipboard != null )
+ clipboard.dispose();
+ }
+ }
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/PropertiesAction.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/PropertiesAction.java
new file mode 100644
index 0000000..7e3faf1
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/PropertiesAction.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.actions;
+
+
+import org.apache.directory.studio.connection.core.Utils;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
+
+
+/**
+ * This Action opens the Property Dialog for a given object.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class PropertiesAction extends StudioAction
+{
+ /**
+ * Creates a new instance of PropertiesAction.
+ */
+ public PropertiesAction()
+ {
+ super();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getText()
+ {
+ return "Properties";
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public ImageDescriptor getImageDescriptor()
+ {
+ return null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getCommandId()
+ {
+ return IWorkbenchActionDefinitionIds.PROPERTIES;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isEnabled()
+ {
+
+ return getSelectedConnections().length == 1;
+
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void run()
+ {
+ IAdaptable element = null;
+ String pageId = null;
+ String title = null;
+
+ if ( getSelectedConnections().length == 1 )
+ {
+ element = ( IAdaptable ) getSelectedConnections()[0];
+ pageId = "org.apache.directory.studio.connection.ui.properties.ConnectionPropertyPage";
+ title = getSelectedConnections()[0].getName();
+ }
+
+ if ( element != null )
+ {
+ PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn( getShell(), element, pageId, null, null );
+ if ( dialog != null )
+ title = Utils.shorten( title, 30 );
+ dialog.getShell().setText( "Properties for '" + title + "'" );
+ dialog.open();
+
+ }
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/RenameAction.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/RenameAction.java
new file mode 100644
index 0000000..5fe92cf
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/RenameAction.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.actions;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
+
+
+/**
+ * This Action renames Connections, Entries, Searches, or Bookmarks.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class RenameAction extends StudioAction
+{
+ /**
+ * Creates a new instance of RenameAction.
+ *
+ */
+ public RenameAction()
+ {
+ super();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getText()
+ {
+
+ Connection[] connections = getConnections();
+
+ if ( connections.length == 1 )
+ {
+ return "Rename Connection...";
+ }
+ else
+ {
+ return "Rename";
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public ImageDescriptor getImageDescriptor()
+ {
+ return null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getCommandId()
+ {
+ return IWorkbenchActionDefinitionIds.RENAME;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void run()
+ {
+ Connection[] connections = getConnections();
+
+ if ( connections.length == 1 )
+ {
+ renameConnection( connections[0] );
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isEnabled()
+ {
+ try
+ {
+ Connection[] connections = getConnections();
+ return connections.length == 1;
+ }
+ catch ( Exception e )
+ {
+ return false;
+ }
+ }
+
+
+ /**
+ * Gets the Connections
+ *
+ * @return
+ * the Connections
+ */
+ protected Connection[] getConnections()
+ {
+ if ( getSelectedConnections().length == 1 )
+ {
+ return getSelectedConnections();
+ }
+ else
+ {
+ return new Connection[0];
+ }
+ }
+
+
+ /**
+ * Renames a Connection.
+ *
+ * @param connection
+ * the Connection to rename
+ */
+ protected void renameConnection( final Connection connection )
+ {
+ IInputValidator validator = new IInputValidator()
+ {
+ public String isValid( String newName )
+ {
+ if ( connection.getName().equals( newName ) )
+ return null;
+ else if ( ConnectionCorePlugin.getDefault().getConnectionManager().getConnectionByName( newName ) != null )
+ return "A connection with this name already exists.";
+ else
+ return null;
+ }
+ };
+
+ InputDialog dialog = new InputDialog( getShell(), "Rename Connection", "New name:", connection.getName(),
+ validator );
+
+ dialog.open();
+ String newName = dialog.getValue();
+ if ( newName != null )
+ {
+ connection.setName( newName );
+ }
+ }
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/SelectionUtils.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/SelectionUtils.java
new file mode 100644
index 0000000..6d14c9a
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/SelectionUtils.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.actions;
+
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+
+/**
+ * The SelectionUtils are used to extract specific beans from the current
+ * selection (org.eclipse.jface.viewers.ISelection).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class SelectionUtils
+{
+
+ /**
+ * Gets the Strings contained in the given selection.
+ *
+ * @param selection the selection
+ * @return an array with Strings, may be empty.
+ */
+ public static String[] getProperties( ISelection selection )
+ {
+ List<Object> list = getTypes( selection, String.class );
+ return list.toArray( new String[list.size()] );
+ }
+
+
+ /**
+ * Gets all beans of the requested type contained in the given selection.
+ *
+ * @param selection the selection
+ * @param type the requested type
+ * @return a list containg beans of the requesten type
+ */
+ private static List<Object> getTypes( ISelection selection, Class type )
+ {
+ List<Object> list = new ArrayList<Object>();
+ if ( selection instanceof IStructuredSelection )
+ {
+ IStructuredSelection structuredSelection = ( IStructuredSelection ) selection;
+ Iterator it = structuredSelection.iterator();
+ while ( it.hasNext() )
+ {
+ Object o = it.next();
+ if ( type.isInstance( o ) )
+ {
+ list.add( o );
+ }
+ }
+ }
+ return list;
+ }
+
+
+ /**
+ * Gets the Connection beans contained in the given selection.
+ *
+ * @param selection the selection
+ * @return an array with Connection beans, may be empty.
+ */
+ public static Connection[] getConnections( ISelection selection )
+ {
+ List<Object> list = getTypes( selection, Connection.class );
+ return list.toArray( new Connection[list.size()] );
+ }
+
+
+ /**
+ * Gets the objects contained in the given selection.
+ *
+ * @param selection the selection
+ * @return an array with object, may be empty.
+ */
+ public static Object[] getObjects( ISelection selection )
+ {
+ List<Object> list = getTypes( selection, Object.class );
+ return list.toArray( new Object[list.size()] );
+ }
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioAction.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioAction.java
new file mode 100644
index 0000000..8ee568e
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioAction.java
@@ -0,0 +1,236 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.actions;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This abstract class must be extended by each Action related to the Browser.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class StudioAction implements IWorkbenchWindowActionDelegate
+{
+ /** The selected Connections */
+ private Connection[] selectedConnections;
+
+ /** The input */
+ private Object input;
+
+
+ /**
+ * Creates a new instance of BrowserAction.
+ */
+ protected StudioAction()
+ {
+ this.init();
+ }
+
+
+ /**
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public void init( IWorkbenchWindow window )
+ {
+ this.init();
+ }
+
+
+ /**
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run( IAction action )
+ {
+ this.run();
+ }
+
+
+ /**
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged( IAction action, ISelection selection )
+ {
+ setSelectedConnections( SelectionUtils.getConnections( selection ) );
+
+ action.setEnabled( this.isEnabled() );
+ action.setText( this.getText() );
+ action.setToolTipText( this.getText() );
+ }
+
+
+ /**
+ * Returns the text for this action.
+ * <p>
+ * This method is associated with the <code>TEXT</code> property;
+ * property change events are reported when its value changes.
+ * </p>
+ *
+ * @return the text, or <code>null</code> if none
+ */
+ public abstract String getText();
+
+
+ /**
+ * Returns the image for this action as an image descriptor.
+ * <p>
+ * This method is associated with the <code>IMAGE</code> property;
+ * property change events are reported when its value changes.
+ * </p>
+ *
+ * @return the image, or <code>null</code> if this action has no image
+ */
+ public abstract ImageDescriptor getImageDescriptor();
+
+
+ /**
+ * Returns the command identifier.
+ *
+ * @return
+ * the command identifier
+ */
+ public abstract String getCommandId();
+
+
+ /**
+ * Returns whether this action is enabled.
+ * <p>
+ * This method is associated with the <code>ENABLED</code> property;
+ * property change events are reported when its value changes.
+ * </p>
+ *
+ * @return <code>true</code> if enabled, and
+ * <code>false</code> if disabled
+ */
+ public abstract boolean isEnabled();
+
+
+ /**
+ * Runs this action.
+ * Each action implementation must define the steps needed to carry out this action.
+ * The default implementation of this method in <code>Action</code>
+ * does nothing.
+ */
+ public abstract void run();
+
+
+ /**
+ * Initializes this action
+ */
+ private void init()
+ {
+ this.selectedConnections = new Connection[0];
+
+ this.input = null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void dispose()
+ {
+ this.selectedConnections = new Connection[0];
+
+ this.input = null;
+ }
+
+
+ /**
+ * Returns the current active shell
+ *
+ * @return
+ * the current active shell
+ */
+ protected Shell getShell()
+ {
+ return PlatformUI.getWorkbench().getDisplay().getActiveShell();
+ }
+
+
+ /**
+ * This method is fired when a Connection is updated.
+ *
+ * @param connection
+ * the connection
+ */
+ public void connectionUpdated( Connection connection )
+ {
+ }
+
+
+ /**
+ * Gets the selected Connections.
+ *
+ * @return
+ * the selected Connections
+ */
+ public Connection[] getSelectedConnections()
+ {
+ return selectedConnections;
+ }
+
+
+ /**
+ * Sets the selected Connections.
+ *
+ * @param selectedConnections
+ * the selected Connections to set
+ */
+ public void setSelectedConnections( Connection[] selectedConnections )
+ {
+ this.selectedConnections = selectedConnections;
+ }
+
+
+ /**
+ * Gets the input.
+ *
+ * @return
+ * the input
+ */
+ public Object getInput()
+ {
+ return input;
+ }
+
+
+ /**
+ * Sets the input.
+ *
+ * @param input
+ * the input to set
+ */
+ public void setInput( Object input )
+ {
+ this.input = input;
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioActionProxy.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioActionProxy.java
new file mode 100644
index 0000000..87c47eb
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/StudioActionProxy.java
@@ -0,0 +1,249 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.actions;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+import org.apache.directory.studio.connection.core.event.ConnectionUpdateListener;
+import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+
+
+/**
+ * Proxy class for actions. The proxy class registers for modification events and
+ * updates the real actions on every modificaton.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class StudioActionProxy extends Action implements ISelectionChangedListener, ConnectionUpdateListener
+{
+
+ /** The action handler manager, used to deactivate and activate the action handlers and key bindings. */
+ private ActionHandlerManager actionHandlerManager;
+
+ /** The real action. */
+ protected StudioAction action;
+
+ /** The selection provider. */
+ protected ISelectionProvider selectionProvider;
+
+
+ /**
+ * Creates a new instance of StudioActionProxy.
+ *
+ * @param selectionProvider the selection provider
+ * @param actionHandlerManager the action handler manager
+ * @param action the action
+ * @param style the style
+ */
+ protected StudioActionProxy( ISelectionProvider selectionProvider, ActionHandlerManager actionHandlerManager,
+ StudioAction action, int style )
+ {
+ super( action.getText(), style );
+ this.selectionProvider = selectionProvider;
+ this.actionHandlerManager = actionHandlerManager;
+ this.action = action;
+
+ super.setImageDescriptor( action.getImageDescriptor() );
+ super.setActionDefinitionId( action.getCommandId() );
+
+ selectionProvider.addSelectionChangedListener( this );
+
+ ConnectionEventRegistry.addConnectionUpdateListener( this, ConnectionUIPlugin.getDefault().getEventRunner() );
+
+ updateAction();
+ }
+
+
+ /**
+ * Creates a new instance of StudioActionProxy.
+ *
+ * @param selectionProvider the selection provider
+ * @param actionHandlerManager the action handler manager
+ * @param action the action
+ */
+ protected StudioActionProxy( ISelectionProvider selectionProvider, ActionHandlerManager actionHandlerManager,
+ StudioAction action )
+ {
+ this( selectionProvider, actionHandlerManager, action, Action.AS_PUSH_BUTTON );
+ }
+
+
+ /**
+ * Disposes this action proxy.
+ */
+ public void dispose()
+ {
+ ConnectionEventRegistry.removeConnectionUpdateListener( this );
+ selectionProvider.removeSelectionChangedListener( this );
+
+ action.dispose();
+ action = null;
+ }
+
+
+ /**
+ * Checks if is disposed.
+ *
+ * @return true, if is disposed
+ */
+ public boolean isDisposed()
+ {
+ return action == null;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionUpdated(org.apache.directory.studio.connection.core.Connection)
+ */
+ public final void connectionUpdated( Connection connection )
+ {
+ if ( !isDisposed() )
+ {
+ action.connectionUpdated( connection );
+ updateAction();
+ }
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionAdded(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionAdded( Connection connection )
+ {
+ connectionUpdated( connection );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionRemoved(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionRemoved( Connection connection )
+ {
+ connectionUpdated( connection );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionOpened(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionOpened( Connection connection )
+ {
+ connectionUpdated( connection );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionClosed(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionClosed( Connection connection )
+ {
+ connectionUpdated( connection );
+ }
+
+
+ /**
+ * Input changed.
+ *
+ * @param input the input
+ */
+ public void inputChanged( Object input )
+ {
+ if ( !isDisposed() )
+ {
+ action.setInput( input );
+ selectionChanged( new SelectionChangedEvent( this.selectionProvider, new StructuredSelection() ) );
+ // updateAction();
+ }
+ }
+
+
+ /**
+ * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+ */
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ if ( !isDisposed() )
+ {
+ ISelection selection = event.getSelection();
+ action.setSelectedConnections( SelectionUtils.getConnections( selection ) );
+ updateAction();
+ }
+ }
+
+
+ /**
+ * Updates the action.
+ */
+ public void updateAction()
+ {
+ if ( !isDisposed() )
+ {
+ setText( action.getText() );
+ setToolTipText( action.getText() );
+ setEnabled( action.isEnabled() );
+ setImageDescriptor( action.getImageDescriptor() );
+ }
+ }
+
+
+ /**
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run()
+ {
+ if ( !isDisposed() )
+ {
+ // deactivate global actions
+ if ( actionHandlerManager != null )
+ {
+ actionHandlerManager.deactivateGlobalActionHandlers();
+ }
+
+ action.run();
+
+ // activate global actions
+ if ( actionHandlerManager != null )
+ {
+ actionHandlerManager.activateGlobalActionHandlers();
+ }
+ }
+ }
+
+
+ /**
+ * Gets the real action.
+ *
+ * @return the real action
+ */
+ public StudioAction getAction()
+ {
+ return action;
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CredentialsDialog.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CredentialsDialog.java
new file mode 100644
index 0000000..b466a0e
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/CredentialsDialog.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.dialogs;
+
+
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * The CredentialsDialog is used to ask the user for credentials (paasword).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CredentialsDialog extends InputDialog
+{
+
+ /**
+ * Creates a new instance of CredentialsDialog.
+ *
+ * @param parentShell the parent shell
+ * @param dialogTitle the dialog title
+ * @param dialogMessage the dialog message
+ * @param initialValue the initial value
+ * @param validator the validator
+ */
+ public CredentialsDialog( Shell parentShell, String dialogTitle, String dialogMessage, String initialValue,
+ IInputValidator validator )
+ {
+ super( parentShell, dialogTitle, dialogMessage, initialValue, validator );
+ }
+
+
+ /**
+ * @see org.eclipse.jface.dialogs.InputDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = ( Composite ) super.createDialogArea( parent );
+ super.getText().setEchoChar( '*' );
+ return composite;
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/ConnectionTransfer.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/ConnectionTransfer.java
new file mode 100644
index 0000000..298f0e4
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dnd/ConnectionTransfer.java
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.dnd;
+
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.ConnectionManager;
+import org.eclipse.swt.dnd.ByteArrayTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.dnd.TransferData;
+
+
+/**
+ * A {@link Transfer} that could be used to transfer {@link Connection} objects.
+ * Note that only the connection id is converted to a platform specific
+ * representation, not the complete object. To convert it back to an {@link Connection}
+ * object the {@link ConnectionManager#getConnectionById(String)} method is invoked.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionTransfer extends ByteArrayTransfer
+{
+
+ /** The Constant TYPENAME. */
+ private static final String TYPENAME = "org.apache.directory.studio.ldapbrowser.connection";
+
+ /** The Constant TYPEID. */
+ private static final int TYPEID = registerType( TYPENAME );
+
+ /** The instance. */
+ private static ConnectionTransfer instance = new ConnectionTransfer();
+
+
+ /**
+ * Creates a new instance of ConnectionTransfer.
+ */
+ private ConnectionTransfer()
+ {
+ }
+
+
+ /**
+ * Gets the instance.
+ *
+ * @return the instance
+ */
+ public static ConnectionTransfer getInstance()
+ {
+ return instance;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation only accepts {@link Connection} objects.
+ * It just converts the id of the connection to the platform
+ * specific representation.
+ */
+ public void javaToNative( Object object, TransferData transferData )
+ {
+ if ( object == null || !( object instanceof Connection[] ) )
+ {
+ return;
+ }
+
+ if ( isSupportedType( transferData ) )
+ {
+ Connection[] connections = ( Connection[] ) object;
+ try
+ {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ DataOutputStream writeOut = new DataOutputStream( out );
+
+ for ( int i = 0; i < connections.length; i++ )
+ {
+ byte[] id = connections[i].getConnectionParameter().getId().getBytes();
+ writeOut.writeInt( id.length );
+ writeOut.write( id );
+ }
+
+ byte[] buffer = out.toByteArray();
+ writeOut.close();
+
+ super.javaToNative( buffer, transferData );
+
+ }
+ catch ( IOException e )
+ {
+ }
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation just converts the platform specific representation
+ * to the connection id and invokes
+ * {@link ConnectionManager#getConnectionById(String)} to get the
+ * {@link Connection} object.
+ */
+ public Object nativeToJava( TransferData transferData )
+ {
+ if ( isSupportedType( transferData ) )
+ {
+ byte[] buffer = ( byte[] ) super.nativeToJava( transferData );
+ if ( buffer == null )
+ {
+ return null;
+ }
+
+ List<Connection> connectionList = new ArrayList<Connection>();
+ try
+ {
+ ByteArrayInputStream in = new ByteArrayInputStream( buffer );
+ DataInputStream readIn = new DataInputStream( in );
+
+ do
+ {
+ if ( readIn.available() > 1 )
+ {
+ int size = readIn.readInt();
+ byte[] id = new byte[size];
+ readIn.read( id );
+ Connection connection = ConnectionCorePlugin.getDefault().getConnectionManager().getConnectionById(
+ new String( id ) );
+ connectionList.add( connection );
+ }
+ }
+ while ( readIn.available() > 1 );
+
+ readIn.close();
+ }
+ catch ( IOException ex )
+ {
+ return null;
+ }
+
+ return connectionList.toArray( new Connection[0] );
+ }
+
+ return null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected String[] getTypeNames()
+ {
+ return new String[]
+ { TYPENAME };
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected int[] getTypeIds()
+ {
+ return new int[]
+ { TYPEID };
+ }
+
+}
\ No newline at end of file
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java
new file mode 100644
index 0000000..e4deae8
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java
@@ -0,0 +1,234 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.properties;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionParameter;
+import org.apache.directory.studio.connection.core.Utils;
+import org.apache.directory.studio.connection.core.jobs.CloseConnectionsJob;
+import org.apache.directory.studio.connection.ui.ConnectionParameterPage;
+import org.apache.directory.studio.connection.ui.ConnectionParameterPageManager;
+import org.apache.directory.studio.connection.ui.ConnectionParameterPageModifyListener;
+import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.ui.dialogs.PropertyPage;
+
+
+/**
+ * The ConnectionPropertyPage displays the properties of a {@link Connection}.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionPropertyPage extends PropertyPage implements ConnectionParameterPageModifyListener
+{
+
+ /** The tab folder. */
+ private TabFolder tabFolder;
+
+ /** The tabs. */
+ private TabItem[] tabs;
+
+ /** The connection property pages. */
+ private ConnectionParameterPage[] pages;
+
+
+ /**
+ * Creates a new instance of ConnectionPropertyPage.
+ */
+ public ConnectionPropertyPage()
+ {
+ super();
+ super.noDefaultAndApplyButton();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPageModifyListener#connectionParameterPageModified()
+ */
+ public void connectionParameterPageModified()
+ {
+ validate();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPageModifyListener#getTestConnectionParameters()
+ */
+ public ConnectionParameter getTestConnectionParameters()
+ {
+ ConnectionParameter connectionParameter = new ConnectionParameter();
+ for ( int i = 0; i < pages.length; i++ )
+ {
+ pages[i].saveParameters( connectionParameter );
+ }
+ return connectionParameter;
+ }
+
+
+ /**
+ * @see org.eclipse.jface.dialogs.DialogPage#setMessage(java.lang.String)
+ */
+ public void setMessage( String message )
+ {
+ super.setMessage( message, PropertyPage.WARNING );
+ }
+
+
+ /**
+ * @see org.eclipse.jface.preference.PreferencePage#setErrorMessage(java.lang.String)
+ */
+ public void setErrorMessage( String errorMessage )
+ {
+ super.setErrorMessage( errorMessage );
+ }
+
+
+ /**
+ * Validates the dialog.
+ */
+ private void validate()
+ {
+ int index = tabFolder.getSelectionIndex();
+ ConnectionParameterPage page = index >= 0 ? pages[tabFolder.getSelectionIndex()] : null;
+ if( page != null && !page.isValid() )
+ {
+ setMessage( page.getMessage() );
+ setErrorMessage( page.getErrorMessage() );
+ setValid( false );
+ }
+ else
+ {
+ for ( int i = 0; i < pages.length; i++ )
+ {
+ if ( !pages[i].isValid() )
+ {
+ setMessage( pages[i].getMessage() );
+ setErrorMessage( pages[i].getErrorMessage() );
+ setValid( false );
+ return;
+ }
+ }
+
+ setMessage( null );
+ setErrorMessage( null );
+ setValid( true );
+
+ }
+ }
+
+
+ static Connection getConnection( Object element )
+ {
+ Connection connection = null;
+ if ( element instanceof IAdaptable )
+ {
+ connection = ( Connection ) ( ( IAdaptable ) element ).getAdapter( Connection.class );
+ }
+ return connection;
+ }
+
+
+ /**
+ * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createContents( Composite parent )
+ {
+ Connection connection = getConnection( getElement() );
+ if ( connection != null )
+ {
+ super.setMessage( "Connection " + Utils.shorten( connection.getName(), 30 ) );
+
+ pages = ConnectionParameterPageManager.getConnectionParameterPages();
+
+ tabFolder = new TabFolder( parent, SWT.TOP );
+
+ tabs = new TabItem[pages.length];
+ for ( int i = 0; i < pages.length; i++ )
+ {
+ Composite composite = new Composite( tabFolder, SWT.NONE );
+ GridLayout gl = new GridLayout( 1, false );
+ composite.setLayout( gl );
+
+ pages[i].createComposite( composite );
+ pages[i].setRunnableContext( null );
+ pages[i].setConnectionParameterPageModifyListener( this );
+ pages[i].loadParameters( connection.getConnectionParameter() );
+
+ tabs[i] = new TabItem( tabFolder, SWT.NONE );
+ tabs[i].setText( pages[i].getPageName() );
+ tabs[i].setControl( composite );
+ }
+
+ return tabFolder;
+ }
+ else {
+ Label label = BaseWidgetUtils.createLabel( parent, "No connection", 1 );
+ return label;
+ }
+ }
+
+
+ /**
+ * @see org.eclipse.jface.preference.PreferencePage#performOk()
+ */
+ public boolean performOk()
+ {
+ // get current connection parameters
+ Connection connection = ( Connection ) getConnection( getElement() );
+
+ // save modified parameters
+ boolean parametersModified = false;
+ boolean reconnectionRequired = false;
+ ConnectionParameter connectionParameter = new ConnectionParameter();
+ connectionParameter.setId( connection.getConnectionParameter().getId() );
+ for ( int i = 0; i < pages.length; i++ )
+ {
+ pages[i].saveParameters( connectionParameter );
+ pages[i].saveDialogSettings();
+ parametersModified |= pages[i].areParametersModifed();
+ reconnectionRequired |= pages[i].isReconnectionRequired();
+ }
+
+ if ( parametersModified )
+ {
+ // update connection parameters
+ connection.setConnectionParameter( connectionParameter );
+
+ if ( reconnectionRequired )
+ {
+ // close connection
+ new CloseConnectionsJob( connection ).execute();
+ }
+ }
+
+ return true;
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java
new file mode 100644
index 0000000..28439c4
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java
@@ -0,0 +1,349 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.widgets;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionParameter;
+import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
+import org.apache.directory.studio.connection.core.jobs.CheckBindJob;
+import org.apache.directory.studio.connection.ui.AbstractConnectionParameterPage;
+import org.apache.directory.studio.connection.ui.ConnectionUIConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * The AuthenticationParameterPage is used the edit the authentication parameters of a
+ * connection.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AuthenticationParameterPage extends AbstractConnectionParameterPage
+{
+
+ /** The combo to select the authentication method */
+ private Combo authenticationMethodCombo;
+
+ /** The bind user combo with the history of recently used bind users */
+ private Combo bindPrincipalCombo;
+
+ /** The text widget to input bind password */
+ private Text bindPasswordText;
+
+ /** The checkbox to choose if the bind password should be saved on disk */
+ private Button saveBindPasswordButton;
+
+ /** The button to check the authentication parameters */
+ private Button checkPrincipalPasswordAuthButton;;
+
+
+ /**
+ * Creates a new instance of AuthenticationParameterPage.
+ */
+ public AuthenticationParameterPage()
+ {
+ }
+
+
+ /**
+ * Gets the authentication method.
+ *
+ * @return the authentication method
+ */
+ private ConnectionParameter.AuthenticationMethod getAuthenticationMethod()
+ {
+ switch ( authenticationMethodCombo.getSelectionIndex() )
+ {
+ case 1:
+ return ConnectionParameter.AuthenticationMethod.SIMPLE;
+ case 2:
+ return ConnectionParameter.AuthenticationMethod.SASL_DIGEST_MD5;
+ case 3:
+ return ConnectionParameter.AuthenticationMethod.SASL_CRAM_MD5;
+ default:
+ return ConnectionParameter.AuthenticationMethod.NONE;
+ }
+ }
+
+
+ /**
+ * Gets the bind principal.
+ *
+ * @return the bind principal
+ */
+ private String getBindPrincipal()
+ {
+ return bindPrincipalCombo.getText();
+ }
+
+
+ /**
+ * Gets the bind password.
+ *
+ * @return the bind password
+ */
+ private String getBindPassword()
+ {
+ return isSaveBindPassword() ? bindPasswordText.getText() : null;
+ }
+
+
+ /**
+ * Returns true if the bind password should be saved on disk.
+ *
+ * @return true, if the bind password should be saved on disk
+ */
+ public boolean isSaveBindPassword()
+ {
+ return saveBindPasswordButton.getSelection();
+ }
+
+
+ /**
+ * Gets a temporary connection with all conection parameter
+ * entered in this page.
+ *
+ * @return a test connection
+ */
+ private Connection getTestConnection()
+ {
+ ConnectionParameter cp = connectionParameterPageModifyListener.getTestConnectionParameters();
+ Connection conn = new Connection( cp );
+ return conn;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#createComposite(org.eclipse.swt.widgets.Composite)
+ */
+ public void createComposite( Composite parent )
+ {
+ Composite composite1 = BaseWidgetUtils.createColumnContainer( parent, 1, 1 );
+
+ Group group1 = BaseWidgetUtils.createGroup( composite1, "Authentication Method", 1 );
+ Composite groupComposite = BaseWidgetUtils.createColumnContainer( group1, 1, 1 );
+
+ String[] authMethods = new String[]
+ { "Anonymous Authentication", "Simple Authentication", "DIGEST-MD5 (SASL)", "CRAM-MD5 (SASL)" };
+ authenticationMethodCombo = BaseWidgetUtils.createReadonlyCombo( groupComposite, authMethods, 1, 2 );
+ authenticationMethodCombo.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent event )
+ {
+ connectionPageModified();
+ }
+ } );
+
+ Composite composite2 = BaseWidgetUtils.createColumnContainer( parent, 1, 1 );
+
+ Group group2 = BaseWidgetUtils.createGroup( composite2, "Authentication Parameter", 1 );
+ Composite composite = BaseWidgetUtils.createColumnContainer( group2, 3, 1 );
+
+ BaseWidgetUtils.createLabel( composite, "Bind DN or user:", 1 );
+ String[] dnHistory = HistoryUtils.load( ConnectionUIConstants.DIALOGSETTING_KEY_PRINCIPAL_HISTORY );
+ bindPrincipalCombo = BaseWidgetUtils.createCombo( composite, dnHistory, -1, 2 );
+ bindPrincipalCombo.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent event )
+ {
+ connectionPageModified();
+ }
+ } );
+
+ BaseWidgetUtils.createLabel( composite, "Bind password:", 1 );
+ bindPasswordText = BaseWidgetUtils.createPasswordText( composite, "", 2 );
+ bindPasswordText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent event )
+ {
+ connectionPageModified();
+ }
+ } );
+
+ BaseWidgetUtils.createSpacer( composite, 1 );
+ saveBindPasswordButton = BaseWidgetUtils.createCheckbox( composite, "Save password", 1 );
+ saveBindPasswordButton.setSelection( true );
+ saveBindPasswordButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent event )
+ {
+ connectionPageModified();
+ }
+ } );
+
+ checkPrincipalPasswordAuthButton = new Button( composite, SWT.PUSH );
+ GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalAlignment = SWT.RIGHT;
+ checkPrincipalPasswordAuthButton.setLayoutData( gd );
+ checkPrincipalPasswordAuthButton.setText( "Check Authentication" );
+ checkPrincipalPasswordAuthButton.setEnabled( false );
+ checkPrincipalPasswordAuthButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ Connection connection = getTestConnection();
+ CheckBindJob job = new CheckBindJob( connection );
+ RunnableContextJobAdapter.execute( job, runnableContext );
+ if ( job.getExternalResult().isOK() )
+ {
+ MessageDialog.openInformation( Display.getDefault().getActiveShell(), "Check Authentication",
+ "The authentication was successful." );
+ }
+ }
+ } );
+
+ validate();
+ }
+
+
+ /**
+ * Called when an input field was modified.
+ */
+ private void connectionPageModified()
+ {
+ validate();
+ fireConnectionPageModified();
+ }
+
+
+ /**
+ * Validates the input fields after each modification.
+ */
+ private void validate()
+ {
+ // set enabled/disabled state of fields and buttons
+ bindPrincipalCombo.setEnabled( isPrincipalPasswordEnabled() );
+ bindPasswordText.setEnabled( isPrincipalPasswordEnabled() && isSaveBindPassword() );
+ saveBindPasswordButton.setEnabled( isPrincipalPasswordEnabled() );
+ checkPrincipalPasswordAuthButton.setEnabled( isPrincipalPasswordEnabled() && isSaveBindPassword()
+ && !bindPrincipalCombo.getText().equals( "" ) && !bindPasswordText.getText().equals( "" ) );
+
+ // validate input fields
+ message = null;
+ errorMessage = null;
+ if ( isPrincipalPasswordEnabled() )
+ {
+ if ( isSaveBindPassword() && "".equals( bindPasswordText.getText() ) )
+ {
+ message = "Please enter a bind password.";
+ }
+ if ( "".equals( bindPrincipalCombo.getText() ) )
+ {
+ message = "Please enter a bind DN or user.";
+ }
+ }
+ }
+
+
+ /**
+ * Checks if is principal password enabled.
+ *
+ * @return true, if is principal password enabled
+ */
+ private boolean isPrincipalPasswordEnabled()
+ {
+ return ( getAuthenticationMethod() == AuthenticationMethod.SIMPLE )
+ || ( getAuthenticationMethod() == AuthenticationMethod.SASL_DIGEST_MD5 )
+ || ( getAuthenticationMethod() == AuthenticationMethod.SASL_CRAM_MD5 );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#loadParameters(org.apache.directory.studio.connection.core.ConnectionParameter)
+ */
+ public void loadParameters( ConnectionParameter parameter )
+ {
+ this.connectionParameter = parameter;
+
+ int index = parameter.getAuthMethod() == AuthenticationMethod.SIMPLE ? 1
+ : parameter.getAuthMethod() == AuthenticationMethod.SASL_DIGEST_MD5 ? 2
+ : parameter.getAuthMethod() == AuthenticationMethod.SASL_CRAM_MD5 ? 3 : 0;
+ authenticationMethodCombo.select( index );
+ bindPrincipalCombo.setText( parameter.getBindPrincipal() );
+ bindPasswordText.setText( parameter.getBindPassword() != null ? parameter.getBindPassword() : "" );
+ saveBindPasswordButton.setSelection( parameter.getBindPassword() != null );
+
+ connectionPageModified();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#saveParameters(org.apache.directory.studio.connection.core.ConnectionParameter)
+ */
+ public void saveParameters( ConnectionParameter parameter )
+ {
+ parameter.setAuthMethod( getAuthenticationMethod() );
+ parameter.setBindPrincipal( getBindPrincipal() );
+ parameter.setBindPassword( getBindPassword() );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#saveDialogSettings()
+ */
+ public void saveDialogSettings()
+ {
+ HistoryUtils.save( ConnectionUIConstants.DIALOGSETTING_KEY_PRINCIPAL_HISTORY, bindPrincipalCombo.getText() );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#setFocus()
+ */
+ public void setFocus()
+ {
+ bindPrincipalCombo.setFocus();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#areParametersModifed()
+ */
+ public boolean areParametersModifed()
+ {
+ return isReconnectionRequired();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#isReconnectionRequired()
+ */
+ public boolean isReconnectionRequired()
+ {
+ return connectionParameter == null || connectionParameter.getAuthMethod() != getAuthenticationMethod()
+ || !( connectionParameter.getBindPrincipal().equals( getBindPrincipal() ) )
+ || !( connectionParameter.getBindPassword().equals( getBindPassword() ) );
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/BaseWidgetUtils.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/BaseWidgetUtils.java
new file mode 100644
index 0000000..30a882f
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/BaseWidgetUtils.java
@@ -0,0 +1,474 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.widgets;
+
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * This class provides utility methods to create SWT widgets.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class BaseWidgetUtils
+{
+
+ /**
+ * Creates a SWT {@link Group} under the given parent.
+ *
+ * @param parent the parent
+ * @param label the label of the group
+ * @param span the horizontal span
+ * @return the created group
+ */
+ public static Group createGroup( Composite parent, String label, int span )
+ {
+ Group group = new Group( parent, SWT.NONE );
+ GridData gd = new GridData( GridData.FILL_BOTH );
+ gd.horizontalSpan = span;
+ group.setLayoutData( gd );
+ group.setText( label );
+ group.setLayout( new GridLayout() );
+ return group;
+ }
+
+
+ /**
+ * Creates a SWT {@link Composite} under the given parent.
+ * A GridLayout with the given number of columns is used.
+ *
+ * @param parent the parent
+ * @param columnCount the number of columns
+ * @param span the horizontal span
+ * @return the created composite
+ */
+ public static Composite createColumnContainer( Composite parent, int columnCount, int span )
+ {
+ Composite container = new Composite( parent, SWT.NONE );
+ GridLayout gl = new GridLayout( columnCount, false );
+ gl.marginHeight = gl.marginWidth = 0;
+ container.setLayout( gl );
+ GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalSpan = span;
+ container.setLayoutData( gd );
+ return container;
+ }
+
+
+ /**
+ * Creates a SWT {@link Label} under the given parent.
+ *
+ * @param parent the parent
+ * @param text the label's text
+ * @param span the horizontal span
+ * @return the created label
+ */
+ public static Label createLabel( Composite parent, String text, int span )
+ {
+ Label l = new Label( parent, SWT.NONE );
+ GridData gd = new GridData();
+ gd.horizontalSpan = span;
+ // gd.verticalAlignment = SWT.BEGINNING;
+ l.setLayoutData( gd );
+ l.setText( text );
+ return l;
+ }
+
+
+ /**
+ * Creates a SWT {@link Label} under the given parent.
+ * The label is created with the SWT.WRAP style to enable line wrapping.
+ *
+ * @param parent the parent
+ * @param text the label's text
+ * @param span the horizontal span
+ * @return the created label
+ */
+ public static Label createWrappedLabel( Composite parent, String text, int span )
+ {
+ Label l = new Label( parent, SWT.WRAP );
+ GridData gd = new GridData();
+ gd.horizontalSpan = span;
+ // gd.verticalAlignment = SWT.BEGINNING;
+ l.setLayoutData( gd );
+ l.setText( text );
+ return l;
+ }
+
+
+ /**
+ * Creates a SWT {@link Text} under the given parent.
+ * The created text control is modifyable.
+ *
+ * @param parent the parent
+ * @param text the initial text
+ * @param span the horizontal span
+ * @return the created text
+ */
+ public static Text createText( Composite parent, String text, int span )
+ {
+ Text t = new Text( parent, SWT.NONE | SWT.BORDER );
+ GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalSpan = span;
+ t.setLayoutData( gd );
+ t.setText( text );
+ return t;
+ }
+
+
+ /**
+ * Creates a SWT {@link Text} under the given parent.
+ * The created text control is modifyable.
+ *
+ * @param parent the parent
+ * @param text the initial text
+ * @param textWidth the width of the text control
+ * @param span the horizontal span
+ * @return the created text
+ */
+ public static Text createText( Composite parent, String text, int textWidth, int span )
+ {
+ Text t = new Text( parent, SWT.NONE | SWT.BORDER );
+ GridData gd = new GridData();
+ gd.horizontalSpan = span;
+ gd.widthHint = 9 * textWidth;
+ t.setLayoutData( gd );
+ t.setText( text );
+ t.setTextLimit( textWidth );
+ return t;
+ }
+
+
+ /**
+ * Creates a SWT {@link Text} under the given parent.
+ * The created text control is created with the SWT.PASSWORD style.
+ *
+ * @param parent the parent
+ * @param text the initial text
+ * @param span the horizontal span
+ * @return the created text
+ */
+ public static Text createPasswordText( Composite parent, String text, int span )
+ {
+ Text t = new Text( parent, SWT.NONE | SWT.BORDER | SWT.PASSWORD );
+ GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalSpan = span;
+ t.setLayoutData( gd );
+ t.setText( text );
+ return t;
+ }
+
+
+ /**
+ * Creates a SWT {@link Text} under the given parent.
+ * The created text control is created with the SWT.PASSWORD and
+ * SWT.READ_ONLY style. So the created controls is not modifyable.
+ *
+ * @param parent the parent
+ * @param text the initial text
+ * @param span the horizontal span
+ * @return the created text
+ */
+ public static Text createReadonlyPasswordText( Composite parent, String text, int span )
+ {
+ Text t = new Text( parent, SWT.NONE | SWT.BORDER | SWT.PASSWORD | SWT.READ_ONLY );
+ GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalSpan = span;
+ t.setLayoutData( gd );
+ t.setEditable( false );
+ t.setBackground( parent.getBackground() );
+ t.setText( text );
+ return t;
+ }
+
+
+ /**
+ * Creates a SWT {@link Text} under the given parent.
+ * The created text control behaves like a label: it has no border,
+ * a grayed background and is not modifyable.
+ * But the text is selectable and could be copied.
+ *
+ * @param parent the parent
+ * @param text the initial text
+ * @param span the horizontal span
+ * @return the created text
+ */
+ public static Text createLabeledText( Composite parent, String text, int span )
+ {
+ Text t = new Text( parent, SWT.NONE );
+ GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalSpan = span;
+ t.setLayoutData( gd );
+ t.setEditable( false );
+ t.setBackground( parent.getBackground() );
+ t.setText( text );
+ return t;
+ }
+
+
+ /**
+ * Creates a SWT {@link Text} under the given parent.
+ * The created text control behaves like a label: it has no border,
+ * a grayed background and is not modifyable.
+ * But the text is selectable and could be copied.
+ * The label is created with the SWT.WRAP style to enable line wrapping.
+ *
+ * @param parent the parent
+ * @param text the initial text
+ * @param span the horizontal span
+ * @return the created text
+ */
+ public static Text createWrappedLabeledText( Composite parent, String text, int span )
+ {
+ Text t = new Text( parent, SWT.WRAP );
+ GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalSpan = span;
+ gd.widthHint = 10;
+ gd.grabExcessHorizontalSpace = true;
+ gd.horizontalAlignment = GridData.FILL;
+ t.setLayoutData( gd );
+ t.setEditable( false );
+ t.setBackground( parent.getBackground() );
+ t.setText( text );
+ return t;
+ }
+
+
+ /**
+ * Creates a SWT {@link Text} under the given parent.
+ * The text is not modifyable, but the text is selectable
+ * and could be copied.
+ *
+ * @param parent the parent
+ * @param text the initial text
+ * @param span the horizontal span
+ * @return the created text
+ */
+ public static Text createReadonlyText( Composite parent, String text, int span )
+ {
+ Text t = new Text( parent, SWT.NONE | SWT.BORDER | SWT.READ_ONLY );
+ GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalSpan = span;
+ t.setLayoutData( gd );
+ t.setEditable( false );
+ t.setBackground( parent.getBackground() );
+ t.setText( text );
+ return t;
+ }
+
+
+ /**
+ * Creates a SWT {@link Combo} under the given parent.
+ * Beside the selection of an item it is also possible to type
+ * free text into the combo.
+ *
+ * @param parent the parent
+ * @param items the initial visible items
+ * @param selectedIndex the initial selected item, zero-based
+ * @param span the horizontal span
+ * @return the created combo
+ */
+ public static Combo createCombo( Composite parent, String[] items, int selectedIndex, int span )
+ {
+ Combo c = new Combo( parent, SWT.DROP_DOWN | SWT.BORDER );
+ GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalSpan = span;
+ c.setLayoutData( gd );
+ c.setItems( items );
+ c.select( selectedIndex );
+ c.setVisibleItemCount( 20 );
+ return c;
+ }
+
+
+ /**
+ * Creates a SWT {@link Combo} under the given parent.
+ * It is not possible to type free text into the combo, only
+ * selection of predefined items is possible.
+ *
+ * @param parent the parent
+ * @param items the initial visible items
+ * @param selectedIndex the initial selected item, zero-based
+ * @param span the horizontal span
+ * @return the created combo
+ */
+ public static Combo createReadonlyCombo( Composite parent, String[] items, int selectedIndex, int span )
+ {
+ Combo c = new Combo( parent, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER );
+ GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalSpan = span;
+ c.setLayoutData( gd );
+ // c.setBackground(parent.getBackground());
+ c.setItems( items );
+ c.select( selectedIndex );
+ c.setVisibleItemCount( 20 );
+ return c;
+ }
+
+
+ /**
+ * Creates a checkbox under the given parent.
+ *
+ * @param parent the parent
+ * @param text the label of the checkbox
+ * @param span the horizontal span
+ * @return the created checkbox
+ */
+ public static Button createCheckbox( Composite parent, String text, int span )
+ {
+ Button checkbox = new Button( parent, SWT.CHECK );
+ checkbox.setText( text );
+ GridData gd = new GridData();
+ gd.horizontalSpan = span;
+ checkbox.setLayoutData( gd );
+ return checkbox;
+ }
+
+
+ /**
+ * Creates a radio button under the given parent.
+ *
+ * @param parent the parent
+ * @param text the label of the radio button
+ * @param span the horizontal span
+ * @return the created radio button
+ */
+ public static Button createRadiobutton( Composite parent, String text, int span )
+ {
+ Button radio = new Button( parent, SWT.RADIO );
+ radio.setText( text );
+ GridData gd = new GridData();
+ gd.horizontalSpan = span;
+ radio.setLayoutData( gd );
+ return radio;
+ }
+
+
+ /**
+ * Creates a button under the given parent.
+ * The button width is set to the default width.
+ *
+ * @param parent the parent
+ * @param text the label of the button
+ * @param span the horizontal span
+ * @return the created button
+ */
+ public static Button createButton( Composite parent, String text, int span )
+ {
+ GC gc = new GC( parent );
+ gc.setFont( JFaceResources.getDialogFont() );
+ FontMetrics fontMetrics = gc.getFontMetrics();
+ gc.dispose();
+
+ Button button = new Button( parent, SWT.PUSH );
+ GridData gd = new GridData();
+ gd.widthHint = Dialog.convertHorizontalDLUsToPixels( fontMetrics, IDialogConstants.BUTTON_WIDTH );
+ button.setLayoutData( gd );
+ button.setText( text );
+ return button;
+ }
+
+
+ /**
+ * Adds some space to indent radio buttons.
+ *
+ * @param parent the parent
+ * @param span the horizontal span
+ */
+ public static void createRadioIndent( Composite parent, int span )
+ {
+ Label l = new Label( parent, SWT.NONE );
+ GridData gd = new GridData();
+ gd.horizontalSpan = span;
+ gd.horizontalIndent = 22;
+ l.setLayoutData( gd );
+ }
+
+
+ /**
+ * Creates a spacer.
+ *
+ * @param parent the parent
+ * @param span the horizontal span
+ */
+ public static void createSpacer( Composite parent, int span )
+ {
+ Label l = new Label( parent, SWT.NONE );
+ // GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ GridData gd = new GridData();
+ gd.horizontalSpan = span;
+ gd.heightHint = 1;
+ l.setLayoutData( gd );
+ }
+
+
+ /**
+ * Creates a separator line.
+ *
+ * @param parent the parent
+ * @param span the horizontal span
+ */
+ public static void createSeparator( Composite parent, int span )
+ {
+ Label l = new Label( parent, SWT.SEPARATOR | SWT.HORIZONTAL );
+ GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+ gd.horizontalSpan = span;
+ // gd.heightHint = 1;
+ l.setLayoutData( gd );
+ }
+
+
+ /**
+ * Creates a SWT {@link Link} under the given parent.
+ *
+ * @param parent the parent
+ * @param text the initial text
+ * @param span the horizontal span
+ * @return the created text
+ */
+ public static Link createLink( Composite parent, String text, int span )
+ {
+ Link link = new Link( parent, SWT.NONE );
+ link.setText( text );
+ GridData gd = new GridData( SWT.FILL, SWT.BEGINNING, true, false );
+ gd.horizontalSpan = span;
+ gd.widthHint = 150;
+ link.setLayoutData( gd );
+ return link;
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java
new file mode 100644
index 0000000..dfe0c24
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionActionGroup.java
@@ -0,0 +1,325 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.widgets;
+
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.directory.studio.connection.ui.actions.ActionHandlerManager;
+import org.apache.directory.studio.connection.ui.actions.StudioActionProxy;
+import org.apache.directory.studio.connection.ui.actions.CloseConnectionAction;
+import org.apache.directory.studio.connection.ui.actions.ConnectionViewActionProxy;
+import org.apache.directory.studio.connection.ui.actions.CopyAction;
+import org.apache.directory.studio.connection.ui.actions.DeleteAction;
+import org.apache.directory.studio.connection.ui.actions.NewConnectionAction;
+import org.apache.directory.studio.connection.ui.actions.OpenConnectionAction;
+import org.apache.directory.studio.connection.ui.actions.PasteAction;
+import org.apache.directory.studio.connection.ui.actions.PropertiesAction;
+import org.apache.directory.studio.connection.ui.actions.RenameAction;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.commands.ActionHandler;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.commands.ICommandService;
+
+
+/**
+ * This class manages all the actions of the connection widget.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionActionGroup implements ActionHandlerManager, IMenuListener
+{
+
+ /** The Constant newConnectionAction. */
+ protected static final String newConnectionAction = "newConnectionAction";
+
+ /** The Constant openConnectionAction. */
+ protected static final String openConnectionAction = "openConnectionAction";
+
+ /** The Constant closeConnectionAction. */
+ protected static final String closeConnectionAction = "closeConnectionAction";
+
+ /** The Constant copyConnectionAction. */
+ protected static final String copyConnectionAction = "copyConnectionAction";
+
+ /** The Constant pasteConnectionAction. */
+ protected static final String pasteConnectionAction = "pasteConnectionAction";
+
+ /** The Constant deleteConnectionAction. */
+ protected static final String deleteConnectionAction = "deleteConnectionAction";
+
+ /** The Constant renameConnectionAction. */
+ protected static final String renameConnectionAction = "renameConnectionAction";
+
+ /** The Constant propertyDialogAction. */
+ protected static final String propertyDialogAction = "propertyDialogAction";
+
+ /** The action map. */
+ protected Map<String, ConnectionViewActionProxy> connectionActionMap;
+
+ /** The action bars. */
+ protected IActionBars actionBars;
+
+ /** The connection main widget. */
+ protected ConnectionWidget mainWidget;
+
+
+ /**
+ * Creates a new instance of ConnectionActionGroup.
+ *
+ * @param mainWidget the connection main widget
+ * @param configuration the connection widget configuration
+ */
+ public ConnectionActionGroup( ConnectionWidget mainWidget, ConnectionConfiguration configuration )
+ {
+ this.mainWidget = mainWidget;
+ this.connectionActionMap = new HashMap<String, ConnectionViewActionProxy>();
+
+ TableViewer viewer = mainWidget.getViewer();
+ connectionActionMap.put( newConnectionAction, new ConnectionViewActionProxy( viewer, this,
+ new NewConnectionAction() ) );
+ connectionActionMap.put( openConnectionAction, new ConnectionViewActionProxy( viewer, this,
+ new OpenConnectionAction() ) );
+ connectionActionMap.put( closeConnectionAction, new ConnectionViewActionProxy( viewer, this,
+ new CloseConnectionAction() ) );
+ connectionActionMap
+ .put( pasteConnectionAction, new ConnectionViewActionProxy( viewer, this, new PasteAction() ) );
+ connectionActionMap.put( copyConnectionAction, new ConnectionViewActionProxy( viewer, this, new CopyAction(
+ ( StudioActionProxy ) connectionActionMap.get( pasteConnectionAction ) ) ) );
+ connectionActionMap.put( deleteConnectionAction, new ConnectionViewActionProxy( viewer, this,
+ new DeleteAction() ) );
+ connectionActionMap.put( renameConnectionAction, new ConnectionViewActionProxy( viewer, this,
+ new RenameAction() ) );
+ connectionActionMap.put( propertyDialogAction, new ConnectionViewActionProxy( viewer, this,
+ new PropertiesAction() ) );
+ }
+
+
+ /**
+ * Disposes this action group.
+ */
+ public void dispose()
+ {
+ if ( mainWidget != null )
+ {
+ for ( Iterator it = connectionActionMap.keySet().iterator(); it.hasNext(); )
+ {
+ String key = ( String ) it.next();
+ ConnectionViewActionProxy action = ( ConnectionViewActionProxy ) this.connectionActionMap.get( key );
+ action.dispose();
+ action = null;
+ it.remove();
+ }
+ connectionActionMap.clear();
+ connectionActionMap = null;
+
+ actionBars = null;
+ mainWidget = null;
+ }
+ }
+
+
+ /**
+ * Enables the action handlers.
+ *
+ * @param actionBars the action bars
+ */
+ public void enableGlobalActionHandlers( IActionBars actionBars )
+ {
+ this.actionBars = actionBars;
+ activateGlobalActionHandlers();
+ }
+
+
+ /**
+ * Fills the tool bar.
+ *
+ * @param toolBarManager the tool bar manager
+ */
+ public void fillToolBar( IToolBarManager toolBarManager )
+ {
+ toolBarManager.add( ( IAction ) this.connectionActionMap.get( newConnectionAction ) );
+ toolBarManager.add( new Separator() );
+ toolBarManager.add( ( IAction ) this.connectionActionMap.get( openConnectionAction ) );
+ toolBarManager.add( ( IAction ) this.connectionActionMap.get( closeConnectionAction ) );
+
+ toolBarManager.update( true );
+ }
+
+
+ /**
+ * Fills the local menu.
+ *
+ * @param menuManager the local menu manager
+ */
+ public void fillMenu( IMenuManager menuManager )
+ {
+ // menuManager.add(this.openSortDialogAction);
+ // menuManager.add(new Separator());
+ // menuManager.update(true);
+ }
+
+
+ /**
+ * Fills the context menu.
+ *
+ * @param menuManager the context menu manager
+ */
+ public void fillContextMenu( IMenuManager menuManager )
+ {
+ menuManager.setRemoveAllWhenShown( true );
+ menuManager.addMenuListener( this );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation fills the context menu.
+ */
+ public void menuAboutToShow( IMenuManager menuManager )
+ {
+ // add
+ menuManager.add( ( IAction ) connectionActionMap.get( newConnectionAction ) );
+ menuManager.add( new Separator() );
+
+ // open/close
+ if ( ( ( IAction ) connectionActionMap.get( closeConnectionAction ) ).isEnabled() )
+ {
+ menuManager.add( ( IAction ) connectionActionMap.get( closeConnectionAction ) );
+ }
+ else if ( ( ( IAction ) connectionActionMap.get( openConnectionAction ) ).isEnabled() )
+ {
+ menuManager.add( ( IAction ) connectionActionMap.get( openConnectionAction ) );
+ }
+ menuManager.add( new Separator() );
+
+ // copy/paste/...
+ menuManager.add( ( IAction ) connectionActionMap.get( copyConnectionAction ) );
+ menuManager.add( ( IAction ) connectionActionMap.get( pasteConnectionAction ) );
+ menuManager.add( ( IAction ) connectionActionMap.get( deleteConnectionAction ) );
+ menuManager.add( ( IAction ) connectionActionMap.get( renameConnectionAction ) );
+ menuManager.add( new Separator() );
+
+ // additions
+ menuManager.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
+
+ // properties
+ menuManager.add( ( IAction ) connectionActionMap.get( propertyDialogAction ) );
+ }
+
+
+ /**
+ * Activates the action handlers.
+ */
+ public void activateGlobalActionHandlers()
+ {
+ ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
+ ICommandService.class );
+
+ if ( actionBars != null )
+ {
+ actionBars.setGlobalActionHandler( ActionFactory.COPY.getId(), ( IAction ) connectionActionMap
+ .get( copyConnectionAction ) );
+ actionBars.setGlobalActionHandler( ActionFactory.PASTE.getId(), ( IAction ) connectionActionMap
+ .get( pasteConnectionAction ) );
+ actionBars.setGlobalActionHandler( ActionFactory.DELETE.getId(), ( IAction ) connectionActionMap
+ .get( deleteConnectionAction ) );
+ actionBars.setGlobalActionHandler( ActionFactory.RENAME.getId(), ( IAction ) connectionActionMap
+ .get( renameConnectionAction ) );
+ actionBars.setGlobalActionHandler( ActionFactory.PROPERTIES.getId(), ( IAction ) connectionActionMap
+ .get( propertyDialogAction ) );
+ actionBars.updateActionBars();
+ }
+ else
+ {
+ if ( commandService != null )
+ {
+ IAction ca = ( IAction ) connectionActionMap.get( copyConnectionAction );
+ ca.setActionDefinitionId( "org.apache.directory.studio.ldapbrowser.action.copy" );
+ commandService.getCommand( ca.getActionDefinitionId() ).setHandler( new ActionHandler( ca ) );
+
+ IAction pa = ( IAction ) connectionActionMap.get( pasteConnectionAction );
+ pa.setActionDefinitionId( "org.apache.directory.studio.ldapbrowser.action.paste" );
+ commandService.getCommand( pa.getActionDefinitionId() ).setHandler( new ActionHandler( pa ) );
+
+ IAction da = ( IAction ) connectionActionMap.get( deleteConnectionAction );
+ da.setActionDefinitionId( "org.apache.directory.studio.ldapbrowser.action.delete" );
+ commandService.getCommand( da.getActionDefinitionId() ).setHandler( new ActionHandler( da ) );
+
+ IAction pda = ( IAction ) connectionActionMap.get( propertyDialogAction );
+ pda.setActionDefinitionId( "org.apache.directory.studio.ldapbrowser.action.properties" );
+ commandService.getCommand( pda.getActionDefinitionId() ).setHandler( new ActionHandler( pda ) );
+
+ }
+ }
+ }
+
+
+ /**
+ * Deactivates the action handlers.
+ */
+ public void deactivateGlobalActionHandlers()
+ {
+ ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
+ ICommandService.class );
+
+ if ( actionBars != null )
+ {
+ actionBars.setGlobalActionHandler( ActionFactory.COPY.getId(), null );
+ actionBars.setGlobalActionHandler( ActionFactory.PASTE.getId(), null );
+ actionBars.setGlobalActionHandler( ActionFactory.DELETE.getId(), null );
+ actionBars.setGlobalActionHandler( ActionFactory.RENAME.getId(), null );
+ actionBars.setGlobalActionHandler( ActionFactory.PROPERTIES.getId(), null );
+ actionBars.updateActionBars();
+ }
+ else
+ {
+ if ( commandService != null )
+ {
+ IAction ca = ( IAction ) connectionActionMap.get( copyConnectionAction );
+ commandService.getCommand( ca.getActionDefinitionId() ).setHandler( null );
+
+ IAction pa = ( IAction ) connectionActionMap.get( pasteConnectionAction );
+ commandService.getCommand( pa.getActionDefinitionId() ).setHandler( null );
+
+ IAction da = ( IAction ) connectionActionMap.get( deleteConnectionAction );
+ commandService.getCommand( da.getActionDefinitionId() ).setHandler( null );
+
+ IAction pda = ( IAction ) connectionActionMap.get( propertyDialogAction );
+ commandService.getCommand( pda.getActionDefinitionId() ).setHandler( null );
+
+ }
+ }
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionConfiguration.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionConfiguration.java
new file mode 100644
index 0000000..f82e8d6
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionConfiguration.java
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.widgets;
+
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.widgets.Menu;
+
+
+/**
+ * The ConnectionConfiguration contains the content provider, the
+ * label provider and the context menu manager for the
+ * connection widget.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionConfiguration
+{
+
+ /** The disposed flag */
+ private boolean disposed = false;
+
+ /** The content provider. */
+ private ConnectionContentProvider contentProvider;
+
+ /** The label provider. */
+ private ConnectionLabelProvider labelProvider;
+
+ /** The context menu manager. */
+ private MenuManager contextMenuManager;
+
+
+ /**
+ * Creates a new instance of ConnectionConfiguration.
+ */
+ public ConnectionConfiguration()
+ {
+ }
+
+
+ /**
+ * Disposes this configuration.
+ */
+ public void dispose()
+ {
+ if ( !disposed )
+ {
+
+ if ( contentProvider != null )
+ {
+ contentProvider.dispose();
+ contentProvider = null;
+ }
+
+ if ( labelProvider != null )
+ {
+ labelProvider.dispose();
+ labelProvider = null;
+ }
+
+ if ( contextMenuManager != null )
+ {
+ contextMenuManager.dispose();
+ contextMenuManager = null;
+ }
+
+ disposed = true;
+ }
+ }
+
+
+ /**
+ * Gets the context menu manager.
+ *
+ * @param viewer the connection widget's table viewer
+ *
+ * @return the context menu manager
+ */
+ public IMenuManager getContextMenuManager( TableViewer viewer )
+ {
+ if ( this.contextMenuManager == null )
+ {
+ this.contextMenuManager = new MenuManager();
+ Menu menu = this.contextMenuManager.createContextMenu( viewer.getControl() );
+ viewer.getControl().setMenu( menu );
+ }
+ return this.contextMenuManager;
+ }
+
+
+ /**
+ * Gets the content provider.
+ *
+ * @param viewer the connection widget's table viewer
+ *
+ * @return the content provider
+ */
+ public ConnectionContentProvider getContentProvider( TableViewer viewer )
+ {
+ if ( contentProvider == null )
+ {
+ contentProvider = new ConnectionContentProvider();
+ }
+
+ return contentProvider;
+ }
+
+
+ /**
+ * Gets the label provider.
+ *
+ * @param viewer the connection widget's table viewer
+ *
+ * @return the label provider
+ */
+ public ConnectionLabelProvider getLabelProvider( TableViewer viewer )
+ {
+ if ( labelProvider == null )
+ {
+ labelProvider = new ConnectionLabelProvider();
+ }
+
+ return labelProvider;
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionContentProvider.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionContentProvider.java
new file mode 100644
index 0000000..5a8f9e7
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionContentProvider.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.widgets;
+
+
+import org.apache.directory.studio.connection.core.ConnectionManager;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+
+/**
+ * The ConnectionContentProvider represents the content provider for
+ * the connection widget. It accepts the ConnectionManager as input
+ * and returns its connections as elements.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionContentProvider implements IStructuredContentProvider
+{
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation does nothing.
+ */
+ public void inputChanged( Viewer viewer, Object oldInput, Object newInput )
+ {
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation does nothing.
+ */
+ public void dispose()
+ {
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation accepts the ConnectionManager and returns its connections.
+ */
+ public Object[] getElements( Object inputElement )
+ {
+ if ( inputElement != null && inputElement instanceof ConnectionManager )
+ {
+ ConnectionManager cm = ( ConnectionManager ) inputElement;
+ return cm.getConnections();
+ }
+ else
+ {
+ return new Object[]
+ {};
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java
new file mode 100644
index 0000000..814ecf0
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.widgets;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
+import org.apache.directory.studio.connection.ui.ConnectionUIConstants;
+import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+
+/**
+ * The ConnectionLabelProvider represents the label provider for
+ * the connection widget.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionLabelProvider extends LabelProvider
+{
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation returns the connection name and appends information
+ * about the used encryption method.
+ */
+ public String getText( Object obj )
+ {
+ if ( obj instanceof Connection )
+ {
+ Connection conn = ( Connection ) obj;
+ if ( conn.getEncryptionMethod() == EncryptionMethod.LDAPS )
+ {
+ return conn.getName() + " (LDAPS)";
+ }
+ else if ( conn.getEncryptionMethod() == EncryptionMethod.START_TLS )
+ {
+ return conn.getName() + " (StartTLS)";
+ }
+ else
+ {
+ return conn.getName();
+ }
+ }
+ else if ( obj != null )
+ {
+ return obj.toString();
+ }
+ else
+ {
+ return "";
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * This implementation returns a icon for connected or disconnected state.
+ */
+ public Image getImage( Object obj )
+ {
+ if ( obj instanceof Connection )
+ {
+ Connection conn = ( Connection ) obj;
+ return conn.getJNDIConnectionWrapper().isConnected() ? ConnectionUIPlugin.getDefault().getImage(
+ ConnectionUIConstants.IMG_CONNECTION_CONNECTED ) : ConnectionUIPlugin.getDefault().getImage(
+ ConnectionUIConstants.IMG_CONNECTION_DISCONNECTED );
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionUniversalListener.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionUniversalListener.java
new file mode 100644
index 0000000..4f51b8f
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionUniversalListener.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.widgets;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+import org.apache.directory.studio.connection.core.event.ConnectionUpdateListener;
+import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+
+
+/**
+ * The ConnectionUniversalListener manages all events for the connection widget.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionUniversalListener implements ConnectionUpdateListener
+{
+
+ /** The table viewer */
+ protected TableViewer viewer;
+
+
+ /**
+ * Creates a new instance of ConnectionUniversalListener.
+ *
+ * @param viewer the table viewer
+ */
+ public ConnectionUniversalListener( TableViewer viewer )
+ {
+ this.viewer = viewer;
+
+ ConnectionEventRegistry.addConnectionUpdateListener( this, ConnectionUIPlugin.getDefault().getEventRunner() );
+ }
+
+
+ /**
+ * Disposes this universal listener.
+ */
+ public void dispose()
+ {
+ if ( viewer != null )
+ {
+ ConnectionEventRegistry.removeConnectionUpdateListener( this );
+ viewer = null;
+ }
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionUpdated(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionUpdated( Connection connection )
+ {
+ if ( viewer != null )
+ {
+ viewer.refresh();
+ }
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionAdded(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionAdded( Connection connection )
+ {
+ connectionUpdated( connection );
+ if ( viewer != null )
+ {
+ viewer.setSelection( new StructuredSelection( connection ) );
+ }
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionRemoved(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionRemoved( Connection connection )
+ {
+ connectionUpdated( connection );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionOpened(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionOpened( Connection connection )
+ {
+ connectionUpdated( connection );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.core.event.ConnectionUpdateListener#connectionClosed(org.apache.directory.studio.connection.core.Connection)
+ */
+ public void connectionClosed( Connection connection )
+ {
+ connectionUpdated( connection );
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionWidget.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionWidget.java
new file mode 100644
index 0000000..2c97f04
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionWidget.java
@@ -0,0 +1,212 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.widgets;
+
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.IActionBars;
+
+
+/**
+ * The ConnectionWidget is a reusable widget that displays all connections
+ * in a table viewer. It is used by
+ * org.apache.directory.studio.ldapbrowser.ui.views.connection.ConnectionView,
+ * org.apache.directory.studio.ldapbrowser.common.dialogs.SelectConnectionDialog and
+ * org.apache.directory.studio.ldapbrowser.common.dialogs.SelectReferralConnectionDialog.
+ *
+ * It includes a content and label provider to display connections with a nice icon.
+ *
+ * Further is provides a context menu and a local toolbar with actions to
+ * add, modify, delete, open and close connections.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConnectionWidget extends ViewFormWidget
+{
+
+ /** The widget's configuration with the content provider, label provider and menu manager */
+ private ConnectionConfiguration configuration;
+
+ /** The action bars */
+ private IActionBars actionBars;
+
+ /** The table widget used by the table viewer */
+ private Table table;
+
+ /** The table viewer */
+ private TableViewer viewer;
+
+
+ /**
+ * Creates a new instance of ConnectionWidget.
+ *
+ * @param configuration the configuration
+ * @param actionBars the action bars
+ */
+ public ConnectionWidget( ConnectionConfiguration configuration, IActionBars actionBars )
+ {
+ this.configuration = configuration;
+ this.actionBars = actionBars;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void createWidget( Composite parent )
+ {
+ if ( actionBars == null )
+ {
+ super.createWidget( parent );
+ }
+ else
+ {
+ createContent( parent );
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public IToolBarManager getToolBarManager()
+ {
+ if ( actionBars == null )
+ {
+ return super.getToolBarManager();
+ }
+ else
+ {
+ return actionBars.getToolBarManager();
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public IMenuManager getMenuManager()
+ {
+ if ( actionBars == null )
+ {
+ return super.getMenuManager();
+
+ }
+ else
+ {
+ return actionBars.getMenuManager();
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public IMenuManager getContextMenuManager()
+ {
+ if ( actionBars == null )
+ {
+ return super.getContextMenuManager();
+ }
+ else
+ {
+ return configuration.getContextMenuManager( viewer );
+ }
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ protected Control createContent( Composite parent )
+ {
+
+ table = new Table( parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER );
+ GridData data = new GridData( GridData.FILL_BOTH );
+ data.widthHint = 450;
+ data.heightHint = 250;
+ table.setLayoutData( data );
+ viewer = new TableViewer( table );
+
+ // setup providers
+ viewer.setContentProvider( configuration.getContentProvider( viewer ) );
+ viewer.setLabelProvider( configuration.getLabelProvider( viewer ) );
+
+ return table;
+ }
+
+
+ /**
+ * Sets the input to the table viewer.
+ *
+ * @param input the input
+ */
+ public void setInput( Object input )
+ {
+ viewer.setInput( input );
+ }
+
+
+ /**
+ * Sets focus to the table viewer.
+ */
+ public void setFocus()
+ {
+ viewer.getTable().setFocus();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void dispose()
+ {
+ if ( viewer != null )
+ {
+ configuration.dispose();
+ configuration = null;
+
+ table.dispose();
+ table = null;
+ viewer = null;
+ }
+ }
+
+
+ /**
+ * Gets the table viewer.
+ *
+ * @return the table viewer
+ */
+ public TableViewer getViewer()
+ {
+ return viewer;
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/HistoryUtils.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/HistoryUtils.java
new file mode 100644
index 0000000..f019f0c
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/HistoryUtils.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.widgets;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
+
+
+/**
+ * The HistoryUtils are used to save and load the history of input fields.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class HistoryUtils
+{
+
+ /**
+ * Saves the the given value under the given key in the dialog settings.
+ *
+ * @param key the key
+ * @param value the value
+ */
+ public static void save( String key, String value )
+ {
+ // get current history
+ String[] history = load( key );
+ List<String> list = new ArrayList<String>( Arrays.asList( history ) );
+
+ // add new value or move to first position
+ if ( list.contains( value ) )
+ {
+ list.remove( value );
+ }
+ list.add( 0, value );
+
+ // check history size
+ while ( list.size() > 20 )
+ {
+ list.remove( list.size() - 1 );
+ }
+
+ // save
+ history = list.toArray( new String[list.size()] );
+ ConnectionUIPlugin.getDefault().getDialogSettings().put( key, history );
+
+ }
+
+
+ /**
+ * Loads the value of the given key from the dialog settings
+ *
+ * @param key the key
+ * @return the value
+ */
+ public static String[] load( String key )
+ {
+ String[] history = ConnectionUIPlugin.getDefault().getDialogSettings().getArray( key );
+ if ( history == null )
+ {
+ history = new String[0];
+ }
+ return history;
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
new file mode 100644
index 0000000..a997a9d
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
@@ -0,0 +1,367 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.widgets;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.ConnectionParameter;
+import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
+import org.apache.directory.studio.connection.core.jobs.CheckNetworkParameterJob;
+import org.apache.directory.studio.connection.ui.AbstractConnectionParameterPage;
+import org.apache.directory.studio.connection.ui.ConnectionUIConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * The NetworkParameterPage is used the edit the network parameters of a
+ * connection.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NetworkParameterPage extends AbstractConnectionParameterPage
+{
+
+ /** The connection name text widget */
+ private Text nameText;
+
+ /** The host name combo with the history of recently used host names */
+ private Combo hostCombo;
+
+ /** The host combo with the history of recently used ports */
+ private Combo portCombo;
+
+ /** The combo to select the encryption method */
+ private Combo encryptionMethodCombo;
+
+ /** The button to check the connection parameters */
+ private Button checkConnectionButton;
+
+
+ /**
+ * Creates a new instance of NetworkParameterPage.
+ */
+ public NetworkParameterPage()
+ {
+ }
+
+
+ /**
+ * Gets the connection name.
+ *
+ * @return the connectio name
+ */
+ private String getName()
+ {
+ return nameText.getText();
+ }
+
+
+ /**
+ * Gets the host name.
+ *
+ * @return the host name
+ */
+ private String getHostName()
+ {
+ return hostCombo.getText();
+ }
+
+
+ /**
+ * Gets the port.
+ *
+ * @return the port
+ */
+ private int getPort()
+ {
+ return Integer.parseInt( portCombo.getText() );
+ }
+
+
+ /**
+ * Gets the encyrption method.
+ *
+ * @return the encyrption method
+ */
+ private ConnectionParameter.EncryptionMethod getEncyrptionMethod()
+ {
+ switch ( encryptionMethodCombo.getSelectionIndex() )
+ {
+ case 1:
+ return ConnectionParameter.EncryptionMethod.LDAPS;
+ case 2:
+ return ConnectionParameter.EncryptionMethod.START_TLS;
+ default:
+ return ConnectionParameter.EncryptionMethod.NONE;
+ }
+ }
+
+
+ /**
+ * Gets a temporary connection with all conection parameter
+ * entered in this page.
+ *
+ * @return a test connection
+ */
+ private Connection getTestConnection()
+ {
+ ConnectionParameter cp = new ConnectionParameter( null, getHostName(), getPort(), getEncyrptionMethod(),
+ ConnectionParameter.AuthenticationMethod.NONE, null, null, null );
+ Connection conn = new Connection( cp );
+ return conn;
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#createComposite(org.eclipse.swt.widgets.Composite)
+ */
+ public void createComposite( Composite parent )
+ {
+
+ Composite composite = BaseWidgetUtils.createColumnContainer( parent, 1, 1 );
+
+ Composite nameComposite = BaseWidgetUtils.createColumnContainer( composite, 2, 1 );
+ BaseWidgetUtils.createLabel( nameComposite, "Connection name:", 1 );
+ nameText = BaseWidgetUtils.createText( nameComposite, "", 1 );
+ nameText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent event )
+ {
+ connectionPageModified();
+ }
+ } );
+
+ BaseWidgetUtils.createSpacer( composite, 1 );
+
+ Group group = BaseWidgetUtils.createGroup( composite, "Network Parameter", 1 );
+
+ Composite groupComposite = BaseWidgetUtils.createColumnContainer( group, 3, 1 );
+ BaseWidgetUtils.createLabel( groupComposite, "Hostname:", 1 );
+ String[] hostHistory = HistoryUtils.load( ConnectionUIConstants.DIALOGSETTING_KEY_HOST_HISTORY );
+ hostCombo = BaseWidgetUtils.createCombo( groupComposite, hostHistory, -1, 2 );
+ hostCombo.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent event )
+ {
+ connectionPageModified();
+ }
+ } );
+
+ BaseWidgetUtils.createLabel( groupComposite, "Port:", 1 );
+ String[] portHistory = HistoryUtils.load( ConnectionUIConstants.DIALOGSETTING_KEY_PORT_HISTORY );
+ portCombo = BaseWidgetUtils.createCombo( groupComposite, portHistory, -1, 2 );
+ portCombo.addVerifyListener( new VerifyListener()
+ {
+ public void verifyText( VerifyEvent event )
+ {
+ if ( !event.text.matches( "[0-9]*" ) )
+ {
+ event.doit = false;
+ }
+ if ( portCombo.getText().length() > 4 && event.text.length() > 0 )
+ {
+ event.doit = false;
+ }
+ }
+ } );
+ portCombo.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent event )
+ {
+ connectionPageModified();
+ }
+ } );
+
+ String[] encMethods = new String[]
+ { "No encryption", "Use SSL encryption (ldaps://)", "Use StartTLS extension" };
+ int index = 0;
+ BaseWidgetUtils.createLabel( groupComposite, "Encryption method:", 1 );
+ encryptionMethodCombo = BaseWidgetUtils.createReadonlyCombo( groupComposite, encMethods, index, 2 );
+ encryptionMethodCombo.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent event )
+ {
+ connectionPageModified();
+ }
+ } );
+ BaseWidgetUtils.createSpacer( groupComposite, 1 );
+ BaseWidgetUtils
+ .createLabel(
+ groupComposite,
+ "Warning: The current version doesn't support certificate validation, \nbe aware of invalid certificates or man-in-the-middle attacks!",
+ 2 );
+
+ BaseWidgetUtils.createSpacer( groupComposite, 2 );
+ checkConnectionButton = new Button( groupComposite, SWT.PUSH );
+ GridData gd = new GridData();
+ gd.horizontalAlignment = SWT.RIGHT;
+ gd.verticalAlignment = SWT.BOTTOM;
+ checkConnectionButton.setLayoutData( gd );
+ checkConnectionButton.setText( "Check Network Parameter" );
+ checkConnectionButton.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent event )
+ {
+ Connection connection = getTestConnection();
+ CheckNetworkParameterJob job = new CheckNetworkParameterJob( connection );
+ RunnableContextJobAdapter.execute( job, runnableContext );
+ if ( job.getExternalResult().isOK() )
+ {
+ MessageDialog.openInformation( Display.getDefault().getActiveShell(), "Check Network Parameter",
+ "The connection was established successfully." );
+ }
+ }
+ } );
+
+ validate();
+ nameText.setFocus();
+ }
+
+
+ /**
+ * Called when an input field was modified.
+ */
+ private void connectionPageModified()
+ {
+ // validate()
+ validate();
+
+ // fire
+ fireConnectionPageModified();
+ }
+
+
+ /**
+ * Validates the input fields after each modification.
+ */
+ private void validate()
+ {
+ // set enabled/disabled state of check connection button
+ checkConnectionButton.setEnabled( !hostCombo.getText().equals( "" ) && !portCombo.getText().equals( "" ) );
+
+ // validate input fields
+ message = null;
+ errorMessage = null;
+ if ( "".equals( portCombo.getText() ) )
+ {
+ message = "Please enter a port. The default LDAP port is 389.";
+ }
+ if ( "".equals( hostCombo.getText() ) )
+ {
+ message = "Please enter a hostname.";
+ }
+ if ( "".equals( nameText.getText() ) )
+ {
+ message = "Please enter a connection name.";
+ }
+ if ( ConnectionCorePlugin.getDefault().getConnectionManager().getConnectionByName( nameText.getText() ) != null
+ && ( connectionParameter == null || !nameText.getText().equals( connectionParameter.getName() ) ) )
+ {
+ errorMessage = "A connection named '" + nameText.getText() + "' already exists.";
+ }
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#loadParameters(org.apache.directory.studio.connection.core.ConnectionParameter)
+ */
+ public void loadParameters( ConnectionParameter parameter )
+ {
+ connectionParameter = parameter;
+
+ nameText.setText( parameter.getName() );
+ hostCombo.setText( parameter.getHost() );
+ portCombo.setText( Integer.toString( parameter.getPort() ) );
+ int index = parameter.getEncryptionMethod() == EncryptionMethod.LDAPS ? 1
+ : parameter.getEncryptionMethod() == EncryptionMethod.START_TLS ? 2 : 0;
+ encryptionMethodCombo.select( index );
+
+ connectionPageModified();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#saveParameters(org.apache.directory.studio.connection.core.ConnectionParameter)
+ */
+ public void saveParameters( ConnectionParameter parameter )
+ {
+ parameter.setName( getName() );
+ parameter.setHost( getHostName() );
+ parameter.setPort( getPort() );
+ parameter.setEncryptionMethod( getEncyrptionMethod() );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#saveDialogSettings()
+ */
+ public void saveDialogSettings()
+ {
+ HistoryUtils.save( ConnectionUIConstants.DIALOGSETTING_KEY_HOST_HISTORY, hostCombo.getText() );
+ HistoryUtils.save( ConnectionUIConstants.DIALOGSETTING_KEY_PORT_HISTORY, portCombo.getText() );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#setFocus()
+ */
+ public void setFocus()
+ {
+ nameText.setFocus();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#areParametersModifed()
+ */
+ public boolean areParametersModifed()
+ {
+ return isReconnectionRequired() || !( connectionParameter.getName().equals( getName() ) );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#isReconnectionRequired()
+ */
+ public boolean isReconnectionRequired()
+ {
+ return connectionParameter == null || !( connectionParameter.getHost().equals( getHostName() ) )
+ || connectionParameter.getPort() != getPort()
+ || connectionParameter.getEncryptionMethod() != getEncyrptionMethod();
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java
new file mode 100644
index 0000000..e65f775
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.widgets;
+
+
+import org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob;
+import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ * This class provides some convinience methods to execute a job within
+ * an {@link IRunnableContext}.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class RunnableContextJobAdapter
+{
+
+ /**
+ * Executes the given job within a new {@link ProgressMonitorDialog}.
+ *
+ * @param job the job to execute
+ */
+ public static void execute( final AbstractConnectionJob job )
+ {
+ execute( job, null );
+ }
+
+
+ /**
+ * Executes the given job within the given runnable context and enabled error handling
+ *
+ * @param runnableContext the runnable context
+ * @param job the job to execute
+ */
+ public static void execute( final AbstractConnectionJob job, IRunnableContext runnableContext )
+ {
+ execute( job, runnableContext, true );
+ }
+
+
+ /**
+ * Executes the given job within the given runnable context.
+ *
+ * @param runnableContext the runnable context
+ * @param job the job to execute
+ * @param handleError true to handle errors
+ */
+ public static void execute( final AbstractConnectionJob job, IRunnableContext runnableContext, boolean handleError )
+ {
+
+ if ( runnableContext == null )
+ {
+ runnableContext = new ProgressMonitorDialog( Display.getDefault().getActiveShell() );
+ }
+
+ IRunnableWithProgress runnable = new IRunnableWithProgress()
+ {
+ public void run( IProgressMonitor ipm ) throws InterruptedException
+ {
+ job.setExternalProgressMonitor( ipm );
+ job.execute();
+ job.join();
+ }
+ };
+
+ try
+ {
+ runnableContext.run( true, true, runnable );
+ }
+ catch ( Exception ex )
+ {
+ ConnectionUIPlugin.getDefault().getExceptionHandler().handleException(
+ new Status( IStatus.ERROR, ConnectionUIPlugin.PLUGIN_ID, IStatus.ERROR, ex.getMessage() != null ? ex
+ .getMessage() : "", ex ) );
+ }
+
+ if ( handleError && !job.getExternalResult().isOK() )
+ {
+ IStatus status = job.getExternalResult();
+ ConnectionUIPlugin.getDefault().getExceptionHandler().handleException( status );
+ }
+
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ViewFormWidget.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ViewFormWidget.java
new file mode 100644
index 0000000..8e91162
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ViewFormWidget.java
@@ -0,0 +1,256 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.widgets;
+
+
+import org.apache.directory.studio.connection.ui.ConnectionUIConstants;
+import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ViewForm;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+
+
+/**
+ * The ViewFormWidget is a widget that provides an info text,
+ * a tool bar, a menu and a main content composite including
+ * a context menu.
+ * It looks like this:
+ * <pre>
+ * -----------------------------------
+ * | info text | tool bar | menu |
+ * -----------------------------------
+ * | |
+ * | main content |
+ * | |
+ * -----------------------------------
+ * </pre>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class ViewFormWidget
+{
+
+ /** The view form control */
+ protected ViewForm control;
+
+ /** The info text, positioned at the top left */
+ protected Text infoText;
+
+ /** The action tool bar */
+ protected ToolBar actionToolBar;
+
+ /** The action tool bar manager */
+ protected IToolBarManager actionToolBarManager;
+
+ /** The menu tool bar. */
+ protected ToolBar menuToolBar;
+
+ /** The menu manager. */
+ protected MenuManager menuManager;
+
+ /** The context menu manager. */
+ protected MenuManager contextMenuManager;
+
+
+ /**
+ * Creates the widget.
+ *
+ * @param parent the parent composite
+ */
+ public void createWidget( Composite parent )
+ {
+
+ control = new ViewForm( parent, SWT.NONE );
+ // control.marginWidth = 0;
+ // control.marginHeight = 0;
+ // control.horizontalSpacing = 0;
+ // control.verticalSpacing = 0;
+ control.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+
+ // infoText = BaseWidgetUtils.createLabeledText(control, "", 1);
+ Composite infoTextControl = BaseWidgetUtils.createColumnContainer( control, 1, 1 );
+ infoTextControl.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+ infoText = BaseWidgetUtils.createLabeledText( infoTextControl, "", 1 );
+ infoText.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, true ) );
+ control.setTopLeft( infoTextControl );
+
+ // tool bar
+ actionToolBar = new ToolBar( control, SWT.FLAT | SWT.RIGHT );
+ actionToolBar.setLayoutData( new GridData( SWT.END, SWT.NONE, true, false ) );
+ actionToolBarManager = new ToolBarManager( actionToolBar );
+ control.setTopCenter( actionToolBar );
+
+ // local menu
+ this.menuManager = new MenuManager();
+ menuToolBar = new ToolBar( control, SWT.FLAT | SWT.RIGHT );
+ ToolItem ti = new ToolItem( menuToolBar, SWT.PUSH, 0 );
+ ti.setImage( ConnectionUIPlugin.getDefault().getImage( ConnectionUIConstants.IMG_PULLDOWN ) );
+ ti.addSelectionListener( new SelectionAdapter()
+ {
+ public void widgetSelected( SelectionEvent e )
+ {
+ showViewMenu();
+ }
+ } );
+ control.setTopRight( menuToolBar );
+
+ // content
+ Composite composite = BaseWidgetUtils.createColumnContainer( control, 1, 1 );
+ GridLayout gl = new GridLayout();
+ gl.horizontalSpacing = 0;
+ gl.verticalSpacing = 0;
+ gl.marginHeight = 0;
+ gl.marginWidth = 0;
+ composite.setLayout( gl );
+ Control childControl = this.createContent( composite );
+ control.setContent( composite );
+
+ // context menu
+ this.contextMenuManager = new MenuManager();
+ Menu menu = this.contextMenuManager.createContextMenu( childControl );
+ childControl.setMenu( menu );
+ }
+
+
+ /**
+ * Creates the content.
+ *
+ * @param control the control
+ *
+ * @return the control
+ */
+ protected abstract Control createContent( Composite control );
+
+
+ /**
+ * Shows the local view menu.
+ */
+ private void showViewMenu()
+ {
+ Menu aMenu = menuManager.createContextMenu( control );
+ Point topLeft = new Point( 0, 0 );
+ topLeft.y += menuToolBar.getBounds().height;
+ topLeft = menuToolBar.toDisplay( topLeft );
+ aMenu.setLocation( topLeft.x, topLeft.y );
+ aMenu.setVisible( true );
+ }
+
+
+ /**
+ * Disposes this widget.
+ */
+ public void dispose()
+ {
+ if ( control != null )
+ {
+
+ if ( contextMenuManager != null )
+ {
+ contextMenuManager.removeAll();
+ contextMenuManager.dispose();
+ contextMenuManager = null;
+ }
+ if ( menuToolBar != null )
+ {
+ menuToolBar.dispose();
+ menuToolBar = null;
+ menuManager.dispose();
+ menuManager = null;
+ }
+ if ( actionToolBar != null )
+ {
+ actionToolBar.dispose();
+ actionToolBar = null;
+ actionToolBarManager.removeAll();
+ actionToolBarManager = null;
+ }
+
+ if ( infoText != null )
+ {
+ infoText.dispose();
+ infoText = null;
+ }
+
+ control.dispose();
+ control = null;
+ }
+ }
+
+
+ /**
+ * Gets the info text.
+ *
+ * @return the info text
+ */
+ public Text getInfoText()
+ {
+ return infoText;
+ }
+
+
+ /**
+ * Gets the tool bar manager.
+ *
+ * @return the tool bar manager
+ */
+ public IToolBarManager getToolBarManager()
+ {
+ return this.actionToolBarManager;
+ }
+
+
+ /**
+ * Gets the menu manager.
+ *
+ * @return the menu manager
+ */
+ public IMenuManager getMenuManager()
+ {
+ return menuManager;
+ }
+
+
+ /**
+ * Gets the context menu manager.
+ *
+ * @return the context menu manager
+ */
+ public IMenuManager getContextMenuManager()
+ {
+ return this.contextMenuManager;
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizard.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizard.java
new file mode 100644
index 0000000..19115fc
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizard.java
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.wizards;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.ConnectionParameter;
+import org.apache.directory.studio.connection.core.jobs.OpenConnectionsJob;
+import org.apache.directory.studio.connection.ui.ConnectionParameterPage;
+import org.apache.directory.studio.connection.ui.ConnectionParameterPageManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+
+/**
+ * The NewConnectionWizard is used to create a new connection.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewConnectionWizard extends Wizard implements INewWizard
+{
+
+ /** The wizard pages. */
+ private NewConnectionWizardPage[] wizardPages;
+
+ /** The connection parameter pages. */
+ private ConnectionParameterPage[] pages;
+
+
+ /**
+ * Creates a new instance of NewConnectionWizard.
+ */
+ public NewConnectionWizard()
+ {
+ setWindowTitle( "New LDAP Connection" );
+ setNeedsProgressMonitor( true );
+ }
+
+
+ /**
+ * Gets the id.
+ *
+ * @return the id
+ */
+ public static String getId()
+ {
+ return NewConnectionWizard.class.getName();
+ }
+
+
+ /**
+ * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ public void init( IWorkbench workbench, IStructuredSelection selection )
+ {
+ }
+
+
+ /**
+ * @see org.eclipse.jface.wizard.Wizard#addPages()
+ */
+ public void addPages()
+ {
+ pages = ConnectionParameterPageManager.getConnectionParameterPages();
+
+ wizardPages = new NewConnectionWizardPage[pages.length];
+ for ( int i = 0; i < pages.length; i++ )
+ {
+ wizardPages[i] = new NewConnectionWizardPage( this, pages[i] );
+ addPage( wizardPages[i] );
+ }
+ }
+
+
+ /**
+ * @see org.eclipse.jface.wizard.Wizard#createPageControls(org.eclipse.swt.widgets.Composite)
+ */
+ public void createPageControls( Composite pageContainer )
+ {
+ super.createPageControls( pageContainer );
+
+ // TODO: set help context ID, move help from browser-help plugin to connections-help plugin
+ // for ( NewConnectionWizardPage wizardPage : wizardPages )
+ // {
+ // PlatformUI.getWorkbench().getHelpSystem().setHelp( wizardPage.getControl(),
+ // ConnectionUIPlugin.PLUGIN_ID + "." + "tools_newconnection_wizard" );
+ // }
+ }
+
+
+ /**
+ * @see org.eclipse.jface.wizard.Wizard#canFinish()
+ */
+ public boolean canFinish()
+ {
+ for ( int i = 0; i < pages.length; i++ )
+ {
+ if ( !pages[i].isValid() )
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+
+ /**
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ */
+ public boolean performFinish()
+ {
+ // get connection paramters from pages and save dialog settings
+ ConnectionParameter connectionParameter = new ConnectionParameter();
+ for ( int i = 0; i < pages.length; i++ )
+ {
+ pages[i].saveParameters( connectionParameter );
+ pages[i].saveDialogSettings();
+ }
+
+ // create persistent connection
+ final Connection conn = new Connection( connectionParameter );
+ ConnectionCorePlugin.getDefault().getConnectionManager().addConnection( conn );
+
+ // open connection
+ new OpenConnectionsJob( conn ).execute();
+
+ return true;
+ }
+
+
+ /**
+ * Gets the test connection parameters.
+ *
+ * @return the test connection parameters
+ */
+ public ConnectionParameter getTestConnectionParameters()
+ {
+ ConnectionParameter connectionParameter = new ConnectionParameter();
+ for ( int i = 0; i < pages.length; i++ )
+ {
+ pages[i].saveParameters( connectionParameter );
+ }
+ return connectionParameter;
+ }
+
+}
diff --git a/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizardPage.java b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizardPage.java
new file mode 100644
index 0000000..246877a
--- /dev/null
+++ b/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizardPage.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.connection.ui.wizards;
+
+
+import org.apache.directory.studio.connection.core.ConnectionParameter;
+import org.apache.directory.studio.connection.ui.ConnectionParameterPage;
+import org.apache.directory.studio.connection.ui.ConnectionParameterPageModifyListener;
+import org.apache.directory.studio.connection.ui.ConnectionUIConstants;
+import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * NewConnectionWizard.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewConnectionWizardPage extends WizardPage implements ConnectionParameterPageModifyListener
+{
+
+ /** The wizard. */
+ private NewConnectionWizard wizard;
+
+ /** The page. */
+ private ConnectionParameterPage page;
+
+
+ /**
+ * Creates a new instance of NewConnectionWizard.
+ *
+ * @param page the page
+ * @param wizard the wizard
+ */
+ public NewConnectionWizardPage( NewConnectionWizard wizard, ConnectionParameterPage page )
+ {
+ super( page.getPageName() );
+ setTitle( page.getPageName() );
+ setDescription( page.getPageDescription() );
+ setImageDescriptor( ConnectionUIPlugin.getDefault().getImageDescriptor(
+ ConnectionUIConstants.IMG_CONNECTION_WIZARD ) );
+ setPageComplete( false );
+
+ page.setConnectionParameterPageModifyListener( this );
+ page.setRunnableContext( getContainer() );
+
+ this.wizard = wizard;
+ this.page = page;
+ }
+
+
+ /**
+ * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
+ */
+ public void setVisible( boolean visible )
+ {
+ super.setVisible( visible );
+
+ if ( visible )
+ {
+ page.setFocus();
+ }
+ }
+
+
+ /**
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl( Composite parent )
+ {
+ Composite composite = new Composite( parent, SWT.NONE );
+ GridLayout gl = new GridLayout( 1, false );
+ composite.setLayout( gl );
+ page.createComposite( composite );
+ setControl( composite );
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPageModifyListener#connectionParameterPageModified()
+ */
+ public void connectionParameterPageModified()
+ {
+ setMessage( page.getMessage() );
+ setErrorMessage( page.getErrorMessage() );
+ setPageComplete( page.isValid() );
+ getContainer().updateButtons();
+ }
+
+
+ /**
+ * @see org.apache.directory.studio.connection.ui.ConnectionParameterPageModifyListener#getTestConnectionParameters()
+ */
+ public ConnectionParameter getTestConnectionParameters()
+ {
+ return wizard.getTestConnectionParameters();
+ }
+
+}
\ No newline at end of file
diff --git a/studio-connection-ui/src/main/resources/connectionParameterPages.exsd b/studio-connection-ui/src/main/resources/connectionParameterPages.exsd
new file mode 100644
index 0000000..0af7cfc
--- /dev/null
+++ b/studio-connection-ui/src/main/resources/connectionParameterPages.exsd
@@ -0,0 +1,153 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.apache.directory.studio.connection.ui">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.apache.directory.studio.connection.ui" id="connectionParameterPage" name="Connection Parameter Page"/>
+ </appInfo>
+ <documentation>
+ A ConnectionParameterPage is used to specify additional parameters to a connection.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="connectionParameterPage"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+ The extension-point of this extension.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ Extension identifier.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ Name of this extension.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="connectionParameterPage">
+ <annotation>
+ <appInfo>
+ <meta.element labelAttribute="name" icon="icon"/>
+ </appInfo>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ The name of the function.
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The specific class implementing the function.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn="org.apache.directory.studio.connection.ui.IConnectionParameterPage"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ 1.0.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ <p>
+<pre>
+ <extension
+ point="org.apache.directory.studio.connectionparameterpages">
+
+ <valueEditor
+ name="Browser Options"
+ class="org.apache.directory.studio.ldapbrowser.common.wizard.connection.ConnectionParameterPage"
+ />
+ </extension>
+</pre>
+<p>
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/studio-dsml-parser/.classpath b/studio-dsml-parser/.classpath
new file mode 100644
index 0000000..b6a6a05
--- /dev/null
+++ b/studio-dsml-parser/.classpath
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/>
+ <classpathentry kind="lib" path="lib/xpp3-1.1.3_8.jar"/>
+ <classpathentry kind="lib" path="lib/shared-ldap-0.9.6-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/shared-asn1-0.9.6-SNAPSHOT.jar"/>
+ <classpathentry kind="lib" path="lib/nlog4j-1.2.25.jar"/>
+ <classpathentry kind="lib" path="lib/junit-3.8.2.jar"/>
+ <classpathentry kind="lib" path="lib/dom4j-1.6.1.jar"/>
+ <classpathentry kind="lib" path="lib/commons-collections-3.1.jar"/>
+ <classpathentry kind="lib" path="lib/antlr-2.7.6.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/studio-dsml-parser/.project b/studio-dsml-parser/.project
new file mode 100644
index 0000000..c98025c
--- /dev/null
+++ b/studio-dsml-parser/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>studio-dsml-parser</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/studio-dsml-parser/META-INF/LICENSE.txt b/studio-dsml-parser/META-INF/LICENSE.txt
new file mode 100755
index 0000000..d4a7469
--- /dev/null
+++ b/studio-dsml-parser/META-INF/LICENSE.txt
Binary files differ
diff --git a/studio-dsml-parser/META-INF/MANIFEST.MF b/studio-dsml-parser/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..3530aae
--- /dev/null
+++ b/studio-dsml-parser/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Package: org.apache.directory.studio.dsmlv2.*
+
+Name: org.apache.directory.studio.dsmlv2.*
+Specification-Title: studio-dsml-parser
+Specification-Version: 1.0
+Specification-Vendor: Apache Software Foundation
+Implementation-Title: org.apache.directory.studio.dsmlv2.*
+Implementation-Version: 1.0
+Implementation-Vendor: Apache Software Foundation
+Bundle-ClassPath: .
\ No newline at end of file
diff --git a/studio-dsml-parser/META-INF/NOTICE.txt b/studio-dsml-parser/META-INF/NOTICE.txt
new file mode 100644
index 0000000..3652a2f
--- /dev/null
+++ b/studio-dsml-parser/META-INF/NOTICE.txt
Binary files differ
diff --git a/studio-dsml-parser/build.xml b/studio-dsml-parser/build.xml
new file mode 100644
index 0000000..26ca17d
--- /dev/null
+++ b/studio-dsml-parser/build.xml
@@ -0,0 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<project default="jar">
+ <import file="../studio-build/build.xml"/>
+</project>
diff --git a/studio-dsml-parser/ivy.xml b/studio-dsml-parser/ivy.xml
new file mode 100644
index 0000000..616f4d1
--- /dev/null
+++ b/studio-dsml-parser/ivy.xml
@@ -0,0 +1,30 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
+<ivy-module version="1.0">
+ <info organisation="org.apache.directory.studio" module="studio-dsml-parser"/>
+ <dependencies>
+ <dependency org="org.slf4j" name="nlog4j" rev="1.2.25"/>
+ <dependency org="org.apache.directory.shared" name="shared-ldap" rev="0.9.6-SNAPSHOT"/>
+ <dependency org="org.apache.directory.shared" name="shared-asn1" rev="0.9.6-SNAPSHOT"/>
+ <dependency org="commons-collections" name="commons-collections" rev="3.1"/>
+ <dependency org="org.dom4j" name="dom4j" rev="1.6.1"/>
+ <dependency org="org.xmlpull" name="xpp3" rev="1.1.3_8"/>
+ <dependency org="junit" name="junit" rev="3.8.2"/>
+ </dependencies>
+</ivy-module>
\ No newline at end of file
diff --git a/studio-dsml-parser/project.properties b/studio-dsml-parser/project.properties
new file mode 100644
index 0000000..04f6018
--- /dev/null
+++ b/studio-dsml-parser/project.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+project.name=studio-dsml-parser
+project.id=studio-dsml-parser
+project.version=0.4
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/AbstractGrammar.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/AbstractGrammar.java
new file mode 100644
index 0000000..fa0d38e
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/AbstractGrammar.java
@@ -0,0 +1,182 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+import java.io.IOException;
+import java.util.HashMap;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+
+/**
+ * The abstract IGrammar which is the Mother of all the grammars. It contains
+ * the transitions table.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class AbstractGrammar implements IGrammar
+{
+
+ /**
+ * Table of transitions. It's a two dimension array, the first dimension
+ * indice the states, the second dimension indices the Tag value, so it is
+ * 256 wide.
+ */
+ protected HashMap<Tag, GrammarTransition>[] transitions;
+
+ /** The grammar name */
+ protected String name;
+
+ /** The grammar's states */
+ protected IStates statesEnum;
+
+
+ /**
+ * Return the grammar's name
+ *
+ * @return The grammar name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+
+ /**
+ * Set the grammar's name
+ *
+ * @param name
+ * the name to set
+ */
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+
+ /**
+ * Get the transition associated with the state and tag
+ *
+ * @param state
+ * The current state
+ * @param tag
+ * The current tag
+ * @return A valid transition if any, or null.
+ */
+ public GrammarTransition getTransition( int state, Tag tag )
+ {
+ return transitions[state].get( tag );
+ }
+
+
+ /**
+ * Get the states of the current grammar
+ *
+ * @return
+ * Returns the statesEnum.
+ */
+ public IStates getStatesEnum()
+ {
+ return statesEnum;
+ }
+
+
+ /**
+ * Set the states for this grammar
+ *
+ * @param statesEnum
+ * The statesEnum to set.
+ */
+ public void setStatesEnum( IStates statesEnum )
+ {
+ this.statesEnum = statesEnum;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.IGrammar#executeAction(org.apache.directory.studio.dsmlv2.Dsmlv2Container)
+ */
+ public void executeAction( Dsmlv2Container container ) throws XmlPullParserException, IOException
+ {
+ XmlPullParser xpp = container.getParser();
+
+ int eventType = xpp.getEventType();
+ do
+ {
+ if ( eventType == XmlPullParser.START_DOCUMENT )
+ {
+ container.setState( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE );
+ }
+ else if ( eventType == XmlPullParser.END_DOCUMENT )
+ {
+ container.setState( Dsmlv2StatesEnum.END_STATE );
+ }
+ else if ( eventType == XmlPullParser.START_TAG )
+ {
+ processTag( container, Tag.START );
+ }
+ else if ( eventType == XmlPullParser.END_TAG )
+ {
+ processTag( container, Tag.END );
+ }
+ eventType = xpp.next();
+ }
+ while ( eventType != XmlPullParser.END_DOCUMENT );
+ }
+
+
+ /**
+ * Processes the task required in the grammar to the given tag type
+ *
+ * @param container
+ * the DSML container
+ * @param tagType
+ * the tag type
+ * @throws XmlPullParserException
+ * when an error occurs during the parsing
+ */
+ private void processTag( Dsmlv2Container container, int tagType ) throws XmlPullParserException
+ {
+ XmlPullParser xpp = container.getParser();
+
+ String tagName = xpp.getName().toLowerCase();
+
+ GrammarTransition transition = getTransition( container.getState(), new Tag( tagName, tagType ) );
+
+ if ( transition != null )
+ {
+ container.setState( transition.getNextState() );
+
+ if ( transition.hasAction() )
+ {
+ transition.getAction().action( container );
+ }
+ }
+ else
+ {
+ throw new XmlPullParserException( "The tag " + new Tag( tagName, tagType )
+ + " can't be found at this position", xpp, null );
+ }
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Container.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Container.java
new file mode 100644
index 0000000..3c7d84c
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Container.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+/**
+ * This interface represents a container that can be used by the parser to store parsed information
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface Container
+{
+ /**
+ * Get the current grammar state
+ *
+ * @return Returns the current grammar state
+ */
+ int getState();
+
+
+ /**
+ * Set the new current state
+ *
+ * @param state
+ * The new state
+ */
+ void setState( int state );
+
+
+ /**
+ * Get the transition
+ *
+ * @return Returns the transition from the previous state to the new state
+ */
+ public int getTransition();
+
+
+ /**
+ * Update the transition from a state to another
+ *
+ * @param transition
+ * The transition to set
+ */
+ public void setTransition( int transition );
+
+
+ /**
+ * @return Returns the states.
+ */
+ public IStates getStates();
+
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/DsmlDecorator.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/DsmlDecorator.java
new file mode 100644
index 0000000..ad6455a
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/DsmlDecorator.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+import org.dom4j.Element;
+
+
+/**
+ * This interface defines the methods that must be implemented to define a DSML Decorator
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface DsmlDecorator
+{
+ /**
+ * Converts the request/reponse to its XML representation in the DSMLv2 format
+ *
+ * @param root
+ * the root dom4j Element
+ * @return
+ * the dom4j Element corresponding to the entry.
+ */
+ public Element toDsml( Element root );
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2Container.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2Container.java
new file mode 100644
index 0000000..8763db9
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2Container.java
@@ -0,0 +1,230 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+import org.apache.directory.studio.dsmlv2.reponse.BatchResponse;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest;
+import org.xmlpull.v1.XmlPullParser;
+
+
+/**
+ * This class represents the DSML Container.
+ * It used by the DSML Parser to store information.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Dsmlv2Container implements Container
+{
+ /** The current state of the decoding */
+ private int state;
+
+ /** The current transition */
+ private int transition;
+
+ /** Store the different states for debug purpose */
+ private IStates states;
+
+ /** The pool parser */
+ private XmlPullParser parser;
+
+ /** The BatchRequest of the parsing */
+ private BatchRequest batchRequest;
+
+ /** The BatchResponse of the parsing */
+ private BatchResponse batchResponse;
+
+ /** The associated grammar */
+ private AbstractGrammar grammar;
+
+
+ /**
+ * Gets the DSML Batch Request
+ *
+ * @return
+ * Returns the Batch Request
+ */
+ public BatchRequest getBatchRequest()
+ {
+ return batchRequest;
+ }
+
+
+ /**
+ * Sets the DSML Batch Request
+ *
+ * @param batchRequest
+ * the Batch Request to set
+ */
+ public void setBatchRequest( BatchRequest batchRequest )
+ {
+ this.batchRequest = batchRequest;
+ }
+
+
+ /**
+ * Gets the DSML Batch Response
+ *
+ * @return
+ * Returns the Batch Response
+ */
+ public BatchResponse getBatchResponse()
+ {
+ return batchResponse;
+ }
+
+
+ /**
+ * Sets the DSML Batch Request
+ *
+ * @param batchRequest
+ * the Batch Response to set
+ */
+ public void setBatchResponse( BatchResponse batchResponse )
+ {
+ this.batchResponse = batchResponse;
+ }
+
+
+ /**
+ * Gets the parser
+ *
+ * @return
+ * the parser
+ */
+ public XmlPullParser getParser()
+ {
+ return parser;
+ }
+
+
+ /**
+ * Sets the parser
+ *
+ * @param parser
+ * the parser to set
+ */
+ public void setParser( XmlPullParser parser )
+ {
+ this.parser = parser;
+ }
+
+
+ /**
+ * Get the current grammar state
+ *
+ * @return
+ * the current grammar state
+ */
+ public int getState()
+ {
+ return state;
+ }
+
+
+ /**
+ * Set the new current state
+ *
+ * @param state
+ * the new state
+ */
+ public void setState( int state )
+ {
+ this.state = state;
+ }
+
+
+ /**
+ * Get the transition
+ *
+ * @return
+ * the transition from the previous state to the new state
+ */
+ public int getTransition()
+ {
+ return transition;
+ }
+
+
+ /**
+ * Update the transition from a state to another
+ *
+ * @param transition
+ * the transition to set
+ */
+ public void setTransition( int transition )
+ {
+ this.transition = transition;
+ }
+
+
+ /**
+ * Get the states for this container's grammars
+ *
+ * @return
+ * the states.
+ */
+ public IStates getStates()
+ {
+ return states;
+ }
+
+
+ /**
+ * Gets the grammar
+ *
+ * @return
+ * the grammar
+ */
+ public AbstractGrammar getGrammar()
+ {
+ return grammar;
+ }
+
+
+ /**
+ * Sets the Grammar
+ *
+ * @param grammar
+ * the grammar to set
+ */
+ public void setGrammar( AbstractGrammar grammar )
+ {
+ this.grammar = grammar;
+ }
+
+
+ /**
+ * Get the transition associated with the state and tag
+ *
+ * @param state
+ * the current state
+ * @param tag
+ * the current tag
+ * @return
+ * a valid transition if any, or null.
+ */
+ public GrammarTransition getTransition( int state, Tag tag )
+ {
+ return grammar.getTransition( state, tag );
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2Parser.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2Parser.java
new file mode 100644
index 0000000..a52604d
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2Parser.java
@@ -0,0 +1,303 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.io.StringReader;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest;
+import org.apache.directory.studio.dsmlv2.request.Dsmlv2Grammar;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlPullParserFactory;
+
+
+/**
+ * This class represents the DSMLv2 Parser.
+ * It can be used to parse a DSMLv2 Request input.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Dsmlv2Parser
+{
+ /** The associated DSMLv2 container */
+ private Dsmlv2Container container;
+
+
+ /**
+ * Creates a new instance of Dsmlv2Parser.
+ *
+ * @throws XmlPullParserException
+ * if an error occurs while the initialization of the parser
+ */
+ public Dsmlv2Parser() throws XmlPullParserException
+ {
+ this.container = new Dsmlv2Container();
+
+ this.container.setGrammar( Dsmlv2Grammar.getInstance() );
+
+ XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
+ factory.setNamespaceAware( true );
+ XmlPullParser xpp = factory.newPullParser();
+
+ container.setParser( xpp );
+ }
+
+
+ /**
+ * Sets the input file the parser is going to parse
+ *
+ * @param fileName
+ * the name of the file
+ * @throws FileNotFoundException
+ * if the file does not exist
+ * @throws XmlPullParserException
+ * if an error occurs in the parser
+ */
+ public void setInputFile( String fileName ) throws FileNotFoundException, XmlPullParserException
+ {
+ Reader reader = new FileReader( fileName );
+ container.getParser().setInput( reader );
+ }
+
+
+ /**
+ * Sets the input stream the parser is going to process
+ *
+ * @param inputStream
+ * contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null)
+ * @param inputEncoding
+ * if not null it MUST be used as encoding for inputStream
+ * @throws XmlPullParserException
+ * if an error occurs in the parser
+ */
+ public void setInput( InputStream inputStream, String inputEncoding ) throws XmlPullParserException
+ {
+ container.getParser().setInput( inputStream, inputEncoding );
+ }
+
+
+ /**
+ * Sets the input string the parser is going to parse
+ *
+ * @param str
+ * the string the parser is going to parse
+ * @throws XmlPullParserException
+ * if an error occurs in the parser
+ */
+ public void setInput( String str ) throws XmlPullParserException
+ {
+ container.getParser().setInput( new StringReader( str ) );
+ }
+
+
+ /**
+ * Launches the parsing on the input
+ *
+ * @throws XmlPullParserException
+ * when an unrecoverable error occurs
+ * @throws IOException
+ */
+ public void parse() throws XmlPullParserException, IOException
+ {
+ Dsmlv2Grammar grammar = Dsmlv2Grammar.getInstance();
+
+ grammar.executeAction( container );
+ }
+
+
+ /**
+ * Launches the parsing of the Batch Request only
+ *
+ * @throws XmlPullParserException
+ * if an error occurs in the parser
+ */
+ public void parseBatchRequest() throws XmlPullParserException
+ {
+ XmlPullParser xpp = container.getParser();
+
+ int eventType = xpp.getEventType();
+ do
+ {
+ if ( eventType == XmlPullParser.START_DOCUMENT )
+ {
+ container.setState( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE );
+ }
+ else if ( eventType == XmlPullParser.END_DOCUMENT )
+ {
+ container.setState( Dsmlv2StatesEnum.END_STATE );
+ }
+ else if ( eventType == XmlPullParser.START_TAG )
+ {
+ processTag( container, Tag.START );
+ }
+ else if ( eventType == XmlPullParser.END_TAG )
+ {
+ processTag( container, Tag.END );
+ }
+ try
+ {
+ eventType = xpp.next();
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An IOException ocurred during parsing : " + e.getMessage(), xpp,
+ null );
+ }
+ }
+ while ( container.getState() != Dsmlv2StatesEnum.BATCHREQUEST_START_TAG );
+ }
+
+
+ /**
+ * Processes the task required in the grammar to the given tag type
+ *
+ * @param container
+ * the DSML container
+ * @param tagType
+ * the tag type
+ * @throws XmlPullParserException
+ * when an error occurs during the parsing
+ */
+ private void processTag( Dsmlv2Container container, int tagType ) throws XmlPullParserException
+ {
+ XmlPullParser xpp = container.getParser();
+
+ String tagName = xpp.getName().toLowerCase();
+
+ GrammarTransition transition = container.getTransition( container.getState(), new Tag( tagName, tagType ) );
+
+ if ( transition != null )
+ {
+ container.setState( transition.getNextState() );
+
+ if ( transition.hasAction() )
+ {
+ transition.getAction().action( container );
+ }
+ }
+ else
+ {
+ throw new XmlPullParserException( "The tag " + new Tag( tagName, tagType )
+ + " can't be found at this position", xpp, null );
+ }
+ }
+
+
+ /**
+ * Gets the Batch Request or null if the it has not been parsed yet
+ *
+ * @return
+ * the Batch Request or null if the it has not been parsed yet
+ */
+ public BatchRequest getBatchRequest()
+ {
+ return container.getBatchRequest();
+ }
+
+
+ /**
+ * Gets the next Request or null if there's no more request
+ * @return
+ * the next Request or null if there's no more request
+ * @throws XmlPullParserException
+ * when an error occurs during the parsing
+ */
+ public LdapMessage getNextRequest() throws XmlPullParserException
+ {
+ if ( container.getBatchRequest() == null )
+ {
+ parseBatchRequest();
+ }
+
+ XmlPullParser xpp = container.getParser();
+
+ int eventType = xpp.getEventType();
+ do
+ {
+ while ( eventType == XmlPullParser.TEXT )
+ {
+ try
+ {
+ xpp.next();
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An IOException ocurred during parsing : " + e.getMessage(), xpp,
+ null );
+ }
+ eventType = xpp.getEventType();
+ }
+
+ if ( eventType == XmlPullParser.START_DOCUMENT )
+ {
+ container.setState( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE );
+ }
+ else if ( eventType == XmlPullParser.END_DOCUMENT )
+ {
+ container.setState( Dsmlv2StatesEnum.END_STATE );
+ return null;
+ }
+ else if ( eventType == XmlPullParser.START_TAG )
+ {
+ processTag( container, Tag.START );
+ }
+ else if ( eventType == XmlPullParser.END_TAG )
+ {
+ processTag( container, Tag.END );
+ }
+ try
+ {
+ eventType = xpp.next();
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An IOException ocurred during parsing : " + e.getMessage(), xpp,
+ null );
+ }
+ }
+ while ( container.getState() != Dsmlv2StatesEnum.BATCHREQUEST_LOOP );
+
+ return container.getBatchRequest().getCurrentRequest();
+ }
+
+
+ /**
+ * Parses all the requests
+ *
+ * @throws XmlPullParserException
+ * when an error occurs during the parsing
+ */
+ public void parseAllRequests() throws XmlPullParserException
+ {
+ while ( getNextRequest() != null )
+ {
+ continue;
+ }
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2ResponseParser.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2ResponseParser.java
new file mode 100644
index 0000000..2a053d8
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2ResponseParser.java
@@ -0,0 +1,303 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.io.StringReader;
+
+import org.apache.directory.shared.ldap.codec.LdapResponse;
+import org.apache.directory.studio.dsmlv2.reponse.BatchResponse;
+import org.apache.directory.studio.dsmlv2.reponse.Dsmlv2ResponseGrammar;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlPullParserFactory;
+
+
+/**
+ * This class represents the DSMLv2 Parser.
+ * It can be used to parse a DSMLv2 Response input.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Dsmlv2ResponseParser
+{
+ /** The associated DSMLv2 container */
+ private Dsmlv2Container container;
+
+
+ /**
+ * Creates a new instance of Dsmlv2ResponseParser.
+ *
+ * @throws XmlPullParserException
+ * if an error occurs while the initialization of the parser
+ */
+ public Dsmlv2ResponseParser() throws XmlPullParserException
+ {
+ this.container = new Dsmlv2Container();
+
+ this.container.setGrammar( Dsmlv2ResponseGrammar.getInstance() );
+
+ XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
+ factory.setNamespaceAware( true );
+ XmlPullParser xpp = factory.newPullParser();
+
+ container.setParser( xpp );
+ }
+
+
+ /**
+ * Sets the input string the parser is going to parse
+ *
+ * @param str
+ * the string the parser is going to parse
+ * @throws XmlPullParserException
+ * if an error occurs in the parser
+ */
+ public void setInput( String str ) throws FileNotFoundException, XmlPullParserException
+ {
+ container.getParser().setInput( new StringReader( str ) );
+ }
+
+
+ /**
+ * Sets the input file the parser is going to parse
+ *
+ * @param fileName
+ * the name of the file
+ * @throws FileNotFoundException
+ * if the file does not exist
+ * @throws XmlPullParserException
+ * if an error occurs in the parser
+ */
+ public void setInputFile( String fileName ) throws FileNotFoundException, XmlPullParserException
+ {
+ Reader reader = new FileReader( fileName );
+ container.getParser().setInput( reader );
+ }
+
+
+ /**
+ * Sets the input stream the parser is going to process
+ *
+ * @param inputStream
+ * contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null)
+ * @param inputEncoding
+ * if not null it MUST be used as encoding for inputStream
+ * @throws XmlPullParserException
+ * if an error occurs in the parser
+ */
+ public void setInput( InputStream inputStream, String inputEncoding ) throws XmlPullParserException
+ {
+ container.getParser().setInput( inputStream, inputEncoding );
+ }
+
+
+ /**
+ * Launches the parsing on the input
+ *
+ * @throws XmlPullParserException
+ * when an unrecoverable error occurs
+ * @throws IOException
+ */
+ public void parse() throws XmlPullParserException, IOException
+ {
+ Dsmlv2ResponseGrammar grammar = Dsmlv2ResponseGrammar.getInstance();
+
+ grammar.executeAction( container );
+ }
+
+
+ /**
+ * Launches the parsing of the Batch Response only
+ *
+ * @throws XmlPullParserException
+ * if an error occurs in the parser
+ */
+ public void parseBatchResponse() throws XmlPullParserException
+ {
+ XmlPullParser xpp = container.getParser();
+
+ int eventType = xpp.getEventType();
+ do
+ {
+ if ( eventType == XmlPullParser.START_DOCUMENT )
+ {
+ container.setState( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE );
+ }
+ else if ( eventType == XmlPullParser.END_DOCUMENT )
+ {
+ container.setState( Dsmlv2StatesEnum.END_STATE );
+ }
+ else if ( eventType == XmlPullParser.START_TAG )
+ {
+ processTag( container, Tag.START );
+ }
+ else if ( eventType == XmlPullParser.END_TAG )
+ {
+ processTag( container, Tag.END );
+ }
+ try
+ {
+ eventType = xpp.next();
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An IOException ocurred during parsing : " + e.getMessage(), xpp,
+ null );
+ }
+ }
+ while ( container.getState() != Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP );
+ }
+
+
+ /**
+ * Processes the task required in the grammar to the given tag type
+ *
+ * @param container
+ * the DSML container
+ * @param tagType
+ * the tag type
+ * @throws XmlPullParserException
+ * when an error occurs during the parsing
+ */
+ private void processTag( Dsmlv2Container container, int tagType ) throws XmlPullParserException
+ {
+ XmlPullParser xpp = container.getParser();
+
+ String tagName = xpp.getName().toLowerCase();
+
+ GrammarTransition transition = container.getTransition( container.getState(), new Tag( tagName, tagType ) );
+
+ if ( transition != null )
+ {
+ container.setState( transition.getNextState() );
+
+ if ( transition.hasAction() )
+ {
+ transition.getAction().action( container );
+ }
+ }
+ else
+ {
+ throw new XmlPullParserException( "The tag " + new Tag( tagName, tagType )
+ + " can't be found at this position", xpp, null );
+ }
+ }
+
+
+ /**
+ * Gets the Batch Response or null if the it has not been parsed yet
+ *
+ * @return
+ * the Batch Response or null if the it has not been parsed yet
+ */
+ public BatchResponse getBatchResponse()
+ {
+ return container.getBatchResponse();
+ }
+
+
+ /**
+ * Returns the next Request or null if there's no more request
+ * @return
+ * the next Request or null if there's no more request
+ * @throws XmlPullParserException
+ * when an error occurs during the parsing
+ */
+ public LdapResponse getNextResponse() throws XmlPullParserException
+ {
+ if ( container.getBatchResponse() == null )
+ {
+ parseBatchResponse();
+ }
+
+ XmlPullParser xpp = container.getParser();
+
+ int eventType = xpp.getEventType();
+ do
+ {
+ while ( eventType == XmlPullParser.TEXT )
+ {
+ try
+ {
+ xpp.next();
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An IOException ocurred during parsing : " + e.getMessage(), xpp,
+ null );
+ }
+ eventType = xpp.getEventType();
+ }
+
+ if ( eventType == XmlPullParser.START_DOCUMENT )
+ {
+ container.setState( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE );
+ }
+ else if ( eventType == XmlPullParser.END_DOCUMENT )
+ {
+ container.setState( Dsmlv2StatesEnum.END_STATE );
+ return null;
+ }
+ else if ( eventType == XmlPullParser.START_TAG )
+ {
+ processTag( container, Tag.START );
+ }
+ else if ( eventType == XmlPullParser.END_TAG )
+ {
+ processTag( container, Tag.END );
+ }
+ try
+ {
+ eventType = xpp.next();
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An IOException ocurred during parsing : " + e.getMessage(), xpp,
+ null );
+ }
+ }
+ while ( container.getState() != Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP );
+
+ return container.getBatchResponse().getCurrentResponse();
+ }
+
+
+ /**
+ * Parses all the responses
+ *
+ * @throws XmlPullParserException
+ * when an error occurs during the parsing
+ */
+ public void parseAllResponses() throws XmlPullParserException
+ {
+ while ( getNextResponse() != null )
+ {
+ continue;
+ }
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2StatesEnum.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2StatesEnum.java
new file mode 100644
index 0000000..2fc6481
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Dsmlv2StatesEnum.java
@@ -0,0 +1,807 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+/**
+ * This class store the Dsml grammar's constants. It is also used for debugging
+ * purpose
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Dsmlv2StatesEnum implements IStates
+{
+ //====================================================
+ // <batchRequest> ... </batchRequest>
+ //====================================================
+ /** The <batchRequest> tag */
+ public static final int BATCHREQUEST_START_TAG = 104;
+
+ public static final int BATCHREQUEST_LOOP = 105;
+
+ /** The </batchRequest> tag */
+ public static final int BATCHREQUEST_END_TAG = 1;
+
+ //====================================================
+ // <abandonRequest> ... </abandonRequest>
+ //====================================================
+ /** The <abandonRequest> tag */
+ public static final int ABANDON_REQUEST_START_TAG = 2;
+
+ /** The <control> tag */
+ public static final int ABANDON_REQUEST_CONTROL_START_TAG = 4;
+
+ /** The </control> tag */
+ public static final int ABANDON_REQUEST_CONTROL_END_TAG = 5;
+
+ /** The <controlValue> tag */
+ public static final int ABANDON_REQUEST_CONTROLVALUE_START_TAG = 6;
+
+ /** The </controlValue> tag */
+ public static final int ABANDON_REQUEST_CONTROLVALUE_END_TAG = 7;
+
+ //====================================================
+ // <addRequest> ... </addRequest>
+ //====================================================
+ /** The <addRequest> tag */
+ public static final int ADD_REQUEST_START_TAG = 8;
+
+ /** The <control> tag */
+ public static final int ADD_REQUEST_CONTROL_START_TAG = 10;
+
+ /** The </control> tag */
+ public static final int ADD_REQUEST_CONTROL_END_TAG = 11;
+
+ /** The <controlValue> tag */
+ public static final int ADD_REQUEST_CONTROLVALUE_START_TAG = 12;
+
+ /** The </controlValue> tag */
+ public static final int ADD_REQUEST_CONTROLVALUE_END_TAG = 13;
+
+ /** The <attr> tag */
+ public static final int ADD_REQUEST_ATTR_START_TAG = 14;
+
+ /** The </attr> tag */
+ public static final int ADD_REQUEST_ATTR_END_TAG = 15;
+
+ /** The <value> tag */
+ public static final int ADD_REQUEST_VALUE_START_TAG = 16;
+
+ /** The </value> tag */
+ public static final int ADD_REQUEST_VALUE_END_TAG = 17;
+
+ //====================================================
+ // <authRequest> ... </authRequest>
+ //====================================================
+ /** The <authRequest> tag */
+ public static final int AUTH_REQUEST_START_TAG = 18;
+
+ /** The <control> tag */
+ public static final int AUTH_REQUEST_CONTROL_START_TAG = 20;
+
+ /** The </control> tag */
+ public static final int AUTH_REQUEST_CONTROL_END_TAG = 21;
+
+ /** The <controlValue> tag */
+ public static final int AUTH_REQUEST_CONTROLVALUE_START_TAG = 22;
+
+ /** The </controlValue> tag */
+ public static final int AUTH_REQUEST_CONTROLVALUE_END_TAG = 23;
+
+ //====================================================
+ // <compareRequest> ... </compareRequest>
+ //====================================================
+ /** The <compareRequest> tag */
+ public static final int COMPARE_REQUEST_START_TAG = 24;
+
+ /** The <control> tag */
+ public static final int COMPARE_REQUEST_CONTROL_START_TAG = 26;
+
+ /** The </control> tag */
+ public static final int COMPARE_REQUEST_CONTROL_END_TAG = 27;
+
+ /** The <controlValue> tag */
+ public static final int COMPARE_REQUEST_CONTROLVALUE_START_TAG = 28;
+
+ /** The </controlValue> tag */
+ public static final int COMPARE_REQUEST_CONTROLVALUE_END_TAG = 29;
+
+ /** The <assertion> tag */
+ public static final int COMPARE_REQUEST_ASSERTION_START_TAG = 30;
+
+ /** The </assertion> tag */
+ public static final int COMPARE_REQUEST_ASSERTION_END_TAG = 31;
+
+ /** The <value> tag */
+ public static final int COMPARE_REQUEST_VALUE_START_TAG = 32;
+
+ /** The </value> tag */
+ public static final int COMPARE_REQUEST_VALUE_END_TAG = 33;
+
+ //====================================================
+ // <delRequest> ... </delRequest>
+ //====================================================
+ /** The <delRequest> tag */
+ public static final int DEL_REQUEST_START_TAG = 34;
+
+ /** The <control> tag */
+ public static final int DEL_REQUEST_CONTROL_START_TAG = 36;
+
+ /** The </control> tag */
+ public static final int DEL_REQUEST_CONTROL_END_TAG = 37;
+
+ /** The <controlValue> tag */
+ public static final int DEL_REQUEST_CONTROLVALUE_START_TAG = 38;
+
+ /** The </controlValue> tag */
+ public static final int DEL_REQUEST_CONTROLVALUE_END_TAG = 39;
+
+ //====================================================
+ // <extendedRequest> ... </extendedRequest>
+ //====================================================
+ /** The <extendedRequest> tag */
+ public static final int EXTENDED_REQUEST_START_TAG = 40;
+
+ /** The <control> tag */
+ public static final int EXTENDED_REQUEST_CONTROL_START_TAG = 42;
+
+ /** The </control> tag */
+ public static final int EXTENDED_REQUEST_CONTROL_END_TAG = 43;
+
+ /** The <controlValue> tag */
+ public static final int EXTENDED_REQUEST_CONTROLVALUE_START_TAG = 44;
+
+ /** The </controlValue> tag */
+ public static final int EXTENDED_REQUEST_CONTROLVALUE_END_TAG = 45;
+
+ /** The <requestName> tag */
+ public static final int EXTENDED_REQUEST_REQUESTNAME_START_TAG = 46;
+
+ /** The </requestName> tag */
+ public static final int EXTENDED_REQUEST_REQUESTNAME_END_TAG = 47;
+
+ /** The <requestValue> tag */
+ public static final int EXTENDED_REQUEST_REQUESTVALUE_START_TAG = 48;
+
+ /** The </requestValue> tag */
+ public static final int EXTENDED_REQUEST_REQUESTVALUE_END_TAG = 49;
+
+ //====================================================
+ // <modDNRequest> ... </modDNRequest>
+ //====================================================
+ /** The <modDNRequest> tag */
+ public static final int MODIFY_DN_REQUEST_START_TAG = 50;
+
+ /** The <control> tag */
+ public static final int MODIFY_DN_REQUEST_CONTROL_START_TAG = 52;
+
+ /** The </control> tag */
+ public static final int MODIFY_DN_REQUEST_CONTROL_END_TAG = 53;
+
+ /** The <controlValue> tag */
+ public static final int MODIFY_DN_REQUEST_CONTROLVALUE_START_TAG = 54;
+
+ /** The </controlValue> tag */
+ public static final int MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG = 55;
+
+ //====================================================
+ // <modifyRequest> ... </modifyRequest>
+ //====================================================
+ /** The <modifyRequest> tag */
+ public static final int MODIFY_REQUEST_START_TAG = 56;
+
+ /** The <control> tag */
+ public static final int MODIFY_REQUEST_CONTROL_START_TAG = 58;
+
+ /** The </control> tag */
+ public static final int MODIFY_REQUEST_CONTROL_END_TAG = 59;
+
+ /** The <controlValue> tag */
+ public static final int MODIFY_REQUEST_CONTROLVALUE_START_TAG = 60;
+
+ /** The </controlValue> tag */
+ public static final int MODIFY_REQUEST_CONTROLVALUE_END_TAG = 61;
+
+ /** The <modification> tag */
+ public static final int MODIFY_REQUEST_MODIFICATION_START_TAG = 62;
+
+ /** The </modification> tag */
+ public static final int MODIFY_REQUEST_MODIFICATION_END_TAG = 63;
+
+ /** The <value> tag */
+ public static final int MODIFY_REQUEST_VALUE_START_TAG = 64;
+
+ /** The </value> tag */
+ public static final int MODIFY_REQUEST_VALUE_END_TAG = 65;
+
+ //====================================================
+ // <searchRequest> ... </searchRequest>
+ //====================================================
+ /** The <searchRequest> tag */
+ public static final int SEARCH_REQUEST_START_TAG = 66;
+
+ /** The <control> tag */
+ public static final int SEARCH_REQUEST_CONTROL_START_TAG = 68;
+
+ /** The </control> tag */
+ public static final int SEARCH_REQUEST_CONTROL_END_TAG = 69;
+
+ /** The <controlValue> tag */
+ public static final int SEARCH_REQUEST_CONTROLVALUE_START_TAG = 70;
+
+ /** The </controlValue> tag */
+ public static final int SEARCH_REQUEST_CONTROLVALUE_END_TAG = 71;
+
+ /** The <filter> tag */
+ public static final int SEARCH_REQUEST_FILTER_START_TAG = 72;
+
+ /** The </filter> tag */
+ public static final int SEARCH_REQUEST_FILTER_END_TAG = 73;
+
+ /** The <attributes> tag */
+ public static final int SEARCH_REQUEST_ATTRIBUTES_START_TAG = 74;
+
+ /** The </attributes> tag */
+ public static final int SEARCH_REQUEST_ATTRIBUTES_END_TAG = 75;
+
+ /** The <attribute> tag */
+ public static final int SEARCH_REQUEST_ATTRIBUTE_START_TAG = 76;
+
+ /** The </attribute> tag */
+ public static final int SEARCH_REQUEST_ATTRIBUTE_END_TAG = 77;
+
+ /** The <equalityMatch> tag */
+ public static final int SEARCH_REQUEST_EQUALITYMATCH_START_TAG = 84;
+
+ /** The <subStrings> tag */
+ public static final int SEARCH_REQUEST_SUBSTRINGS_START_TAG = 86;
+
+ /** The </subStrings> tag */
+ public static final int SEARCH_REQUEST_SUBSTRINGS_END_TAG = 87;
+
+ /** The <greaterOrEqual> tag */
+ public static final int SEARCH_REQUEST_GREATEROREQUAL_START_TAG = 88;
+
+ /** The <lessOrEqual> tag */
+ public static final int SEARCH_REQUEST_LESSOREQUAL_START_TAG = 90;
+
+ /** The <present> tag */
+ public static final int SEARCH_REQUEST_PRESENT_START_TAG = 92;
+
+ /** The <approxMatch> tag */
+ public static final int SEARCH_REQUEST_APPROXMATCH_START_TAG = 94;
+
+ /** The <extensibleMatch> tag */
+ public static final int SEARCH_REQUEST_EXTENSIBLEMATCH_START_TAG = 96;
+
+ /** The <value> tag */
+ public static final int SEARCH_REQUEST_EXTENSIBLEMATCH_VALUE_START_TAG = 109;
+
+ /** The </value> tag */
+ public static final int SEARCH_REQUEST_EXTENSIBLEMATCH_VALUE_END_TAG = 110;
+
+ /** The <initial> tag */
+ public static final int SEARCH_REQUEST_INITIAL_START_TAG = 98;
+
+ /** The </initial> tag */
+ public static final int SEARCH_REQUEST_INITIAL_END_TAG = 99;
+
+ /** The <any> tag */
+ public static final int SEARCH_REQUEST_ANY_START_TAG = 100;
+
+ /** The </any> tag */
+ public static final int SEARCH_REQUEST_ANY_END_TAG = 101;
+
+ /** The <final> tag */
+ public static final int SEARCH_REQUEST_FINAL_START_TAG = 102;
+
+ /** The </final> tag */
+ public static final int SEARCH_REQUEST_FINAL_END_TAG = 103;
+
+ /** The <value> tag */
+ public static final int SEARCH_REQUEST_VALUE_START_TAG = 107;
+
+ /** The </value> tag */
+ public static final int SEARCH_REQUEST_VALUE_END_TAG = 108;
+
+ /** The Filter Loop state */
+ public static final int SEARCH_REQUEST_FILTER_LOOP = 106;
+
+ //****************
+ // DSML Response
+ //****************
+
+ /** The Batch Response Loop state */
+ public static final int BATCH_RESPONSE_LOOP = 200;
+
+ /** The Error Response Loop state */
+ public static final int ERROR_RESPONSE = 201;
+
+ /** The Message Start state */
+ public static final int MESSAGE_START = 202;
+
+ /** The Message End state */
+ public static final int MESSAGE_END = 203;
+
+ /** The Detail Start state */
+ public static final int DETAIL_START = 204;
+
+ /** The Detail End state */
+ public static final int DETAIL_END = 205;
+
+ /** The Extended Response state */
+ public static final int EXTENDED_RESPONSE = 206;
+
+ /** The Extended Response Control Start state */
+ public static final int EXTENDED_RESPONSE_CONTROL_START = 207;
+
+ /** The Extended Response Control End state */
+ public static final int EXTENDED_RESPONSE_CONTROL_END = 208;
+
+ /** The Extended Response Control Value Start state */
+ public static final int EXTENDED_RESPONSE_CONTROL_VALUE_START = 245;
+
+ /** The Extended Response Control Value End state */
+ public static final int EXTENDED_RESPONSE_CONTROL_VALUE_END = 246;
+
+ /** The Extended Response Result Code Start state */
+ public static final int EXTENDED_RESPONSE_RESULT_CODE_START = 209;
+
+ /** The Extended Response Result Code End state */
+ public static final int EXTENDED_RESPONSE_RESULT_CODE_END = 210;
+
+ /** The Extended Response Error Message Start state */
+ public static final int EXTENDED_RESPONSE_ERROR_MESSAGE_START = 211;
+
+ /** The Extended Response Error Message End state */
+ public static final int EXTENDED_RESPONSE_ERROR_MESSAGE_END = 212;
+
+ /** The Extended Response Referral Start state */
+ public static final int EXTENDED_RESPONSE_REFERRAL_START = 213;
+
+ /** The Extended Response Referral End state */
+ public static final int EXTENDED_RESPONSE_REFERRAL_END = 214;
+
+ /** The Response Name Start state */
+ public static final int RESPONSE_NAME_START = 215;
+
+ /** The Response Name End state */
+ public static final int RESPONSE_NAME_END = 216;
+
+ /** The Response Start state */
+ public static final int RESPONSE_START = 217;
+
+ /** The Response End state */
+ public static final int RESPONSE_END = 218;
+
+ /** The LDAP Result state */
+ public static final int LDAP_RESULT = 219;
+
+ /** The LDAP Result Control Start state */
+ public static final int LDAP_RESULT_CONTROL_START = 220;
+
+ /** The LDAP Result Control End state */
+ public static final int LDAP_RESULT_CONTROL_END = 221;
+
+ /** The LDAP Result Control Value Start state */
+ public static final int LDAP_RESULT_CONTROL_VALUE_START = 247;
+
+ /** The LDAP Result Control Value End state */
+ public static final int LDAP_RESULT_CONTROL_VALUE_END = 248;
+
+ /** The LDAP Result Result Code Start state */
+ public static final int LDAP_RESULT_RESULT_CODE_START = 222;
+
+ /** The LDAP Result Result Code End state */
+ public static final int LDAP_RESULT_RESULT_CODE_END = 223;
+
+ /** The LDAP Result Error Message Start state */
+ public static final int LDAP_RESULT_ERROR_MESSAGE_START = 224;
+
+ /** The LDAP Result Error Message End state */
+ public static final int LDAP_RESULT_ERROR_MESSAGE_END = 225;
+
+ /** The LDAP Result Referral Start state */
+ public static final int LDAP_RESULT_REFERRAL_START = 226;
+
+ /** The LDAP Result Referral End state */
+ public static final int LDAP_RESULT_REFERRAL_END = 227;
+
+ /** The LDAP Result End state */
+ public static final int LDAP_RESULT_END = 228;
+
+ /** The Search Response state */
+ public static final int SEARCH_RESPONSE = 229;
+
+ /** The Search Result Entry state */
+ public static final int SEARCH_RESULT_ENTRY = 230;
+
+ /** The Search Result Entry Control Start state */
+ public static final int SEARCH_RESULT_ENTRY_CONTROL_START = 231;
+
+ /** The Search Result Entry Control End state */
+ public static final int SEARCH_RESULT_ENTRY_CONTROL_END = 232;
+
+ /** The Search Result Entry Control Value Start state */
+ public static final int SEARCH_RESULT_ENTRY_CONTROL_VALUE_START = 249;
+
+ /** The Search Result Entry Control Value End state */
+ public static final int SEARCH_RESULT_ENTRY_CONTROL_VALUE_END = 250;
+
+ /** The Search Result Entry Attr Start state */
+ public static final int SEARCH_RESULT_ENTRY_ATTR_START = 233;
+
+ /** The Search Result Entry Attr End state */
+ public static final int SEARCH_RESULT_ENTRY_ATTR_END = 234;
+
+ /** The Search Result Entry Value Start state */
+ public static final int SEARCH_RESULT_ENTRY_VALUE_START = 235;
+
+ /** The Search Result Entry Value End state */
+ public static final int SEARCH_RESULT_ENTRY_VALUE_END = 236;
+
+ /** The Search Result Entry Loop state */
+ public static final int SEARCH_RESULT_ENTRY_LOOP = 237;
+
+ /** The Search Result Reference state */
+ public static final int SEARCH_RESULT_REFERENCE = 238;
+
+ /** The Search Result Reference Control Start state */
+ public static final int SEARCH_RESULT_REFERENCE_CONTROL_START = 239;
+
+ /** The Search Result Reference Control End state */
+ public static final int SEARCH_RESULT_REFERENCE_CONTROL_END = 240;
+
+ /** The Search Result Reference Control Value Start state */
+ public static final int SEARCH_RESULT_REFERENCE_CONTROL_VALUE_START = 251;
+
+ /** The Search Result Reference Control Value End state */
+ public static final int SEARCH_RESULT_REFERENCE_CONTROL_VALUE_END = 252;
+
+ /** The Search Result Reference Ref Start state */
+ public static final int SEARCH_RESULT_REFERENCE_REF_START = 241;
+
+ /** The Search Result Reference Ref End state */
+ public static final int SEARCH_RESULT_REFERENCE_REF_END = 242;
+
+ /** The Search Result Reference Loop state */
+ public static final int SEARCH_RESULT_REFERENCE_LOOP = 243;
+
+ /** The Search Result Done End state */
+ public static final int SEARCH_RESULT_DONE_END = 244;
+
+ /** The instance */
+ private static Dsmlv2StatesEnum instance = new Dsmlv2StatesEnum();
+
+
+ private Dsmlv2StatesEnum()
+ {
+ }
+
+
+ /**
+ * Get an instance of this class
+ *
+ * @return An instance on this class
+ */
+ public static Dsmlv2StatesEnum getInstance()
+ {
+ return instance;
+ }
+
+
+ /** Get the current state for a specified grammar */
+ public String getState( int state )
+ {
+ switch ( state )
+ {
+ case BATCHREQUEST_START_TAG:
+ return "BATCHREQUEST_START_TAG";
+ case BATCHREQUEST_LOOP:
+ return "BATCHREQUEST_LOOP";
+ case BATCHREQUEST_END_TAG:
+ return "BATCHREQUEST_END_TAG";
+ case ABANDON_REQUEST_START_TAG:
+ return "ABANDON_REQUEST_START_TAG";
+ case ABANDON_REQUEST_CONTROL_START_TAG:
+ return "ABANDON_REQUEST_CONTROL_START_TAG";
+ case ABANDON_REQUEST_CONTROL_END_TAG:
+ return "ABANDON_REQUEST_CONTROL_END_TAG";
+ case ABANDON_REQUEST_CONTROLVALUE_START_TAG:
+ return "ABANDON_REQUEST_CONTROLVALUE_START_TAG";
+ case ABANDON_REQUEST_CONTROLVALUE_END_TAG:
+ return "ABANDON_REQUEST_CONTROLVALUE_END_TAG";
+ case ADD_REQUEST_START_TAG:
+ return "ADD_REQUEST_START_TAG";
+ case ADD_REQUEST_CONTROL_START_TAG:
+ return "ADD_REQUEST_CONTROL_START_TAG";
+ case ADD_REQUEST_CONTROL_END_TAG:
+ return "ADD_REQUEST_CONTROL_END_TAG";
+ case ADD_REQUEST_CONTROLVALUE_START_TAG:
+ return "ADD_REQUEST_CONTROLVALUE_START_TAG";
+ case ADD_REQUEST_CONTROLVALUE_END_TAG:
+ return "ADD_REQUEST_CONTROLVALUE_END_TAG";
+ case ADD_REQUEST_ATTR_START_TAG:
+ return "ADD_REQUEST_ATTR_START_TAG";
+ case ADD_REQUEST_ATTR_END_TAG:
+ return "ADD_REQUEST_ATTR_END_TAG";
+ case ADD_REQUEST_VALUE_START_TAG:
+ return "ADD_REQUEST_VALUE_START_TAG";
+ case ADD_REQUEST_VALUE_END_TAG:
+ return "ADD_REQUEST_VALUE_END_TAG";
+ case AUTH_REQUEST_START_TAG:
+ return "AUTH_REQUEST_START_TAG";
+ case AUTH_REQUEST_CONTROL_START_TAG:
+ return "AUTH_REQUEST_CONTROL_START_TAG";
+ case AUTH_REQUEST_CONTROL_END_TAG:
+ return "AUTH_REQUEST_CONTROL_END_TAG";
+ case AUTH_REQUEST_CONTROLVALUE_START_TAG:
+ return "AUTH_REQUEST_CONTROLVALUE_START_TAG";
+ case AUTH_REQUEST_CONTROLVALUE_END_TAG:
+ return "AUTH_REQUEST_CONTROLVALUE_END_TAG";
+ case COMPARE_REQUEST_START_TAG:
+ return "COMPARE_REQUEST_START_TAG";
+ case COMPARE_REQUEST_CONTROL_START_TAG:
+ return "COMPARE_REQUEST_CONTROL_START_TAG";
+ case COMPARE_REQUEST_CONTROL_END_TAG:
+ return "COMPARE_REQUEST_CONTROL_END_TAG";
+ case COMPARE_REQUEST_CONTROLVALUE_START_TAG:
+ return "COMPARE_REQUEST_CONTROLVALUE_START_TAG";
+ case COMPARE_REQUEST_CONTROLVALUE_END_TAG:
+ return "COMPARE_REQUEST_CONTROLVALUE_END_TAG";
+ case COMPARE_REQUEST_ASSERTION_START_TAG:
+ return "COMPARE_REQUEST_ASSERTION_START_TAG";
+ case COMPARE_REQUEST_ASSERTION_END_TAG:
+ return "COMPARE_REQUEST_ASSERTION_END_TAG";
+ case COMPARE_REQUEST_VALUE_START_TAG:
+ return "COMPARE_REQUEST_VALUE_START_TAG";
+ case COMPARE_REQUEST_VALUE_END_TAG:
+ return "COMPARE_REQUEST_VALUE_END_TAG";
+ case DEL_REQUEST_START_TAG:
+ return "DEL_REQUEST_START_TAG";
+ case DEL_REQUEST_CONTROL_START_TAG:
+ return "DEL_REQUEST_CONTROL_START_TAG";
+ case DEL_REQUEST_CONTROL_END_TAG:
+ return "DEL_REQUEST_CONTROL_END_TAG";
+ case DEL_REQUEST_CONTROLVALUE_START_TAG:
+ return "DEL_REQUEST_CONTROLVALUE_START_TAG";
+ case DEL_REQUEST_CONTROLVALUE_END_TAG:
+ return "DEL_REQUEST_CONTROLVALUE_END_TAG";
+ case EXTENDED_REQUEST_START_TAG:
+ return "EXTENDED_REQUEST_START_TAG";
+ case EXTENDED_REQUEST_CONTROL_START_TAG:
+ return "EXTENDED_REQUEST_CONTROL_START_TAG";
+ case EXTENDED_REQUEST_CONTROL_END_TAG:
+ return "EXTENDED_REQUEST_CONTROL_END_TAG";
+ case EXTENDED_REQUEST_CONTROLVALUE_START_TAG:
+ return "EXTENDED_REQUEST_CONTROLVALUE_START_TAG";
+ case EXTENDED_REQUEST_CONTROLVALUE_END_TAG:
+ return "EXTENDED_REQUEST_CONTROLVALUE_END_TAG";
+ case EXTENDED_REQUEST_REQUESTNAME_START_TAG:
+ return "EXTENDED_REQUEST_REQUESTNAME_START_TAG";
+ case EXTENDED_REQUEST_REQUESTNAME_END_TAG:
+ return "EXTENDED_REQUEST_REQUESTNAME_END_TAG";
+ case EXTENDED_REQUEST_REQUESTVALUE_START_TAG:
+ return "EXTENDED_REQUEST_REQUESTVALUE_START_TAG";
+ case EXTENDED_REQUEST_REQUESTVALUE_END_TAG:
+ return "EXTENDED_REQUEST_REQUESTVALUE_END_TAG";
+ case MODIFY_DN_REQUEST_START_TAG:
+ return "MODIFY_DN_REQUEST_START_TAG";
+ case MODIFY_DN_REQUEST_CONTROL_START_TAG:
+ return "MODIFY_DN_REQUEST_CONTROL_START_TAG";
+ case MODIFY_DN_REQUEST_CONTROL_END_TAG:
+ return "MODIFY_DN_REQUEST_CONTROL_END_TAG";
+ case MODIFY_DN_REQUEST_CONTROLVALUE_START_TAG:
+ return "MODIFY_DN_REQUEST_CONTROLVALUE_START_TAG";
+ case MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG:
+ return "MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG";
+ case MODIFY_REQUEST_START_TAG:
+ return "MODIFY_REQUEST_START_TAG";
+ case MODIFY_REQUEST_CONTROL_START_TAG:
+ return "MODIFY_REQUEST_CONTROL_START_TAG";
+ case MODIFY_REQUEST_CONTROL_END_TAG:
+ return "MODIFY_REQUEST_CONTROL_END_TAG";
+ case MODIFY_REQUEST_CONTROLVALUE_START_TAG:
+ return "MODIFY_REQUEST_CONTROLVALUE_START_TAG";
+ case MODIFY_REQUEST_CONTROLVALUE_END_TAG:
+ return "MODIFY_REQUEST_CONTROLVALUE_END_TAG";
+ case MODIFY_REQUEST_MODIFICATION_START_TAG:
+ return "MODIFY_REQUEST_MODIFICATION_START_TAG";
+ case MODIFY_REQUEST_MODIFICATION_END_TAG:
+ return "MODIFY_REQUEST_MODIFICATION_END_TAG";
+ case MODIFY_REQUEST_VALUE_START_TAG:
+ return "MODIFY_REQUEST_VALUE_START_TAG";
+ case MODIFY_REQUEST_VALUE_END_TAG:
+ return "MODIFY_REQUEST_VALUE_END_TAG";
+ case SEARCH_REQUEST_START_TAG:
+ return "SEARCH_REQUEST_START_TAG";
+ case SEARCH_REQUEST_CONTROL_START_TAG:
+ return "SEARCH_REQUEST_CONTROL_START_TAG";
+ case SEARCH_REQUEST_CONTROL_END_TAG:
+ return "SEARCH_REQUEST_CONTROL_END_TAG";
+ case SEARCH_REQUEST_CONTROLVALUE_START_TAG:
+ return "SEARCH_REQUEST_CONTROLVALUE_START_TAG";
+ case SEARCH_REQUEST_CONTROLVALUE_END_TAG:
+ return "SEARCH_REQUEST_CONTROLVALUE_END_TAG";
+ case SEARCH_REQUEST_FILTER_START_TAG:
+ return "SEARCH_REQUEST_FILTER_START_TAG";
+ case SEARCH_REQUEST_FILTER_END_TAG:
+ return "SEARCH_REQUEST_FILTER_END_TAG";
+ case SEARCH_REQUEST_ATTRIBUTES_START_TAG:
+ return "SEARCH_REQUEST_ATTRIBUTES_START_TAG";
+ case SEARCH_REQUEST_ATTRIBUTES_END_TAG:
+ return "SEARCH_REQUEST_ATTRIBUTES_END_TAG";
+ case SEARCH_REQUEST_ATTRIBUTE_START_TAG:
+ return "SEARCH_REQUEST_ATTRIBUTE_START_TAG";
+ case SEARCH_REQUEST_ATTRIBUTE_END_TAG:
+ return "SEARCH_REQUEST_ATTRIBUTE_END_TAG";
+ case SEARCH_REQUEST_EQUALITYMATCH_START_TAG:
+ return "SEARCH_REQUEST_EQUALITYMATCH_START_TAG";
+ case SEARCH_REQUEST_SUBSTRINGS_START_TAG:
+ return "SEARCH_REQUEST_SUBSTRINGS_START_TAG";
+ case SEARCH_REQUEST_SUBSTRINGS_END_TAG:
+ return "SEARCH_REQUEST_SUBSTRINGS_END_TAG";
+ case SEARCH_REQUEST_GREATEROREQUAL_START_TAG:
+ return "SEARCH_REQUEST_GREATEROREQUAL_START_TAG";
+ case SEARCH_REQUEST_LESSOREQUAL_START_TAG:
+ return "SEARCH_REQUEST_LESSOREQUAL_START_TAG";
+ case SEARCH_REQUEST_PRESENT_START_TAG:
+ return "SEARCH_REQUEST_PRESENT_START_TAG";
+ case SEARCH_REQUEST_APPROXMATCH_START_TAG:
+ return "SEARCH_REQUEST_APPROXMATCH_START_TAG";
+ case SEARCH_REQUEST_EXTENSIBLEMATCH_START_TAG:
+ return "SEARCH_REQUEST_EXTENSIBLEMATCH_START_TAG";
+ case SEARCH_REQUEST_EXTENSIBLEMATCH_VALUE_START_TAG:
+ return "SEARCH_REQUEST_EXTENSIBLEMATCH_VALUE_START_TAG";
+ case SEARCH_REQUEST_EXTENSIBLEMATCH_VALUE_END_TAG:
+ return "SEARCH_REQUEST_EXTENSIBLEMATCH_VALUE_END_TAG";
+ case SEARCH_REQUEST_INITIAL_START_TAG:
+ return "SEARCH_REQUEST_INITIAL_START_TAG";
+ case SEARCH_REQUEST_INITIAL_END_TAG:
+ return "SEARCH_REQUEST_INITIAL_END_TAG";
+ case SEARCH_REQUEST_ANY_START_TAG:
+ return "SEARCH_REQUEST_ANY_START_TAG";
+ case SEARCH_REQUEST_ANY_END_TAG:
+ return "SEARCH_REQUEST_ANY_END_TAG";
+ case SEARCH_REQUEST_FINAL_START_TAG:
+ return "SEARCH_REQUEST_FINAL_START_TAG";
+ case SEARCH_REQUEST_FINAL_END_TAG:
+ return "SEARCH_REQUEST_FINAL_END_TAG";
+ case SEARCH_REQUEST_VALUE_START_TAG:
+ return "SEARCH_REQUEST_VALUE_START_TAG";
+ case SEARCH_REQUEST_VALUE_END_TAG:
+ return "SEARCH_REQUEST_VALUE_END_TAG";
+ case SEARCH_REQUEST_FILTER_LOOP:
+ return "SEARCH_REQUEST_FILTER_LOOP";
+
+ case BATCH_RESPONSE_LOOP:
+ return "BATCH_RESPONSE_LOOP";
+ case ERROR_RESPONSE:
+ return "ERROR_RESPONSE";
+ case MESSAGE_START:
+ return "MESSAGE_START";
+ case MESSAGE_END:
+ return "MESSAGE_END";
+ case DETAIL_START:
+ return "DETAIL_START";
+ case DETAIL_END:
+ return "DETAIL_END";
+ case EXTENDED_RESPONSE:
+ return "EXTENDED_RESPONSE";
+ case EXTENDED_RESPONSE_CONTROL_START:
+ return "EXTENDED_RESPONSE_CONTROL_START";
+ case EXTENDED_RESPONSE_CONTROL_END:
+ return "EXTENDED_RESPONSE_CONTROL_END";
+ case EXTENDED_RESPONSE_CONTROL_VALUE_START:
+ return "EXTENDED_RESPONSE_CONTROL_VALUE_START";
+ case EXTENDED_RESPONSE_CONTROL_VALUE_END:
+ return "EXTENDED_RESPONSE_CONTROL_VALUE_END";
+ case EXTENDED_RESPONSE_RESULT_CODE_START:
+ return "EXTENDED_RESPONSE_RESULT_CODE_START";
+ case EXTENDED_RESPONSE_RESULT_CODE_END:
+ return "EXTENDED_RESPONSE_RESULT_CODE_END";
+ case EXTENDED_RESPONSE_ERROR_MESSAGE_START:
+ return "EXTENDED_RESPONSE_ERROR_MESSAGE_START";
+ case EXTENDED_RESPONSE_ERROR_MESSAGE_END:
+ return "EXTENDED_RESPONSE_ERROR_MESSAGE_END";
+ case EXTENDED_RESPONSE_REFERRAL_START:
+ return "EXTENDED_RESPONSE_REFERRAL_START";
+ case EXTENDED_RESPONSE_REFERRAL_END:
+ return "EXTENDED_RESPONSE_REFERRAL_END";
+ case RESPONSE_NAME_START:
+ return "RESPONSE_NAME_START";
+ case RESPONSE_NAME_END:
+ return "RESPONSE_NAME_END";
+ case RESPONSE_START:
+ return "RESPONSE_START";
+ case RESPONSE_END:
+ return "RESPONSE_END";
+ case LDAP_RESULT:
+ return "LDAP_RESULT";
+ case LDAP_RESULT_CONTROL_START:
+ return "LDAP_RESULT_CONTROL_START";
+ case LDAP_RESULT_CONTROL_END:
+ return "LDAP_RESULT_CONTROL_END";
+ case LDAP_RESULT_CONTROL_VALUE_START:
+ return "LDAP_RESULT_CONTROL_VALUE_START";
+ case LDAP_RESULT_CONTROL_VALUE_END:
+ return "LDAP_RESULT_CONTROL_VALUE_END";
+ case LDAP_RESULT_RESULT_CODE_START:
+ return "LDAP_RESULT_RESULT_CODE_START";
+ case LDAP_RESULT_RESULT_CODE_END:
+ return "LDAP_RESULT_RESULT_CODE_END";
+ case LDAP_RESULT_ERROR_MESSAGE_START:
+ return "LDAP_RESULT_ERROR_MESSAGE_START";
+ case LDAP_RESULT_ERROR_MESSAGE_END:
+ return "LDAP_RESULT_ERROR_MESSAGE_END";
+ case LDAP_RESULT_REFERRAL_START:
+ return "LDAP_RESULT_REFERRAL_START";
+ case LDAP_RESULT_REFERRAL_END:
+ return "LDAP_RESULT_REFERRAL_END";
+ case LDAP_RESULT_END:
+ return "LDAP_RESULT_END";
+ case SEARCH_RESPONSE:
+ return "SEARCH_RESPONSE";
+ case SEARCH_RESULT_ENTRY:
+ return "SEARCH_RESULT_ENTRY";
+ case SEARCH_RESULT_ENTRY_CONTROL_START:
+ return "SEARCH_RESULT_ENTRY_CONTROL_START";
+ case SEARCH_RESULT_ENTRY_CONTROL_END:
+ return "SEARCH_RESULT_ENTRY_CONTROL_END";
+ case SEARCH_RESULT_ENTRY_CONTROL_VALUE_START:
+ return "SEARCH_RESULT_ENTRY_CONTROL_VALUE_START";
+ case SEARCH_RESULT_ENTRY_CONTROL_VALUE_END:
+ return "SEARCH_RESULT_ENTRY_CONTROL_VALUE_END";
+ case SEARCH_RESULT_ENTRY_ATTR_START:
+ return "SEARCH_RESULT_ENTRY_ATTR_START";
+ case SEARCH_RESULT_ENTRY_ATTR_END:
+ return "SEARCH_RESULT_ENTRY_ATTR_END";
+ case SEARCH_RESULT_ENTRY_VALUE_START:
+ return "SEARCH_RESULT_ENTRY_VALUE_START";
+ case SEARCH_RESULT_ENTRY_VALUE_END:
+ return "SEARCH_RESULT_ENTRY_VALUE_END";
+ case SEARCH_RESULT_ENTRY_LOOP:
+ return "SEARCH_RESULT_ENTRY_LOOP";
+ case SEARCH_RESULT_REFERENCE:
+ return "SEARCH_RESULT_REFERENCE";
+ case SEARCH_RESULT_REFERENCE_CONTROL_START:
+ return "SEARCH_RESULT_REFERENCE_CONTROL_START";
+ case SEARCH_RESULT_REFERENCE_CONTROL_END:
+ return "SEARCH_RESULT_REFERENCE_CONTROL_END";
+ case SEARCH_RESULT_REFERENCE_CONTROL_VALUE_START:
+ return "SEARCH_RESULT_REFERENCE_CONTROL_VALUE_START";
+ case SEARCH_RESULT_REFERENCE_CONTROL_VALUE_END:
+ return "SEARCH_RESULT_REFERENCE_CONTROL_VALUE_END";
+ case SEARCH_RESULT_REFERENCE_REF_START:
+ return "SEARCH_RESULT_REFERENCE_REF_START";
+ case SEARCH_RESULT_REFERENCE_REF_END:
+ return "SEARCH_RESULT_REFERENCE_REF_END";
+ case SEARCH_RESULT_REFERENCE_LOOP:
+ return "SEARCH_RESULT_REFERENCE_LOOP";
+ case SEARCH_RESULT_DONE_END:
+ return "SEARCH_RESULT_DONE_END";
+
+ default:
+ return "UNKNOWN";
+ }
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/GrammarAction.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/GrammarAction.java
new file mode 100644
index 0000000..0fd3cf2
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/GrammarAction.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+/**
+ * A top level grammar class that store meta informations about the actions.
+ * Those informations are not mandatory, but they can be usefull for debugging.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class GrammarAction implements IAction
+{
+ /** The action's name */
+ protected String name;
+
+
+ /**
+ * Creates a new GrammarAction object.
+ *
+ * @param name
+ * the name of the create daction
+ */
+ public GrammarAction( String name )
+ {
+ this.name = name;
+ }
+
+
+ /**
+ * Print the action's name
+ *
+ * @return
+ * the action's name
+ */
+ public String toString()
+ {
+ return name;
+ }
+}
\ No newline at end of file
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/GrammarTransition.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/GrammarTransition.java
new file mode 100644
index 0000000..a6acd77
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/GrammarTransition.java
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+/**
+ * Define a transition between two states of a grammar. It stores the next
+ * state, and the action to execute while transiting.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class GrammarTransition
+{
+ /** The next state in the grammar */
+ private int nextState;
+
+ /** The action associated to the transition */
+ private GrammarAction action;
+
+ /** The current state */
+ private int currentState;
+
+
+ /**
+ * Creates a new GrammarTransition object.
+ *
+ * @param currentState
+ * The current transition
+ * @param nextState
+ * The target state
+ * @param action
+ * The action to execute. It could be null.
+ */
+ public GrammarTransition( int currentState, int nextState, GrammarAction action )
+ {
+ this.currentState = currentState;
+ this.nextState = nextState;
+ this.action = action;
+ }
+
+ /**
+ * Gets the target state
+ *
+ * @return
+ * the target state.
+ */
+ public int getNextState()
+ {
+ return nextState;
+ }
+
+
+ /**
+ * Tells if the transition has an associated action.
+ *
+ * @return
+ * <code>true</code> if an action has been asociated to the
+ * transition
+ */
+ public boolean hasAction()
+ {
+ return action != null;
+ }
+
+
+ /**
+ * Gets the action associated with the transition
+ *
+ * @return
+ * the action associated with the transition
+ */
+ public GrammarAction getAction()
+ {
+ return action;
+ }
+
+
+ /**
+ * Returns a representation of the transition as a string
+ *
+ * @param grammar
+ * the grammar which state we want a String from
+ * @param statesEnum
+ * the states enum that contains the states' names
+ * @return
+ * a representation of the transition as a string.
+ */
+ public String toString( int grammar, IStates statesEnum )
+ {
+
+ StringBuffer sb = new StringBuffer();
+
+ sb.append( "Transition from <" ).append( statesEnum.getState( currentState ) ).append( "> to <" ).append(
+ statesEnum.getState( nextState ) ).append( ">, action : " ).append(
+ ( ( action == null ) ? "no action" : action.toString() ) ).append( ">" );
+
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/IAction.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/IAction.java
new file mode 100644
index 0000000..7b37fb0
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/IAction.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+import org.xmlpull.v1.XmlPullParserException;
+
+
+/**
+ * IAction interface just contains the method 'action' which must be implemented
+ * in all the implementong classes.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface IAction
+{
+ // ~ Methods
+ // ------------------------------------------------------------------------------------
+
+ /**
+ * The action to be executed.
+ *
+ * @param container
+ * the container which stores the current data
+ * @throws XmlPullParserException
+ * thrown if something went wrong.
+ */
+ public void action( Dsmlv2Container container ) throws XmlPullParserException;
+}
\ No newline at end of file
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/IGrammar.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/IGrammar.java
new file mode 100644
index 0000000..6cace4b
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/IGrammar.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+import java.io.IOException;
+
+import org.xmlpull.v1.XmlPullParserException;
+
+
+/**
+ * The interface which expose common behavior of a Gramar implementer.
+ */
+public interface IGrammar
+{
+ // ~ Methods
+ // ------------------------------------------------------------------------------------
+
+ /**
+ * This method, when called, execute an action on the current data stored in
+ * the container.
+ *
+ * @param container
+ * the DSML container
+ * @throws XmlPullParserException
+ * Thrown when an unrecoverable error occurs.
+ * @throws IOException
+ */
+ void executeAction( Dsmlv2Container container ) throws XmlPullParserException, IOException;
+
+
+ /**
+ * Get the grammar name
+ *
+ * @return Return the grammar's name
+ */
+ String getName();
+
+
+ /**
+ * Get the statesEnum for the current grammar
+ *
+ * @return The specific States Enum for the current grammar
+ */
+ IStates getStatesEnum();
+
+
+ /**
+ * Set the grammar's name
+ *
+ * @param name
+ * The grammar name
+ */
+ void setName( String name );
+}
\ No newline at end of file
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/IStates.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/IStates.java
new file mode 100644
index 0000000..db4ea4d
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/IStates.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+/**
+ * This interface is used to store the different states of a grammar.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface IStates
+{
+ /** The initial state of every grammar */
+ static int INIT_GRAMMAR_STATE = 0;
+
+ /** The ending state for every grammars */
+ static int GRAMMAR_END = -1;
+
+ /** The END_STATE */
+ static int END_STATE = -1;
+
+
+ /**
+ * Gets the specified state
+ *
+ * @param state
+ * the identifier of the state
+ * @return
+ * the specified state
+ */
+ String getState( int state );
+}
\ No newline at end of file
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/LdapMessageDecorator.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/LdapMessageDecorator.java
new file mode 100644
index 0000000..0238c62
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/LdapMessageDecorator.java
@@ -0,0 +1,479 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+import java.nio.ByteBuffer;
+import java.util.List;
+
+import org.apache.directory.shared.asn1.AbstractAsn1Object;
+import org.apache.directory.shared.asn1.Asn1Object;
+import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapResponse;
+import org.apache.directory.shared.ldap.codec.abandon.AbandonRequest;
+import org.apache.directory.shared.ldap.codec.add.AddRequest;
+import org.apache.directory.shared.ldap.codec.add.AddResponse;
+import org.apache.directory.shared.ldap.codec.bind.BindRequest;
+import org.apache.directory.shared.ldap.codec.bind.BindResponse;
+import org.apache.directory.shared.ldap.codec.compare.CompareRequest;
+import org.apache.directory.shared.ldap.codec.compare.CompareResponse;
+import org.apache.directory.shared.ldap.codec.del.DelRequest;
+import org.apache.directory.shared.ldap.codec.del.DelResponse;
+import org.apache.directory.shared.ldap.codec.extended.ExtendedRequest;
+import org.apache.directory.shared.ldap.codec.extended.ExtendedResponse;
+import org.apache.directory.shared.ldap.codec.modify.ModifyRequest;
+import org.apache.directory.shared.ldap.codec.modify.ModifyResponse;
+import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequest;
+import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponse;
+import org.apache.directory.shared.ldap.codec.search.SearchRequest;
+import org.apache.directory.shared.ldap.codec.search.SearchResultDone;
+import org.apache.directory.shared.ldap.codec.search.SearchResultEntry;
+import org.apache.directory.shared.ldap.codec.search.SearchResultReference;
+import org.apache.directory.shared.ldap.codec.unbind.UnBindRequest;
+
+
+/**
+ * Decorator class for LDAP Message. This is the top level class, the one
+ * that holds the instance.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class LdapMessageDecorator extends LdapMessage
+{
+ /** The decorated instance */
+ protected LdapMessage instance;
+
+
+ /**
+ * Creates a new instance of LdapMessageDecorator.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public LdapMessageDecorator( LdapMessage ldapMessage )
+ {
+ instance = ldapMessage;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#addControl(org.apache.directory.shared.ldap.codec.Control)
+ */
+ @Override
+ public void addControl( Control control )
+ {
+ instance.addControl( control );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#computeLength()
+ */
+ @Override
+ public int computeLength()
+ {
+ return instance.computeLength();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#encode(java.nio.ByteBuffer)
+ */
+ @Override
+ public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+ {
+ return instance.encode( buffer );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getAbandonRequest()
+ */
+ @Override
+ public AbandonRequest getAbandonRequest()
+ {
+ return instance.getAbandonRequest();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getAddRequest()
+ */
+ @Override
+ public AddRequest getAddRequest()
+ {
+ return instance.getAddRequest();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getAddResponse()
+ */
+ @Override
+ public AddResponse getAddResponse()
+ {
+ return instance.getAddResponse();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getBindRequest()
+ */
+ @Override
+ public BindRequest getBindRequest()
+ {
+ return instance.getBindRequest();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getBindResponse()
+ */
+ @Override
+ public BindResponse getBindResponse()
+ {
+ return instance.getBindResponse();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getCompareRequest()
+ */
+ @Override
+ public CompareRequest getCompareRequest()
+ {
+ return instance.getCompareRequest();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getCompareResponse()
+ */
+ @Override
+ public CompareResponse getCompareResponse()
+ {
+ return instance.getCompareResponse();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getControls()
+ */
+ @Override
+ public List<Control> getControls()
+ {
+ return instance.getControls();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getControls(int)
+ */
+ @Override
+ public Control getControls( int i )
+ {
+ return instance.getControls( i );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getCurrentControl()
+ */
+ @Override
+ public Control getCurrentControl()
+ {
+ return instance.getCurrentControl();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getDelRequest()
+ */
+ @Override
+ public DelRequest getDelRequest()
+ {
+ return instance.getDelRequest();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getDelResponse()
+ */
+ @Override
+ public DelResponse getDelResponse()
+ {
+ return instance.getDelResponse();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getExtendedRequest()
+ */
+ @Override
+ public ExtendedRequest getExtendedRequest()
+ {
+ return instance.getExtendedRequest();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getExtendedResponse()
+ */
+ @Override
+ public ExtendedResponse getExtendedResponse()
+ {
+ return instance.getExtendedResponse();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getLdapResponse()
+ */
+ @Override
+ public LdapResponse getLdapResponse()
+ {
+ return instance.getLdapResponse();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getMessageId()
+ */
+ @Override
+ public int getMessageId()
+ {
+ return instance.getMessageId();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getMessageType()
+ */
+ @Override
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getMessageTypeName()
+ */
+ @Override
+ public String getMessageTypeName()
+ {
+ return instance.getMessageTypeName();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getModifyDNRequest()
+ */
+ @Override
+ public ModifyDNRequest getModifyDNRequest()
+ {
+ return instance.getModifyDNRequest();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getModifyDNResponse()
+ */
+ @Override
+ public ModifyDNResponse getModifyDNResponse()
+ {
+ return instance.getModifyDNResponse();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getModifyRequest()
+ */
+ @Override
+ public ModifyRequest getModifyRequest()
+ {
+ return instance.getModifyRequest();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getModifyResponse()
+ */
+ @Override
+ public ModifyResponse getModifyResponse()
+ {
+ return instance.getModifyResponse();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getSearchRequest()
+ */
+ @Override
+ public SearchRequest getSearchRequest()
+ {
+ return instance.getSearchRequest();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getSearchResultDone()
+ */
+ @Override
+ public SearchResultDone getSearchResultDone()
+ {
+ return instance.getSearchResultDone();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getSearchResultEntry()
+ */
+ @Override
+ public SearchResultEntry getSearchResultEntry()
+ {
+ return instance.getSearchResultEntry();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getSearchResultReference()
+ */
+ @Override
+ public SearchResultReference getSearchResultReference()
+ {
+ return instance.getSearchResultReference();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#getUnBindRequest()
+ */
+ @Override
+ public UnBindRequest getUnBindRequest()
+ {
+ return instance.getUnBindRequest();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#setMessageId(int)
+ */
+ @Override
+ public void setMessageId( int messageId )
+ {
+ instance.setMessageId( messageId );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#setProtocolOP(org.apache.directory.shared.asn1.Asn1Object)
+ */
+ @Override
+ public void setProtocolOP( Asn1Object protocolOp )
+ {
+ instance.setProtocolOP( protocolOp );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapMessage#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return instance.toString();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.asn1.Asn1Object#addLength(int)
+ */
+ @Override
+ public void addLength( int length ) throws DecoderException
+ {
+ instance.addLength( length );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.asn1.Asn1Object#getCurrentLength()
+ */
+ @Override
+ public int getCurrentLength()
+ {
+ return instance.getCurrentLength();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.asn1.Asn1Object#getExpectedLength()
+ */
+ @Override
+ public int getExpectedLength()
+ {
+ return instance.getExpectedLength();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.asn1.Asn1Object#getParent()
+ */
+ @Override
+ public AbstractAsn1Object getParent()
+ {
+ return instance.getParent();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.asn1.Asn1Object#setCurrentLength(int)
+ */
+ @Override
+ public void setCurrentLength( int currentLength )
+ {
+ instance.setCurrentLength( currentLength );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.asn1.Asn1Object#setExpectedLength(int)
+ */
+ @Override
+ public void setExpectedLength( int expectedLength )
+ {
+ instance.setExpectedLength( expectedLength );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.asn1.Asn1Object#setParent(org.apache.directory.shared.asn1.Asn1Object)
+ */
+ @Override
+ public void setParent( AbstractAsn1Object parent )
+ {
+ instance.setParent( parent );
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/ParserUtils.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/ParserUtils.java
new file mode 100644
index 0000000..407acbf
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/ParserUtils.java
@@ -0,0 +1,307 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+import java.util.List;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.ldif.LdifUtils;
+import org.apache.directory.shared.ldap.util.Base64;
+import org.apache.directory.studio.dsmlv2.engine.Dsmlv2Engine;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest.Processing;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest.ResponseOrder;
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.dom4j.Namespace;
+import org.dom4j.QName;
+import org.dom4j.io.DocumentResult;
+import org.dom4j.io.DocumentSource;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+
+/**
+ * This class is a Helper class for the DSML Parser
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ParserUtils
+{
+ public static final String XML_SCHEMA_URI = "http://www.w3c.org/2001/XMLSchema";
+ public static final String XML_SCHEMA_INSTANCE_URI = "http://www.w3c.org/2001/XMLSchema-instance";
+ public static final String BASE64BINARY = "base64Binary";
+ public static final String XSI = "xsi";
+ public static final String XSD = "xsd";
+
+
+ /**
+ * Returns the value of the attribute 'type' of the "XMLSchema-instance' namespace if it exists
+ *
+ * @param xpp
+ * the XPP parser to use
+ * @return
+ * the value of the attribute 'type' of the "XMLSchema-instance' namespace if it exists
+ */
+ public static String getXsiTypeAttributeValue( XmlPullParser xpp )
+ {
+ String type = null;
+ int nbAttributes = xpp.getAttributeCount();
+ for ( int i = 0; i < nbAttributes; i++ )
+ {
+ // Checking if the attribute 'type' from XML Schema Instance namespace is used.
+ if ( xpp.getAttributeName( i ).equals( "type" )
+ && xpp.getNamespace( xpp.getAttributePrefix( i ) ).equals( XML_SCHEMA_INSTANCE_URI ) )
+ {
+ type = xpp.getAttributeValue( i );
+ break;
+ }
+ }
+ return type;
+ }
+
+
+ /**
+ * Tells is the given value is a Base64 binary value
+ *
+ * @param parser
+ * the XPP parser to use
+ * @param attrValue
+ * the attribute value
+ * @return
+ * true if the value of the current tag is Base64BinaryEncoded, false if not
+ */
+ public static boolean isBase64BinaryValue( XmlPullParser parser, String attrValue )
+ {
+ if ( attrValue == null )
+ {
+ return false;
+ }
+ // We are looking for something that should look like that: "aNameSpace:base64Binary"
+ // We split the String. The first element should be the namespace prefix and the second "base64Binary"
+ String[] splitedString = attrValue.split( ":" );
+ return ( splitedString.length == 2 ) && ( XML_SCHEMA_URI.equals( parser.getNamespace( splitedString[0] ) ) )
+ && ( BASE64BINARY.equals( splitedString[1] ) );
+ }
+
+
+ /**
+ * Indicates if the value needs to be encoded as Base64
+ *
+ * @param value
+ * the value to check
+ * @return
+ * true if the value needs to be encoded as Base64
+ */
+ public static boolean needsBase64Encoding( Object value )
+ {
+ if ( value instanceof byte[] )
+ {
+ return true;
+ }
+ else if ( value instanceof String )
+ {
+ return !LdifUtils.isLDIFSafe( ( String ) value );
+ }
+ return true;
+ }
+
+
+ /**
+ * Encodes the value as a Base64 String
+ *
+ * @param value
+ * the value to encode
+ * @return
+ * the value encoded as a Base64 String
+ */
+ public static String base64Encode( Object value )
+ {
+ if ( value instanceof byte[] )
+ {
+ return new String( Base64.encode( ( byte[] ) value ) );
+ }
+ else if ( value instanceof String )
+ {
+ return new String( Base64.encode( ( ( String ) value ).getBytes() ) );
+ }
+
+ return "";
+ }
+
+
+ /**
+ * Parses and verify the parsed value of the requestID
+ *
+ * @param attributeValue
+ * the value of the attribute
+ * @param xpp
+ * the XmlPullParser
+ * @return
+ * the int value of the resquestID
+ * @throws XmlPullParserException
+ * if RequestID isn't an Integer and if requestID equals 0
+ */
+ public static int parseAndVerifyRequestID( String attributeValue, XmlPullParser xpp ) throws XmlPullParserException
+ {
+ try
+ {
+ int requestID = Integer.parseInt( attributeValue );
+
+ if ( requestID == 0 )
+ {
+ throw new XmlPullParserException( "The attribute requestID can't be equal to 0", xpp, null );
+ }
+
+ return requestID;
+ }
+ catch ( NumberFormatException e )
+ {
+ throw new XmlPullParserException( "the given requestID is not an integer", xpp, null );
+ }
+ }
+
+
+ /**
+ * Adds Controls to the given Element.
+ *
+ * @param element
+ * the element to add the Controls to
+ * @param controls
+ * a List of Controls
+ */
+ public static void addControls( Element element, List<Control> controls )
+ {
+ if ( controls != null )
+ {
+ for ( int i = 0; i < controls.size(); i++ )
+ {
+ Control control = controls.get( i );
+
+ Element controlElement = element.addElement( "control" );
+
+ if ( control.getControlType() != null )
+ {
+ controlElement.addAttribute( "type", control.getControlType() );
+ }
+
+ if ( control.getCriticality() )
+ {
+ controlElement.addAttribute( "criticality", "true" );
+ }
+
+ Object value = control.getControlValue();
+ if ( value != null )
+ {
+ if ( ParserUtils.needsBase64Encoding( value ) )
+ {
+ Namespace xsdNamespace = new Namespace( ParserUtils.XSD, ParserUtils.XML_SCHEMA_URI );
+ Namespace xsiNamespace = new Namespace( ParserUtils.XSI, ParserUtils.XML_SCHEMA_INSTANCE_URI );
+ element.getDocument().getRootElement().add( xsdNamespace );
+ element.getDocument().getRootElement().add( xsiNamespace );
+
+ Element valueElement = controlElement.addElement( "controlValue" ).addText(
+ ParserUtils.base64Encode( value ) );
+ valueElement.addAttribute( new QName( "type", xsiNamespace ), ParserUtils.XSD + ":"
+ + ParserUtils.BASE64BINARY );
+ }
+ else
+ {
+ controlElement.addElement( "controlValue" ).setText( ( String ) value );
+ }
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Indicates if a request ID is needed.
+ *
+ * @param container
+ * the associated container
+ * @return
+ * true if a request ID is needed (ie Processing=Parallel and ResponseOrder=Unordered)
+ * @throws XmlPullParserException
+ * if the batch request has not been parsed yet
+ */
+ public static boolean isRequestIdNeeded( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ BatchRequest batchRequest = container.getBatchRequest();
+
+ if ( batchRequest == null )
+ {
+ throw new XmlPullParserException( "unable to find the batch request", container.getParser(), null );
+ }
+
+ return ( ( batchRequest.getProcessing() == Processing.PARALLEL ) && ( batchRequest.getResponseOrder() == ResponseOrder.UNORDERED ) );
+ }
+
+
+ /**
+ * XML Pretty Printer XSLT Tranformation
+ *
+ * @param document
+ * the Dom4j Document
+ * @return
+ */
+ public static Document styleDocument( Document document )
+ {
+ // load the transformer using JAXP
+ TransformerFactory factory = TransformerFactory.newInstance();
+ Transformer transformer = null;
+ try
+ {
+ transformer = factory.newTransformer( new StreamSource( Dsmlv2Engine.class
+ .getResourceAsStream( "DSMLv2.xslt" ) ) );
+ }
+ catch ( TransformerConfigurationException e1 )
+ {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+
+ // now lets style the given document
+ DocumentSource source = new DocumentSource( document );
+ DocumentResult result = new DocumentResult();
+ try
+ {
+ transformer.transform( source, result );
+ }
+ catch ( TransformerException e )
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ // return the transformed document
+ Document transformedDoc = result.getDocument();
+ return transformedDoc;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Tag.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Tag.java
new file mode 100644
index 0000000..2712b79
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/Tag.java
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2;
+
+
+/**
+ * This class represents a XML tag.
+ * A XML tag is defined with :
+ * <ul>
+ * <li>a name</li>
+ * <li>a type (START tag or END tag)</li>
+ * </ul>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Tag
+{
+ /** The name of the tag */
+ private String name;
+
+ /** The type of the tag */
+ private int type;
+
+ /** This int represents a START tag */
+ public static int START = 0;
+
+ /** This int represents a END tag */
+ public static int END = 1;
+
+
+ /**
+ * Creates a new instance of Tag.
+ *
+ * @param name
+ * the name of the tag
+ * @param type
+ * the type of the tag
+ */
+ public Tag( String name, int type )
+ {
+ setName( name );
+ setType( type );
+ }
+
+
+ /**
+ * Gets the name of the tag
+ *
+ * @return
+ * the name of the tag
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+
+ /**
+ * Sets the name of the tag
+ *
+ * @param name
+ * the name to set
+ */
+ public void setName( String name )
+ {
+ this.name = name.toLowerCase();
+ }
+
+
+ /**
+ * Gets the type of the tag
+ *
+ * @return
+ * the type of the tag
+ */
+ public int getType()
+ {
+ return type;
+ }
+
+
+ /**
+ * Sets the type of the tag
+ *
+ * @param type
+ * the type to set
+ */
+ public void setType( int type )
+ {
+ this.type = type;
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals( Object obj )
+ {
+ if ( obj instanceof Tag )
+ {
+ Tag tag = ( Tag ) obj;
+ return ( ( this.name.equals( tag.getName() ) ) && ( this.type == tag.getType() ) );
+
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ return name.hashCode() + type << 24;
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ if ( name != null )
+ {
+ return "<" + ( ( type == Tag.END ) ? "/" : "" ) + name + ">";
+ }
+ else
+ {
+ return "Unknown tag";
+ }
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/engine/Dsmlv2Engine.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/engine/Dsmlv2Engine.java
new file mode 100644
index 0000000..4afd0dc
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/engine/Dsmlv2Engine.java
@@ -0,0 +1,649 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.engine;
+
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
+import java.nio.channels.SocketChannel;
+
+import javax.naming.NamingException;
+
+import org.apache.directory.shared.asn1.ber.Asn1Decoder;
+import org.apache.directory.shared.asn1.ber.IAsn1Container;
+import org.apache.directory.shared.asn1.ber.tlv.TLVStateEnum;
+import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.codec.LdapConstants;
+import org.apache.directory.shared.ldap.codec.LdapDecoder;
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
+import org.apache.directory.shared.ldap.codec.LdapResponse;
+import org.apache.directory.shared.ldap.codec.add.AddResponse;
+import org.apache.directory.shared.ldap.codec.bind.BindRequest;
+import org.apache.directory.shared.ldap.codec.bind.BindResponse;
+import org.apache.directory.shared.ldap.codec.bind.LdapAuthentication;
+import org.apache.directory.shared.ldap.codec.bind.SimpleAuthentication;
+import org.apache.directory.shared.ldap.codec.compare.CompareResponse;
+import org.apache.directory.shared.ldap.codec.del.DelResponse;
+import org.apache.directory.shared.ldap.codec.extended.ExtendedResponse;
+import org.apache.directory.shared.ldap.codec.modify.ModifyResponse;
+import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponse;
+import org.apache.directory.shared.ldap.codec.search.SearchResultDone;
+import org.apache.directory.shared.ldap.codec.search.SearchResultEntry;
+import org.apache.directory.shared.ldap.codec.search.SearchResultReference;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.studio.dsmlv2.Dsmlv2Parser;
+import org.apache.directory.studio.dsmlv2.reponse.AddResponseDsml;
+import org.apache.directory.studio.dsmlv2.reponse.AuthResponseDsml;
+import org.apache.directory.studio.dsmlv2.reponse.BatchResponseDsml;
+import org.apache.directory.studio.dsmlv2.reponse.CompareResponseDsml;
+import org.apache.directory.studio.dsmlv2.reponse.DelResponseDsml;
+import org.apache.directory.studio.dsmlv2.reponse.ErrorResponse;
+import org.apache.directory.studio.dsmlv2.reponse.ExtendedResponseDsml;
+import org.apache.directory.studio.dsmlv2.reponse.ModDNResponseDsml;
+import org.apache.directory.studio.dsmlv2.reponse.ModifyResponseDsml;
+import org.apache.directory.studio.dsmlv2.reponse.SearchResponseDsml;
+import org.apache.directory.studio.dsmlv2.reponse.SearchResultDoneDsml;
+import org.apache.directory.studio.dsmlv2.reponse.SearchResultEntryDsml;
+import org.apache.directory.studio.dsmlv2.reponse.SearchResultReferenceDsml;
+import org.apache.directory.studio.dsmlv2.reponse.ErrorResponse.ErrorResponseType;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest.OnError;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest.Processing;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest.ResponseOrder;
+import org.xmlpull.v1.XmlPullParserException;
+
+
+/**
+ * This is the DSMLv2Engine. It can be use to execute operations on a LDAP Server and get the results of these operations.
+ * The format used for request and responses is the DSMLv2 format.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Dsmlv2Engine
+{
+ /** Socket used to connect to the server */
+ private SocketChannel channel;
+ private SocketAddress serverAddress;
+
+ // server configuration
+ private int port;
+ private String host;
+ private String user;
+ private String password;
+
+ private Asn1Decoder ldapDecoder = new LdapDecoder();
+
+ private IAsn1Container ldapMessageContainer = new LdapMessageContainer();
+
+ private Dsmlv2Parser parser;
+
+ private boolean continueOnError;
+ private boolean exit = false;
+
+ private int bbLimit;
+
+ private int bbposition;
+ private BatchRequest batchRequest;
+ private BatchResponseDsml batchResponse;
+
+
+ /**
+ * Creates a new instance of Dsmlv2Engine.
+ *
+ * @param host
+ * the server host
+ * @param port
+ * the server port
+ * @param user
+ * the server admin DN
+ * @param password
+ * the server admin's password
+ */
+ public Dsmlv2Engine( String host, int port, String user, String password )
+ {
+ this.host = host;
+ this.port = port;
+ this.user = user;
+ this.password = password;
+ }
+
+
+ /**
+ * Processes the file given and return the result of the operations
+ *
+ * @param dsmlInput
+ * the DSMLv2 formatted request input
+ * @return
+ * the XML response in DSMLv2 Format
+ * @throws XmlPullParserException
+ * if an error occurs in the parser
+ */
+ public String processDSML( String dsmlInput ) throws XmlPullParserException
+ {
+ parser = new Dsmlv2Parser();
+ parser.setInput( dsmlInput );
+ return processDSML();
+ }
+
+
+ /**
+ * Processes the file given and return the result of the operations
+ *
+ * @param fileName
+ * the path to the file
+ * @return
+ * the XML response in DSMLv2 Format
+ * @throws XmlPullParserException
+ * if an error occurs in the parser
+ * @throws FileNotFoundException
+ * if the file does not exist
+ */
+ public String processDSMLFile( String fileName ) throws XmlPullParserException, FileNotFoundException
+ {
+ parser = new Dsmlv2Parser();
+ parser.setInputFile( fileName );
+ return processDSML();
+ }
+
+
+ /**
+ * Processes the file given and return the result of the operations
+ *
+ * @param inputStream
+ * contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null).
+ * @param inputEncoding
+ * if not null it MUST be used as encoding for inputStream
+ * @return
+ * the XML response in DSMLv2 Format
+ * @throws XmlPullParserException
+ * if an error occurs in the parser
+ */
+ public String processDSML( InputStream inputStream, String inputEncoding ) throws XmlPullParserException
+ {
+ parser = new Dsmlv2Parser();
+ parser.setInput( inputStream, inputEncoding );
+ return processDSML();
+ }
+
+
+ /**
+ * Processes the Request document
+ *
+ * @return
+ * the XML response in DSMLv2 Format
+ */
+ private String processDSML()
+ {
+ batchResponse = new BatchResponseDsml();
+
+ // Binding to LDAP Server
+ try
+ {
+ bind( 1 );
+ }
+ catch ( Exception e )
+ {
+ // Unable to connect to server
+ // We create a new ErrorResponse and return the XML response.
+ ErrorResponse errorResponse = new ErrorResponse( 0, ErrorResponseType.COULD_NOT_CONNECT, e.getMessage() );
+ batchResponse.addResponse( errorResponse );
+ return batchResponse.toDsml();
+ }
+
+ // Processing BatchRequest:
+ // - Parsing and Getting BatchRequest
+ // - Getting and registering options from BatchRequest
+ try
+ {
+ processBatchRequest();
+ }
+ catch ( XmlPullParserException e )
+ {
+ // We create a new ErrorResponse and return the XML response.
+ ErrorResponse errorResponse = new ErrorResponse( 0, ErrorResponseType.MALFORMED_REQUEST, e.getMessage()
+ + " - Line " + e.getLineNumber() + " - Column " + e.getColumnNumber() );
+ batchResponse.addResponse( errorResponse );
+ return batchResponse.toDsml();
+ }
+
+ // Processing each request:
+ // - Getting a new request
+ // - Checking if the request is well formed
+ // - Sending the request to the server
+ // - Getting and converting reponse(s) as XML
+ // - Looping until last request
+ LdapMessage request = null;
+ try
+ {
+ request = parser.getNextRequest();
+ }
+ catch ( XmlPullParserException e )
+ {
+ // We create a new ErrorResponse and return the XML response.
+ ErrorResponse errorResponse = new ErrorResponse( 0, ErrorResponseType.MALFORMED_REQUEST, e.getMessage()
+ + " - Line " + e.getLineNumber() + " - Column " + e.getColumnNumber() );
+ batchResponse.addResponse( errorResponse );
+ return batchResponse.toDsml();
+ }
+
+ while ( request != null ) // (Request == null when there's no more request to process)
+ {
+ // Checking the request has a requestID attribute if Processing = Parallel and ResponseOrder = Unordered
+ if ( ( batchRequest.getProcessing().equals( Processing.PARALLEL ) )
+ && ( batchRequest.getResponseOrder().equals( ResponseOrder.UNORDERED ) )
+ && ( request.getMessageId() == 0 ) )
+ {
+ // Then we have to send an errorResponse
+ ErrorResponse errorResponse = new ErrorResponse( 0, ErrorResponseType.MALFORMED_REQUEST,
+ "A requestID must be specified to each request when Processing is Parallel and ReponseOrder is Unordered." );
+ batchResponse.addResponse( errorResponse );
+ return batchResponse.toDsml();
+ }
+
+ try
+ {
+ processRequest( request );
+ }
+ catch ( Exception e )
+ {
+ // We create a new ErrorResponse and return the XML response.
+ ErrorResponse errorResponse = new ErrorResponse( 0, ErrorResponseType.GATEWAY_INTERNAL_ERROR,
+ "Internal Error: " + e.getMessage() );
+ batchResponse.addResponse( errorResponse );
+ return batchResponse.toDsml();
+ }
+
+ // Checking if we need to exit processing (if an error has ocurred if onError == Exit)
+ if ( exit )
+ {
+ break;
+ }
+
+ // Getting next request
+ try
+ {
+ request = parser.getNextRequest();
+ }
+ catch ( XmlPullParserException e )
+ {
+ // We create a new ErrorResponse and return the XML response.
+ ErrorResponse errorResponse = new ErrorResponse( 0, ErrorResponseType.MALFORMED_REQUEST, e.getMessage()
+ + " - Line " + e.getLineNumber() + " - Column " + e.getColumnNumber() );
+ batchResponse.addResponse( errorResponse );
+ return batchResponse.toDsml();
+ }
+ }
+
+ return batchResponse.toDsml();
+ }
+
+
+ /**
+ * Processes a single request
+ *
+ * @param request
+ * the request to process
+ * @throws EncoderException
+ * @throws IOException
+ * @throws NamingException
+ * @throws DecoderException
+ */
+ private void processRequest( LdapMessage request ) throws EncoderException, IOException, DecoderException,
+ NamingException
+ {
+ LdapMessage message = new LdapMessage();
+
+ message.setProtocolOP( request );
+
+ message.setMessageId( request.getMessageId() );
+
+ ByteBuffer bb = null;
+
+ bb = message.encode( null );
+
+ bb.flip();
+
+ sendMessage( bb );
+
+ bb.clear();
+ bb.position( bb.capacity() );
+ // Get the response
+ LdapMessage response = null;
+
+ response = readResponse( bb );
+
+ if ( LdapConstants.ADD_RESPONSE == response.getMessageType() )
+ {
+ AddResponse addResponse = response.getAddResponse();
+ copyMessageIdAndControls( response, addResponse );
+
+ AddResponseDsml addResponseDsml = new AddResponseDsml( addResponse );
+ batchResponse.addResponse( addResponseDsml );
+ }
+ else if ( LdapConstants.BIND_RESPONSE == response.getMessageType() )
+ {
+ BindResponse bindResponse = response.getBindResponse();
+ copyMessageIdAndControls( response, bindResponse );
+
+ AuthResponseDsml authResponseDsml = new AuthResponseDsml( bindResponse );
+ batchResponse.addResponse( authResponseDsml );
+ }
+ else if ( LdapConstants.COMPARE_RESPONSE == response.getMessageType() )
+ {
+ CompareResponse compareResponse = response.getCompareResponse();
+ copyMessageIdAndControls( response, compareResponse );
+
+ CompareResponseDsml authResponseDsml = new CompareResponseDsml( compareResponse );
+ batchResponse.addResponse( authResponseDsml );
+ }
+ else if ( LdapConstants.DEL_RESPONSE == response.getMessageType() )
+ {
+ DelResponse delResponse = response.getDelResponse();
+ copyMessageIdAndControls( response, delResponse );
+
+ DelResponseDsml delResponseDsml = new DelResponseDsml( delResponse );
+ batchResponse.addResponse( delResponseDsml );
+ }
+ else if ( LdapConstants.MODIFY_RESPONSE == response.getMessageType() )
+ {
+ ModifyResponse modifyResponse = response.getModifyResponse();
+ copyMessageIdAndControls( response, modifyResponse );
+
+ ModifyResponseDsml modifyResponseDsml = new ModifyResponseDsml( modifyResponse );
+ batchResponse.addResponse( modifyResponseDsml );
+ }
+ else if ( LdapConstants.MODIFYDN_RESPONSE == response.getMessageType() )
+ {
+ ModifyDNResponse modifyDNResponse = response.getModifyDNResponse();
+ copyMessageIdAndControls( response, modifyDNResponse );
+
+ ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( modifyDNResponse );
+ batchResponse.addResponse( modDNResponseDsml );
+ }
+ else if ( LdapConstants.EXTENDED_RESPONSE == response.getMessageType() )
+ {
+ ExtendedResponse extendedResponse = response.getExtendedResponse();
+ copyMessageIdAndControls( response, extendedResponse );
+
+ ExtendedResponseDsml extendedResponseDsml = new ExtendedResponseDsml( extendedResponse );
+ batchResponse.addResponse( extendedResponseDsml );
+ }
+ else if ( ( LdapConstants.SEARCH_RESULT_ENTRY == response.getMessageType() )
+ || ( LdapConstants.SEARCH_RESULT_REFERENCE == response.getMessageType() )
+ || ( LdapConstants.SEARCH_RESULT_DONE == response.getMessageType() ) )
+ {
+ // A SearchResponse can contains multiple responses of 3 types:
+ // - 0 to n SearchResultEntry
+ // - O to n SearchResultReference
+ // - 1 (only) SearchResultDone
+ // So we have to include those individual reponses in a "General" SearchResponse
+ // Element searchResponse = xmlResponse.getRootElement().addElement( "searchResponse" );
+ SearchResponseDsml searchResponseDsml = new SearchResponseDsml();
+
+ // RequestID
+ int requestID = response.getMessageId();
+ if ( requestID != 0 )
+ {
+ searchResponseDsml.setMessageId( requestID );
+ }
+
+ while ( LdapConstants.SEARCH_RESULT_DONE != response.getMessageType() )
+ {
+ if ( LdapConstants.SEARCH_RESULT_ENTRY == response.getMessageType() )
+ {
+ SearchResultEntry sre = response.getSearchResultEntry();
+ copyMessageIdAndControls( response, sre );
+
+ SearchResultEntryDsml searchResultEntryDsml = new SearchResultEntryDsml( sre );
+ searchResponseDsml.addResponse( searchResultEntryDsml );
+ }
+ else if ( LdapConstants.SEARCH_RESULT_REFERENCE == response.getMessageType() )
+ {
+ SearchResultReference srr = response.getSearchResultReference();
+ copyMessageIdAndControls( response, srr );
+
+ SearchResultReferenceDsml searchResultReferenceDsml = new SearchResultReferenceDsml( srr );
+ searchResponseDsml.addResponse( searchResultReferenceDsml );
+ }
+
+ response = readResponse( bb );
+ }
+
+ SearchResultDone srd = response.getSearchResultDone();
+ copyMessageIdAndControls( response, srd );
+
+ SearchResultDoneDsml searchResultDoneDsml = new SearchResultDoneDsml( response );
+ searchResponseDsml.addResponse( searchResultDoneDsml );
+ }
+
+ LdapResponse realResponse = response.getLdapResponse();
+
+ if ( !continueOnError )
+ {
+ if ( ( realResponse.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
+ && ( realResponse.getLdapResult().getResultCode() != ResultCodeEnum.COMPARE_TRUE )
+ && ( realResponse.getLdapResult().getResultCode() != ResultCodeEnum.COMPARE_FALSE )
+ && ( realResponse.getLdapResult().getResultCode() != ResultCodeEnum.REFERRAL ) )
+ {
+ // Turning on Exit flag
+ exit = true;
+ }
+ }
+
+ }
+
+
+ private void copyMessageIdAndControls( LdapMessage from, LdapMessage to )
+ {
+ to.setMessageId( from.getMessageId() );
+ for ( Control control : from.getControls() )
+ {
+ to.addControl( control );
+ }
+ }
+
+
+ /**
+ * Processes the BatchRequest
+ * <ul>
+ * <li>Parsing and Getting BatchRequest</li>
+ * <li>Getting and registering options from BatchRequest</li>
+ * </ul>
+ *
+ * @throws XmlPullParserException
+ * if an error occurs in the parser
+ */
+ private void processBatchRequest() throws XmlPullParserException
+ {
+ // Parsing BatchRequest
+ parser.parseBatchRequest();
+
+ // Getting BatchRequest
+ batchRequest = parser.getBatchRequest();
+
+ if ( OnError.RESUME.equals( batchRequest.getOnError() ) )
+ {
+ continueOnError = true;
+ }
+ else if ( OnError.EXIT.equals( batchRequest.getOnError() ) )
+ {
+ continueOnError = false;
+ }
+
+ if ( batchRequest.getRequestID() != 0 )
+ {
+ batchResponse.setRequestID( batchRequest.getRequestID() );
+ }
+ }
+
+
+ /**
+ * Connect to the LDAP server through a socket and establish the Input and
+ * Output Streams. All the required information for the connection should be
+ * in the options from the command line, or the default values.
+ *
+ * @throws UnknownHostException
+ * if the hostname or the Address of server could not be found
+ * @throws IOException
+ * if there was a error opening or establishing the socket
+ */
+ private void connect() throws UnknownHostException, IOException
+ {
+ serverAddress = new InetSocketAddress( host, port );
+ channel = SocketChannel.open( serverAddress );
+ channel.configureBlocking( true );
+ }
+
+
+ /**
+ * Sends a message
+ *
+ * @param bb
+ * the message as a byte buffer
+ * @throws IOException
+ * if the message could not be sent
+ */
+ private void sendMessage( ByteBuffer bb ) throws IOException
+ {
+ channel.write( bb );
+ bb.clear();
+ }
+
+
+ /**
+ * Reads the response to a request
+ *
+ * @param bb
+ * the response as a byte buffer
+ * @return the response
+ * the response as a LDAP message
+ * @throws IOException
+ * @throws DecoderException
+ * @throws NamingException
+ */
+ private LdapMessage readResponse( ByteBuffer bb ) throws IOException, DecoderException, NamingException
+ {
+
+ LdapMessage messageResp = null;
+
+ if ( bb.hasRemaining() )
+ {
+ bb.position( bbposition );
+ bb.limit( bbLimit );
+ ldapDecoder.decode( bb, ldapMessageContainer );
+ bbposition = bb.position();
+ bbLimit = bb.limit();
+ }
+ bb.flip();
+ while ( ldapMessageContainer.getState() != TLVStateEnum.PDU_DECODED )
+ {
+
+ int nbRead = channel.read( bb );
+
+ if ( nbRead == -1 )
+ {
+ System.err.println( "fsdfsdfsdfsd" );
+ }
+
+ bb.flip();
+ ldapDecoder.decode( bb, ldapMessageContainer );
+ bbposition = bb.position();
+ bbLimit = bb.limit();
+ bb.flip();
+ }
+
+ messageResp = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+
+ if ( messageResp instanceof BindResponse )
+ {
+ BindResponse resp = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage().getBindResponse();
+
+ if ( resp.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
+ {
+ System.err.println( "Error : " + resp.getLdapResult().getErrorMessage() );
+ }
+ }
+ else if ( messageResp instanceof ExtendedResponse )
+ {
+ ExtendedResponse resp = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage()
+ .getExtendedResponse();
+
+ if ( resp.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
+ {
+ System.err.println( "Error : " + resp.getLdapResult().getErrorMessage() );
+ }
+ }
+
+ ( ( LdapMessageContainer ) ldapMessageContainer ).clean();
+
+ return messageResp;
+ }
+
+
+ /**
+ * Binds to the ldap server
+ *
+ * @param messageId
+ * the message Id
+ * @throws EncoderException
+ * @throws DecoderException
+ * @throws IOException
+ * @throws NamingException
+ */
+ private void bind( int messageId ) throws EncoderException, DecoderException, IOException, NamingException
+ {
+ BindRequest bindRequest = new BindRequest();
+ LdapMessage message = new LdapMessage();
+ LdapAuthentication authentication = new SimpleAuthentication();
+ ( ( SimpleAuthentication ) authentication ).setSimple( StringTools.getBytesUtf8( password ) );
+
+ bindRequest.setAuthentication( authentication );
+ bindRequest.setName( new LdapDN( user ) );
+ bindRequest.setVersion( 3 );
+
+ message.setProtocolOP( bindRequest );
+ message.setMessageId( messageId );
+
+ // Encode and send the bind request
+ ByteBuffer bb = message.encode( null );
+ bb.flip();
+
+ connect();
+ sendMessage( bb );
+
+ bb.clear();
+
+ bb.position( bb.limit() );
+
+ readResponse( bb );
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AddResponseDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AddResponseDsml.java
new file mode 100644
index 0000000..69df91e
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AddResponseDsml.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.add.AddResponse;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.dom4j.Element;
+
+
+/**
+ * DSML Decorator for AddResponse
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AddResponseDsml extends LdapResponseDecorator implements DsmlDecorator
+{
+ /**
+ * Creates a new instance of AddResponseDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public AddResponseDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( "addResponse" );
+
+ LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( AddResponse ) instance ).getLdapResult(), instance );
+ ldapResultDsml.toDsml( element );
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AuthResponseDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AuthResponseDsml.java
new file mode 100644
index 0000000..2bb012d
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AuthResponseDsml.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.bind.BindResponse;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.dom4j.Element;
+
+
+/**
+ * DSML Decorator for AuthResponse
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AuthResponseDsml extends LdapResponseDecorator implements DsmlDecorator
+{
+ /**
+ * Creates a new instance of AuthResponseDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public AuthResponseDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( "authResponse" );
+
+ LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( BindResponse ) instance ).getLdapResult(), instance );
+ ldapResultDsml.toDsml( element );
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/BatchResponse.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/BatchResponse.java
new file mode 100644
index 0000000..0734eff
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/BatchResponse.java
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.shared.ldap.codec.LdapResponse;
+
+
+/**
+ * This class represents the Batch Response of a DSML Response
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class BatchResponse
+{
+
+ /**
+ * The responses contained in the Batch Response
+ */
+ private List<LdapResponse> responses;
+
+ /**
+ * The ID of the response
+ */
+ private int requestID;
+
+
+ /**
+ * Creates a new instance of BatchResponse.
+ */
+ public BatchResponse()
+ {
+ responses = new ArrayList<LdapResponse>();
+ }
+
+
+ /**
+ * Adds a reponse
+ *
+ * @param response
+ * the response to add
+ * @return
+ * true (as per the general contract of the Collection.add method)
+ */
+ public boolean addResponse( LdapResponse response )
+ {
+ return responses.add( response );
+ }
+
+
+ /**
+ * Gets the current reponse
+ *
+ * @return
+ * the current response
+ */
+ public LdapResponse getCurrentResponse()
+ {
+ return responses.get( responses.size() - 1 );
+ }
+
+
+ /**
+ * Gets the ID of the response
+ * @return
+ * the ID of the response
+ */
+ public int getRequestID()
+ {
+ return requestID;
+ }
+
+
+ /**
+ * Sets the ID of the response
+ *
+ * @param requestID
+ * the ID to set
+ */
+ public void setRequestID( int requestID )
+ {
+ this.requestID = requestID;
+ }
+
+
+ /**
+ * Gets the List of all the reponses
+ *
+ * @return
+ * the List of all the responses
+ */
+ public List getResponses()
+ {
+ return responses;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/BatchResponseDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/BatchResponseDsml.java
new file mode 100644
index 0000000..6ddce14
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/BatchResponseDsml.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.apache.directory.studio.dsmlv2.ParserUtils;
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+
+
+/**
+ * This class represents the Batch Response. It can be used to generate an the XML String of a BatchResponse.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class BatchResponseDsml
+{
+ /** The Responses list */
+ private List<DsmlDecorator> responses;
+
+ /** The ID of the response */
+ private int requestID;
+
+
+ /**
+ * Creates a new instance of BatchResponseDsml.
+ */
+ public BatchResponseDsml()
+ {
+ responses = new ArrayList<DsmlDecorator>();
+ }
+
+
+ /**
+ * Adds a request to the Batch Response DSML.
+ *
+ * @param response
+ * the request to add
+ * @return
+ * true (as per the general contract of the Collection.add method).
+ */
+ public boolean addResponse( DsmlDecorator response )
+ {
+ return responses.add( response );
+ }
+
+
+ /**
+ * Removes a request from the Batch Response DSML.
+ *
+ * @param response
+ * the request to remove
+ * @return
+ * true if this list contained the specified element.
+ */
+ public boolean removeResponse( DsmlDecorator response )
+ {
+ return responses.remove( response );
+ }
+
+
+ /**
+ * Gets the ID of the response
+ * @return
+ * the ID of the response
+ */
+ public int getRequestID()
+ {
+ return requestID;
+ }
+
+
+ /**
+ * Sets the ID of the response
+ *
+ * @param requestID
+ * the ID to set
+ */
+ public void setRequestID( int requestID )
+ {
+ this.requestID = requestID;
+ }
+
+
+ /**
+ * Converts the Batch Response to its XML representation in the DSMLv2 format.
+ */
+ public String toDsml()
+ {
+ Document document = DocumentHelper.createDocument();
+ Element element = document.addElement( "batchResponse" );
+
+ // RequestID
+ if ( requestID != 0 )
+ {
+ element.addAttribute( "requestID", "" + requestID );
+ }
+
+ for ( DsmlDecorator response : responses )
+ {
+ response.toDsml( element );
+ }
+
+ return ParserUtils.styleDocument( document ).asXML();
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/CompareResponseDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/CompareResponseDsml.java
new file mode 100644
index 0000000..ef4e933
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/CompareResponseDsml.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.compare.CompareResponse;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.dom4j.Element;
+
+
+/**
+ * DSML Decorator for CompareResponse
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CompareResponseDsml extends LdapResponseDecorator implements DsmlDecorator
+{
+ /**
+ * Creates a new instance of CompareResponseDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public CompareResponseDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( "compareResponse" );
+
+ LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( CompareResponse ) instance ).getLdapResult(), instance );
+ ldapResultDsml.toDsml( element );
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/DelResponseDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/DelResponseDsml.java
new file mode 100644
index 0000000..66e5a4d
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/DelResponseDsml.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.del.DelResponse;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.dom4j.Element;
+
+
+/**
+ * DSML Decorator for DelResponse
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class DelResponseDsml extends LdapResponseDecorator implements DsmlDecorator
+{
+ /**
+ * Creates a new instance of DelResponseDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public DelResponseDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( "delResponse" );
+
+ LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( DelResponse ) instance ).getLdapResult(), instance );
+ ldapResultDsml.toDsml( element );
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/Dsmlv2ResponseGrammar.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
new file mode 100644
index 0000000..d78b90e
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
@@ -0,0 +1,1812 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import java.io.IOException;
+import java.lang.reflect.Array;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.asn1.primitives.OID;
+import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapResponse;
+import org.apache.directory.shared.ldap.codec.LdapResult;
+import org.apache.directory.shared.ldap.codec.add.AddResponse;
+import org.apache.directory.shared.ldap.codec.bind.BindResponse;
+import org.apache.directory.shared.ldap.codec.compare.CompareResponse;
+import org.apache.directory.shared.ldap.codec.del.DelResponse;
+import org.apache.directory.shared.ldap.codec.extended.ExtendedResponse;
+import org.apache.directory.shared.ldap.codec.modify.ModifyResponse;
+import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponse;
+import org.apache.directory.shared.ldap.codec.search.SearchResultDone;
+import org.apache.directory.shared.ldap.codec.search.SearchResultEntry;
+import org.apache.directory.shared.ldap.codec.search.SearchResultReference;
+import org.apache.directory.shared.ldap.codec.util.LdapURL;
+import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.Base64;
+import org.apache.directory.studio.dsmlv2.AbstractGrammar;
+import org.apache.directory.studio.dsmlv2.Dsmlv2Container;
+import org.apache.directory.studio.dsmlv2.Dsmlv2StatesEnum;
+import org.apache.directory.studio.dsmlv2.GrammarAction;
+import org.apache.directory.studio.dsmlv2.GrammarTransition;
+import org.apache.directory.studio.dsmlv2.IGrammar;
+import org.apache.directory.studio.dsmlv2.ParserUtils;
+import org.apache.directory.studio.dsmlv2.Tag;
+import org.apache.directory.studio.dsmlv2.reponse.ErrorResponse.ErrorResponseType;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+
+/**
+ * This Class represents the DSMLv2 Response Grammar
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Dsmlv2ResponseGrammar extends AbstractGrammar implements IGrammar
+{
+ /** The instance of grammar. Dsmlv2ResponseGrammar is a singleton */
+ private static Dsmlv2ResponseGrammar instance = new Dsmlv2ResponseGrammar();
+
+ // Initializing DESCR_TAGS
+ private static Set<String> DSMLV2_DESCR_TAGS = null;
+ static
+ {
+ DSMLV2_DESCR_TAGS = new HashSet<String>();
+ DSMLV2_DESCR_TAGS.add( "success" );
+ DSMLV2_DESCR_TAGS.add( "operationsError" );
+ DSMLV2_DESCR_TAGS.add( "protocolError" );
+ DSMLV2_DESCR_TAGS.add( "timeLimitExceeded" );
+ DSMLV2_DESCR_TAGS.add( "sizeLimitExceeded" );
+ DSMLV2_DESCR_TAGS.add( "compareFalse" );
+ DSMLV2_DESCR_TAGS.add( "compareTrue" );
+ DSMLV2_DESCR_TAGS.add( "authMethodNotSupported" );
+ DSMLV2_DESCR_TAGS.add( "strongAuthRequired" );
+ DSMLV2_DESCR_TAGS.add( "referral" );
+ DSMLV2_DESCR_TAGS.add( "adminLimitExceeded" );
+ DSMLV2_DESCR_TAGS.add( "unavailableCriticalExtension" );
+ DSMLV2_DESCR_TAGS.add( "confidentialityRequired" );
+ DSMLV2_DESCR_TAGS.add( "saslBindInProgress" );
+ DSMLV2_DESCR_TAGS.add( "noSuchAttribute" );
+ DSMLV2_DESCR_TAGS.add( "undefinedAttributeType" );
+ DSMLV2_DESCR_TAGS.add( "inappropriateMatching" );
+ DSMLV2_DESCR_TAGS.add( "constraintViolation" );
+ DSMLV2_DESCR_TAGS.add( "attributeOrValueExists" );
+ DSMLV2_DESCR_TAGS.add( "invalidAttributeSyntax" );
+ DSMLV2_DESCR_TAGS.add( "noSuchObject" );
+ DSMLV2_DESCR_TAGS.add( "aliasProblem" );
+ DSMLV2_DESCR_TAGS.add( "invalidDNSyntax" );
+ DSMLV2_DESCR_TAGS.add( "aliasDereferencingProblem" );
+ DSMLV2_DESCR_TAGS.add( "inappropriateAuthentication" );
+ DSMLV2_DESCR_TAGS.add( "invalidCredentials" );
+ DSMLV2_DESCR_TAGS.add( "insufficientAccessRights" );
+ DSMLV2_DESCR_TAGS.add( "busy" );
+ DSMLV2_DESCR_TAGS.add( "unavailable" );
+ DSMLV2_DESCR_TAGS.add( "unwillingToPerform" );
+ DSMLV2_DESCR_TAGS.add( "loopDetect" );
+ DSMLV2_DESCR_TAGS.add( "namingViolation" );
+ DSMLV2_DESCR_TAGS.add( "objectClassViolation" );
+ DSMLV2_DESCR_TAGS.add( "notAllowedOnNonLeaf" );
+ DSMLV2_DESCR_TAGS.add( "notAllowedOnRDN" );
+ DSMLV2_DESCR_TAGS.add( "entryAlreadyExists" );
+ DSMLV2_DESCR_TAGS.add( "objectClassModsProhibited" );
+ DSMLV2_DESCR_TAGS.add( "affectMultipleDSAs" );
+ DSMLV2_DESCR_TAGS.add( "other" );
+ }
+
+
+ @SuppressWarnings("unchecked")
+ private Dsmlv2ResponseGrammar()
+ {
+ name = Dsmlv2ResponseGrammar.class.getName();
+ statesEnum = Dsmlv2StatesEnum.getInstance();
+
+ // Create the transitions table
+ super.transitions = ( HashMap<Tag, GrammarTransition>[] ) Array.newInstance( HashMap.class, 300 );; // TODO Change this value
+
+ //====================================================
+ // Transitions concerning : BATCH RESPONSE
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.INIT_GRAMMAR_STATE] = new HashMap<Tag, GrammarTransition>();
+
+ // ** OPEN BATCH Reponse **
+ // State: [INIT_GRAMMAR_STATE] - Tag: <batchResponse>
+ super.transitions[Dsmlv2StatesEnum.INIT_GRAMMAR_STATE].put( new Tag( "batchResponse", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ batchResponseCreation ) );
+
+ //====================================================
+ // Transitions concerning : BATCH RESPONSE LOOP
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [BATCH_RESPONSE_LOOP] - Tag: <addResponse>
+ super.transitions[Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP].put( new Tag( "addResponse", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, Dsmlv2StatesEnum.LDAP_RESULT,
+ addResponseCreation ) );
+
+ // State: [BATCH_RESPONSE_LOOP] - Tag: <authResponse>
+ super.transitions[Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP].put( new Tag( "authResponse", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, Dsmlv2StatesEnum.LDAP_RESULT,
+ authResponseCreation ) );
+
+ // State: [BATCH_RESPONSE_LOOP] - Tag: <compareResponse>
+ super.transitions[Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP].put( new Tag( "compareResponse", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, Dsmlv2StatesEnum.LDAP_RESULT,
+ compareResponseCreation ) );
+
+ // State: [BATCH_RESPONSE_LOOP] - Tag: <delResponse>
+ super.transitions[Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP].put( new Tag( "delResponse", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, Dsmlv2StatesEnum.LDAP_RESULT,
+ delResponseCreation ) );
+
+ // State: [BATCH_RESPONSE_LOOP] - Tag: <modifyResponse>
+ super.transitions[Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP].put( new Tag( "modifyResponse", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, Dsmlv2StatesEnum.LDAP_RESULT,
+ modifyResponseCreation ) );
+
+ // State: [BATCH_RESPONSE_LOOP] - Tag: <modDNResponse>
+ super.transitions[Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP].put( new Tag( "modDNResponse", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, Dsmlv2StatesEnum.LDAP_RESULT,
+ modDNResponseCreation ) );
+
+ // State: [BATCH_RESPONSE_LOOP] - Tag: <extendedResponse>
+ super.transitions[Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP].put( new Tag( "extendedResponse", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, Dsmlv2StatesEnum.EXTENDED_RESPONSE,
+ extendedResponseCreation ) );
+
+ // State: [BATCH_RESPONSE_LOOP] - Tag: <errorResponse>
+ super.transitions[Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP].put( new Tag( "errorResponse", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, Dsmlv2StatesEnum.ERROR_RESPONSE,
+ errorResponseCreation ) );
+
+ // State: [BATCH_RESPONSE_LOOP] - Tag: <searchReponse>
+ super.transitions[Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP].put( new Tag( "searchResponse", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, Dsmlv2StatesEnum.SEARCH_RESPONSE,
+ searchResponseCreation ) );
+
+ // State: [BATCH_RESPONSE_LOOP] - Tag: </batchResponse>
+ super.transitions[Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP].put( new Tag( "batchResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, Dsmlv2StatesEnum.GRAMMAR_END, null ) );
+
+ //====================================================
+ // Transitions concerning : ERROR RESPONSE
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.ERROR_RESPONSE] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.MESSAGE_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.DETAIL_START] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.DETAIL_END] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [ERROR_RESPONSE] - Tag: <message>
+ super.transitions[Dsmlv2StatesEnum.ERROR_RESPONSE].put( new Tag( "message", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.ERROR_RESPONSE, Dsmlv2StatesEnum.MESSAGE_END, errorResponseAddMessage ) );
+
+ // State: [ERROR_RESPONSE] - Tag: <detail>
+ super.transitions[Dsmlv2StatesEnum.ERROR_RESPONSE].put( new Tag( "detail", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.ERROR_RESPONSE, Dsmlv2StatesEnum.DETAIL_START, errorResponseAddDetail ) );
+
+ // State: [MESSAGE_END] - Tag: </errorResponse>
+ super.transitions[Dsmlv2StatesEnum.MESSAGE_END].put( new Tag( "errorResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.MESSAGE_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ // State: [MESSAGE_END] - Tag: <detail>
+ super.transitions[Dsmlv2StatesEnum.MESSAGE_END].put( new Tag( "detail", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.MESSAGE_END, Dsmlv2StatesEnum.DETAIL_START, errorResponseAddDetail ) );
+
+ // State: [DETAIL_START] - Tag: </detail>
+ super.transitions[Dsmlv2StatesEnum.DETAIL_START].put( new Tag( "detail", Tag.END ), new GrammarTransition(
+ Dsmlv2StatesEnum.DETAIL_START, Dsmlv2StatesEnum.DETAIL_END, null ) );
+
+ // State: [DETAIL_END] - Tag: <detail>
+ super.transitions[Dsmlv2StatesEnum.DETAIL_END].put( new Tag( "detail", Tag.END ), new GrammarTransition(
+ Dsmlv2StatesEnum.DETAIL_END, Dsmlv2StatesEnum.DETAIL_END, errorResponseAddDetail ) );
+
+ // State: [ERROR_RESPONSE] - Tag: </errorResponse>
+ super.transitions[Dsmlv2StatesEnum.ERROR_RESPONSE].put( new Tag( "errorResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.ERROR_RESPONSE, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ //====================================================
+ // Transitions concerning : EXTENDED RESPONSE
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_START] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_VALUE_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_START] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_ERROR_MESSAGE_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_REFERRAL_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.RESPONSE_NAME_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.RESPONSE_END] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [EXTENDED_RESPONSE] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE,
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_START, ldapResultControlCreation ) );
+
+ // State: [EXTENDED_RESPONSE_CONTROL_START] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_START].put( new Tag( "controlValue", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_START,
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_VALUE_END, ldapResultControlValueCreation ) );
+
+ // State: [EXTENDED_RESPONSE_CONTROL_VALUE_END] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_VALUE_END].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_VALUE_END,
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_END, null ) );
+
+ // State: [EXTENDED_RESPONSE_CONTROL_START] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_START].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_START,
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_END, null ) );
+
+ // State: [EXTENDED_RESPONSE_CONTROL_END] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_END].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_END,
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_START, ldapResultControlCreation ) );
+
+ // State: [EXTENDED_RESPONSE_CONTROL_END] - Tag: <resultCode>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_END].put( new Tag( "resultCode", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_CONTROL_END,
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_START, extendedResponseAddResultCode ) );
+
+ // State: [EXTENDED_RESPONSE] - Tag: <resultCode>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE].put( new Tag( "resultCode", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE,
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_START, extendedResponseAddResultCode ) );
+
+ // State: [EXTENDED_RESPONSE_RESULT_CODE_START] - Tag: </resultCode>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_START].put( new Tag( "resultCode", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_START,
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_END, null ) );
+
+ // State: [EXTENDED_RESPONSE_RESULT_CODE_END] - Tag: <errorMessage>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_END].put(
+ new Tag( "errorMessage", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_END,
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_ERROR_MESSAGE_END, extendedResponseAddErrorMessage ) );
+
+ // State: [EXTENDED_RESPONSE_RESULT_CODE_END] - Tag: <referral>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_END].put( new Tag( "referral", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_END,
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_REFERRAL_END, extendedResponseAddReferral ) );
+
+ // State: [EXTENDED_RESPONSE_RESULT_CODE_END] - Tag: <responseName>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_END].put(
+ new Tag( "responseName", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_END, Dsmlv2StatesEnum.RESPONSE_NAME_END,
+ extendedResponseAddResponseName ) );
+
+ // State: [EXTENDED_RESPONSE_RESULT_CODE_END] - Tag: <response>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_END].put( new Tag( "response", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_END, Dsmlv2StatesEnum.RESPONSE_END,
+ extendedResponseAddResponse ) );
+
+ // State: [EXTENDED_RESPONSE_RESULT_CODE_END] - Tag: </extendedResponse>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_END].put(
+ new Tag( "extendedResponse", Tag.END ), new GrammarTransition(
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_RESULT_CODE_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ // State: [EXTENDED_RESPONSE_ERROR_MESSAGE_END] - Tag: <referral>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_ERROR_MESSAGE_END].put( new Tag( "referral", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_ERROR_MESSAGE_END,
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_REFERRAL_END, extendedResponseAddReferral ) );
+
+ // State: [EXTENDED_RESPONSE_ERROR_MESSAGE_END] - Tag: <responseName>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_ERROR_MESSAGE_END].put(
+ new Tag( "responseName", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_ERROR_MESSAGE_END, Dsmlv2StatesEnum.RESPONSE_NAME_END,
+ extendedResponseAddResponseName ) );
+
+ // State: [EXTENDED_RESPONSE_ERROR_MESSAGE_END] - Tag: <response>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_ERROR_MESSAGE_END].put( new Tag( "response", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_ERROR_MESSAGE_END,
+ Dsmlv2StatesEnum.RESPONSE_END, extendedResponseAddResponse ) );
+
+ // State: [EXTENDED_RESPONSE_ERROR_MESSAGE_END] - Tag: </extendedResponse>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_ERROR_MESSAGE_END].put( new Tag( "extendedResponse",
+ Tag.END ), new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_ERROR_MESSAGE_END,
+ Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ // State: [EXTENDED_RESPONSE_REFERRAL_END] - Tag: <referral>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_REFERRAL_END].put( new Tag( "referral", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_REFERRAL_END,
+ Dsmlv2StatesEnum.EXTENDED_RESPONSE_REFERRAL_END, extendedResponseAddReferral ) );
+
+ // State: [EXTENDED_RESPONSE_REFERRAL_END] - Tag: <responseName>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_REFERRAL_END].put( new Tag( "responseName", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_REFERRAL_END,
+ Dsmlv2StatesEnum.RESPONSE_NAME_END, extendedResponseAddResponseName ) );
+
+ // State: [EXTENDED_RESPONSE_REFERRAL_END] - Tag: <reponse>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_REFERRAL_END].put( new Tag( "reponse", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_REFERRAL_END, Dsmlv2StatesEnum.RESPONSE_END,
+ extendedResponseAddResponse ) );
+
+ // State: [EXTENDED_RESPONSE_REFERRAL_END] - Tag: </extendedResponse>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_RESPONSE_REFERRAL_END].put( new Tag( "extendedResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_RESPONSE_REFERRAL_END,
+ Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ // State: [RESPONSE_NAME_END] - Tag: <response>
+ super.transitions[Dsmlv2StatesEnum.RESPONSE_NAME_END].put( new Tag( "response", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.RESPONSE_NAME_END, Dsmlv2StatesEnum.RESPONSE_END,
+ extendedResponseAddResponse ) );
+
+ // State: [RESPONSE_NAME_END] - Tag: </extendedResponse>
+ super.transitions[Dsmlv2StatesEnum.RESPONSE_NAME_END].put( new Tag( "extendedResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.RESPONSE_NAME_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ // State: [RESPONSE_END] - Tag: </extendedResponse>
+ super.transitions[Dsmlv2StatesEnum.RESPONSE_END].put( new Tag( "extendedResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.RESPONSE_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ //====================================================
+ // Transitions concerning : LDAP RESULT
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_START] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_VALUE_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_START] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_DONE_END] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [LDAP_RESULT] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT].put( new Tag( "control", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.LDAP_RESULT, Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_START, ldapResultControlCreation ) );
+
+ // State: [LDAP_RESULT] - Tag: <resultCode>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT].put( new Tag( "resultCode", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.LDAP_RESULT, Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_START, ldapResultAddResultCode ) );
+
+ // State: [LDAP_RESULT_CONTROL_START] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_START].put( new Tag( "controlValue", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_START,
+ Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_VALUE_END, ldapResultControlValueCreation ) );
+
+ // State: [LDAP_RESULT_CONTROL_VALUE_END] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_VALUE_END].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_VALUE_END,
+ Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_END, null ) );
+
+ // State: [LDAP_RESULT_CONTROL_START] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_START].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_START,
+ Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_END, null ) );
+
+ // State: [LDAP_RESULT_CONTROL_END] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_END].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_END,
+ Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_START, ldapResultControlCreation ) );
+
+ // State: [LDAP_RESULT_CONTROL_END] - Tag: <resultCode>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_END].put( new Tag( "resultCode", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_CONTROL_END,
+ Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_START, ldapResultAddResultCode ) );
+
+ // State: [LDAP_RESULT_RESULT_CODE_START] - Tag: </resultCode>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_START].put( new Tag( "resultCode", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_START,
+ Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END, null ) );
+
+ // State: [LDAP_RESULT_RESULT_CODE_END] - Tag: <errorMessage>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END].put( new Tag( "errorMessage", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END,
+ Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END, ldapResultAddErrorMessage ) );
+
+ // State: [LDAP_RESULT_RESULT_CODE_END] - Tag: <referral>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END].put( new Tag( "referral", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END,
+ Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END, ldapResultAddReferral ) );
+
+ // State: [LDAP_RESULT_RESULT_CODE_END] - Tag: </addResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END].put( new Tag( "addResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ null ) );
+
+ // State: [LDAP_RESULT_RESULT_CODE_END] - Tag: </authResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END].put( new Tag( "authResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ null ) );
+
+ // State: [LDAP_RESULT_RESULT_CODE_END] - Tag: </compareResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END].put( new Tag( "compareResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ null ) );
+
+ // State: [LDAP_RESULT_RESULT_CODE_END] - Tag: </delResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END].put( new Tag( "delResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ null ) );
+
+ // State: [LDAP_RESULT_RESULT_CODE_END] - Tag: </modifyResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END].put( new Tag( "modifyResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ null ) );
+
+ // State: [LDAP_RESULT_RESULT_CODE_END] - Tag: </modDNResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END].put( new Tag( "modDNResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ null ) );
+
+ // State: [LDAP_RESULT_RESULT_CODE_END] - Tag: </searchResultDone>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END].put( new Tag( "searchResultDone", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_RESULT_CODE_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_DONE_END, null ) );
+
+ // State: [SEARCH_RESULT_DONE_END] - Tag: </searchResponse>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_DONE_END]
+ .put( new Tag( "searchResponse", Tag.END ), new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_DONE_END,
+ Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ // State: [LDAP_RESULT_ERROR_MESSAGE_END] - Tag: <referral>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END].put( new Tag( "referral", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END,
+ Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END, ldapResultAddReferral ) );
+
+ // State: [LDAP_RESULT_ERROR_MESSAGE_END] - Tag: </addResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END].put( new Tag( "addResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END,
+ Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ // State: [LDAP_RESULT_ERROR_MESSAGE_END] - Tag: </authResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END].put( new Tag( "authResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END,
+ Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ // State: [LDAP_RESULT_ERROR_MESSAGE_END] - Tag: </compareResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END].put( new Tag( "compareResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END,
+ Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ // State: [LDAP_RESULT_ERROR_MESSAGE_END] - Tag: </delResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END].put( new Tag( "delResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END,
+ Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ // State: [LDAP_RESULT_ERROR_MESSAGE_END] - Tag: </modifyResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END].put( new Tag( "modifyResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END,
+ Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ // State: [LDAP_RESULT_ERROR_MESSAGE_END] - Tag: </modDNResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END].put( new Tag( "modDNResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END,
+ Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP, null ) );
+
+ // State: [LDAP_RESULT_ERROR_MESSAGE_END] - Tag: </searchResultDone>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END].put( new Tag( "searchResultDone", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_ERROR_MESSAGE_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_DONE_END, null ) );
+
+ // State: [LDAP_RESULT_REFERRAL_END] - Tag: <referral>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END].put( new Tag( "referral", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END,
+ Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END, ldapResultAddReferral ) );
+
+ // State: [LDAP_RESULT_REFERRAL_END] - Tag: </addResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END].put( new Tag( "addResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ null ) );
+
+ // State: [LDAP_RESULT_REFERRAL_END] - Tag: </authResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END].put( new Tag( "authResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ null ) );
+
+ // State: [LDAP_RESULT_REFERRAL_END] - Tag: </compareResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END].put( new Tag( "compareResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ null ) );
+
+ // State: [LDAP_RESULT_REFERRAL_END] - Tag: </delResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END].put( new Tag( "delResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ null ) );
+
+ // State: [LDAP_RESULT_REFERRAL_END] - Tag: </modifyResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END].put( new Tag( "modifyResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ null ) );
+
+ // State: [LDAP_RESULT_REFERRAL_END] - Tag: </modDNResponse>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END].put( new Tag( "modDNResponse", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END, Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP,
+ null ) );
+
+ // State: [LDAP_RESULT_REFERRAL_END] - Tag: </searchResultDone>
+ super.transitions[Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END].put( new Tag( "searchResultDone", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.LDAP_RESULT_REFERRAL_END, Dsmlv2StatesEnum.SEARCH_RESULT_DONE_END,
+ null ) );
+
+ //====================================================
+ // Transitions concerning : SEARCH RESPONSE
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESPONSE] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [SEARCH_REPONSE] - Tag: <searchResultEntry>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESPONSE].put( new Tag( "searchResultEntry", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESPONSE, Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY,
+ searchResultEntryCreation ) );
+
+ // State: [SEARCH_REPONSE] - Tag: <searchResultReference>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESPONSE].put( new Tag( "searchResultReference", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESPONSE, Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE,
+ searchResultReferenceCreation ) );
+
+ // State: [SEARCH_REPONSE] - Tag: <searchResultDone>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESPONSE].put( new Tag( "searchResultDone", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESPONSE, Dsmlv2StatesEnum.LDAP_RESULT,
+ searchResultDoneCreation ) );
+
+ //====================================================
+ // Transitions concerning : SEARCH RESULT ENTRY
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_START] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_VALUE_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_START] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_VALUE_END] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [SEARCH_RESULT_ENTRY] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_START, searchResultEntryControlCreation ) );
+
+ // State: [SEARCH_RESULT_ENTRY] - Tag: <attr>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY].put( new Tag( "attr", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_START, searchResultEntryAddAttr ) );
+
+ // State: [SEARCH_RESULT_ENTRY] - Tag: </searchResultEntry>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY].put( new Tag( "searchResultEntry", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY, Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_LOOP,
+ null ) );
+
+ // State: [SEARCH_RESULT_ENTRY_CONTROL_START] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_START].put(
+ new Tag( "controlValue", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_START,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_VALUE_END, searchResultEntryControlValueCreation ) );
+
+ // State: [SEARCH_RESULT_ENTRY_CONTROL_VALUE_END] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_VALUE_END].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_VALUE_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_END, null ) );
+
+ // State: [SEARCH_RESULT_ENTRY_CONTROL_START] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_START].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_START,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_END, null ) );
+
+ // State: [SEARCH_RESULT_ENTRY_CONTROL_END] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_END].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_START, searchResultEntryControlCreation ) );
+
+ // State: [SEARCH_RESULT_ENTRY_CONTROL_END] - Tag: </searchResultEntry>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_END].put(
+ new Tag( "searchResultEntry", Tag.END ), new GrammarTransition(
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_END, Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_LOOP, null ) );
+
+ // State: [SEARCH_RESULT_ENTRY_CONTROL_END] - Tag: <attr>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_END].put( new Tag( "attr", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_CONTROL_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_START, null ) );
+
+ // State: [SEARCH_RESULT_ENTRY_ATTR_START] - Tag: </attr>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_START].put( new Tag( "attr", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_START,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_END, null ) );
+
+ // State: [SEARCH_RESULT_ENTRY_ATTR_START] - Tag: <value>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_START].put( new Tag( "value", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_START,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_VALUE_END, searchResultEntryAddValue ) );
+
+ // State: [SEARCH_RESULT_ENTRY_ATTR_END] - Tag: <attr>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_END].put( new Tag( "attr", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_START, searchResultEntryAddAttr ) );
+
+ // State: [SEARCH_RESULT_ENTRY_ATTR_END] - Tag: </searchResultEntry>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_END].put( new Tag( "searchResultEntry", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_LOOP, null ) );
+
+ // State: [SEARCH_RESULT_ENTRY_VALUE_END] - Tag: <value>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_VALUE_END].put( new Tag( "value", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_VALUE_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_VALUE_END, searchResultEntryAddValue ) );
+
+ // State: [SEARCH_RESULT_ENTRY_VALUE_END] - Tag: </attr>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_VALUE_END].put( new Tag( "attr", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_VALUE_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_ATTR_END, null ) );
+
+ //====================================================
+ // Transitions concerning : SEARCH RESULT ENTRY LOOP
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_LOOP] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [SEARCH_RESULT_ENTRY_LOOP] - Tag: <searchResultEntry>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_LOOP].put( new Tag( "searchResultEntry", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_LOOP, Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY,
+ searchResultEntryCreation ) );
+
+ // State: [SEARCH_RESULT_ENTRY_LOOP] - Tag: <searchResultReference>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_LOOP].put(
+ new Tag( "searchResultReference", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_LOOP, Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE,
+ searchResultReferenceCreation ) );
+
+ // State: [SEARCH_RESULT_ENTRY_LOOP] - Tag: <searchResultDone>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_LOOP].put( new Tag( "searchResultDone", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_ENTRY_LOOP, Dsmlv2StatesEnum.LDAP_RESULT,
+ searchResultDoneCreation ) );
+
+ //====================================================
+ // Transitions concerning : SEARCH RESULT REFERENCE
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_START] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_VALUE_END] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_REF_END] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [SEARCH_RESULT_REFERENCE] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE,
+ Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_START, searchResultReferenceControlCreation ) );
+
+ // State: [SEARCH_RESULT_REFERENCE] - Tag: <ref>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE].put( new Tag( "ref", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE,
+ Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_REF_END, searchResultReferenceAddRef ) );
+
+ // State: [SEARCH_RESULT_REFERENCE_CONTROL_START] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_START].put( new Tag( "controlValue",
+ Tag.START ), new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_START,
+ Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_VALUE_END, searchResultReferenceControlValueCreation ) );
+
+ // State: [sEARCH_RESULT_REFERENCE_CONTROL_VALUE_END] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_VALUE_END].put(
+ new Tag( "control", Tag.END ), new GrammarTransition(
+ Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_VALUE_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_END, null ) );
+
+ // State: [SEARCH_RESULT_REFERENCE_CONTROL_START] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_START].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_START,
+ Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_END, null ) );
+
+ // State: [SEARCH_RESULT_REFERENCE_CONTROL_END] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_END].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_START, searchResultReferenceControlCreation ) );
+
+ // State: [SEARCH_RESULT_REFERENCE_CONTROL_END] - Tag: <ref>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_END].put( new Tag( "ref", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_CONTROL_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_REF_END, searchResultReferenceAddRef ) );
+
+ // State: [SEARCH_RESULT_REFERENCE_REF_END] - Tag: <ref>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_REF_END].put( new Tag( "ref", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_REF_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_REF_END, searchResultReferenceAddRef ) );
+
+ // State: [SEARCH_RESULT_REFERENCE_REF_END] - Tag: </searchResultReference>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_REF_END].put( new Tag( "searchResultReference",
+ Tag.END ), new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_REF_END,
+ Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_LOOP, null ) );
+
+ //==========================================================
+ // Transitions concerning : SEARCH RESULT REFERENCE LOOP
+ //==========================================================
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_LOOP] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [SEARCH_RESULT_REFERENCE_LOOP] - Tag: <searchResultReference>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_LOOP].put( new Tag( "searchResultReference",
+ Tag.START ), new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_LOOP,
+ Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE, searchResultReferenceCreation ) );
+
+ // State: [SEARCH_RESULT_REFERENCE_LOOP] - Tag: <searchResultDone>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_LOOP].put( new Tag( "searchResultDone", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_RESULT_REFERENCE_LOOP, Dsmlv2StatesEnum.LDAP_RESULT,
+ searchResultDoneCreation ) );
+ }
+
+ /**
+ * GrammarAction that creates the Batch Response
+ */
+ private final GrammarAction batchResponseCreation = new GrammarAction( "Create Batch Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ BatchResponse batchResponse = new BatchResponse();
+
+ container.setBatchResponse( batchResponse );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the batchRequest's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ batchResponse.setRequestID( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that creates the Add Response
+ */
+ private final GrammarAction addResponseCreation = new GrammarAction( "Create Add Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ AddResponse addResponse = new AddResponse();
+
+ container.getBatchResponse().addResponse( addResponse );
+
+ LdapResult ldapResult = new LdapResult();
+
+ addResponse.setLdapResult( ldapResult );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the batchRequest's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ addResponse.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+ }
+ // MatchedDN
+ attributeValue = xpp.getAttributeValue( "", "matchedDN" );
+ if ( attributeValue != null )
+ {
+ try
+ {
+ ldapResult.setMatchedDN( new LdapDN( attributeValue ) );
+ }
+ catch ( InvalidNameException e )
+ {
+ throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
+ }
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that creates the Auth Response
+ */
+ private final GrammarAction authResponseCreation = new GrammarAction( "Create Auth Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ BindResponse bindResponse = new BindResponse();
+
+ container.getBatchResponse().addResponse( bindResponse );
+
+ LdapResult ldapResult = new LdapResult();
+
+ bindResponse.setLdapResult( ldapResult );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the batchRequest's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ bindResponse.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+
+ }
+ // MatchedDN
+ attributeValue = xpp.getAttributeValue( "", "matchedDN" );
+ if ( attributeValue != null )
+ {
+ try
+ {
+ ldapResult.setMatchedDN( new LdapDN( attributeValue ) );
+ }
+ catch ( InvalidNameException e )
+ {
+ throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
+ }
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that creates the Compare Response
+ */
+ private final GrammarAction compareResponseCreation = new GrammarAction( "Create Compare Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ CompareResponse compareResponse = new CompareResponse();
+
+ container.getBatchResponse().addResponse( compareResponse );
+
+ LdapResult ldapResult = new LdapResult();
+
+ compareResponse.setLdapResult( ldapResult );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the batchRequest's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ compareResponse.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+ }
+ // MatchedDN
+ attributeValue = xpp.getAttributeValue( "", "matchedDN" );
+ if ( attributeValue != null )
+ {
+ try
+ {
+ ldapResult.setMatchedDN( new LdapDN( attributeValue ) );
+ }
+ catch ( InvalidNameException e )
+ {
+ throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
+ }
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that creates the Del Response
+ */
+ private final GrammarAction delResponseCreation = new GrammarAction( "Create Del Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ DelResponse delResponse = new DelResponse();
+
+ container.getBatchResponse().addResponse( delResponse );
+
+ LdapResult ldapResult = new LdapResult();
+
+ delResponse.setLdapResult( ldapResult );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the batchRequest's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ delResponse.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+ }
+ // MatchedDN
+ attributeValue = xpp.getAttributeValue( "", "matchedDN" );
+ if ( attributeValue != null )
+ {
+ try
+ {
+ ldapResult.setMatchedDN( new LdapDN( attributeValue ) );
+ }
+ catch ( InvalidNameException e )
+ {
+ throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
+ }
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that creates the Modify Response
+ */
+ private final GrammarAction modifyResponseCreation = new GrammarAction( "Create Modify Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ ModifyResponse modifyResponse = new ModifyResponse();
+
+ container.getBatchResponse().addResponse( modifyResponse );
+
+ LdapResult ldapResult = new LdapResult();
+
+ modifyResponse.setLdapResult( ldapResult );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the batchRequest's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ modifyResponse.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+ }
+ // MatchedDN
+ attributeValue = xpp.getAttributeValue( "", "matchedDN" );
+ if ( attributeValue != null )
+ {
+ try
+ {
+ ldapResult.setMatchedDN( new LdapDN( attributeValue ) );
+ }
+ catch ( InvalidNameException e )
+ {
+ throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
+ }
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that creates the Mod DN Response
+ */
+ private final GrammarAction modDNResponseCreation = new GrammarAction( "Create Mod DN Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ ModifyDNResponse modifyDNResponse = new ModifyDNResponse();
+
+ container.getBatchResponse().addResponse( modifyDNResponse );
+
+ LdapResult ldapResult = new LdapResult();
+
+ modifyDNResponse.setLdapResult( ldapResult );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the batchRequest's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ modifyDNResponse.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+ }
+ // MatchedDN
+ attributeValue = xpp.getAttributeValue( "", "matchedDN" );
+ if ( attributeValue != null )
+ {
+ try
+ {
+ ldapResult.setMatchedDN( new LdapDN( attributeValue ) );
+ }
+ catch ( InvalidNameException e )
+ {
+ throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
+ }
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that creates the Extended Response
+ */
+ private final GrammarAction extendedResponseCreation = new GrammarAction( "Create Extended Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ ExtendedResponse extendedResponse = new ExtendedResponse();
+
+ container.getBatchResponse().addResponse( extendedResponse );
+
+ LdapResult ldapResult = new LdapResult();
+
+ extendedResponse.setLdapResult( ldapResult );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the batchRequest's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ extendedResponse.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+ }
+ // MatchedDN
+ attributeValue = xpp.getAttributeValue( "", "matchedDN" );
+ if ( attributeValue != null )
+ {
+ try
+ {
+ ldapResult.setMatchedDN( new LdapDN( attributeValue ) );
+ }
+ catch ( InvalidNameException e )
+ {
+ throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
+ }
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that creates the Error Response
+ */
+ private final GrammarAction errorResponseCreation = new GrammarAction( "Create Error Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ ErrorResponse errorResponse = new ErrorResponse();
+
+ container.getBatchResponse().addResponse( errorResponse );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the batchRequest's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ errorResponse.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+ }
+ // type
+ attributeValue = xpp.getAttributeValue( "", "type" );
+ if ( attributeValue != null )
+ {
+ if ( attributeValue.equals( errorResponse.getTypeDescr( ErrorResponseType.NOT_ATTEMPTED ) ) )
+ {
+ errorResponse.setType( ErrorResponseType.NOT_ATTEMPTED );
+ }
+ else if ( attributeValue.equals( errorResponse.getTypeDescr( ErrorResponseType.COULD_NOT_CONNECT ) ) )
+ {
+ errorResponse.setType( ErrorResponseType.COULD_NOT_CONNECT );
+ }
+ else if ( attributeValue.equals( errorResponse.getTypeDescr( ErrorResponseType.CONNECTION_CLOSED ) ) )
+ {
+ errorResponse.setType( ErrorResponseType.CONNECTION_CLOSED );
+ }
+ else if ( attributeValue.equals( errorResponse.getTypeDescr( ErrorResponseType.MALFORMED_REQUEST ) ) )
+ {
+ errorResponse.setType( ErrorResponseType.MALFORMED_REQUEST );
+ }
+ else if ( attributeValue
+ .equals( errorResponse.getTypeDescr( ErrorResponseType.GATEWAY_INTERNAL_ERROR ) ) )
+ {
+ errorResponse.setType( ErrorResponseType.GATEWAY_INTERNAL_ERROR );
+ }
+ else if ( attributeValue.equals( errorResponse.getTypeDescr( ErrorResponseType.AUTHENTICATION_FAILED ) ) )
+ {
+ errorResponse.setType( ErrorResponseType.AUTHENTICATION_FAILED );
+ }
+ else if ( attributeValue.equals( errorResponse.getTypeDescr( ErrorResponseType.UNRESOLVABLE_URI ) ) )
+ {
+ errorResponse.setType( ErrorResponseType.UNRESOLVABLE_URI );
+ }
+ else if ( attributeValue.equals( errorResponse.getTypeDescr( ErrorResponseType.OTHER ) ) )
+ {
+ errorResponse.setType( ErrorResponseType.OTHER );
+ }
+ else
+ {
+ throw new XmlPullParserException( "Unknown type", xpp, null );
+ }
+ }
+ else
+ {
+ throw new XmlPullParserException( "type attribute is required", xpp, null );
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that adds Message to an Error Response
+ */
+ private final GrammarAction errorResponseAddMessage = new GrammarAction( "Add Message to Error Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ ErrorResponse errorResponse = ( ErrorResponse ) container.getBatchResponse().getCurrentResponse();
+
+ XmlPullParser xpp = container.getParser();
+ try
+ {
+ String nextText = xpp.nextText();
+ if ( !nextText.equals( "" ) )
+ {
+ errorResponse.setMessage( nextText.trim() );
+ }
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( e.getMessage(), xpp, null );
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that adds Detail to an Error Response
+ */
+ private final GrammarAction errorResponseAddDetail = null; // TODO Look for documentation about this Detail element (the DSML documentation doesn't give enough information)
+
+
+ /**
+ * Creates a Control parsing the current node and adds it to the given parent
+ * @param container the DSMLv2Container
+ * @param parent the parent
+ * @throws XmlPullParserException
+ */
+ private void createAndAddControl( Dsmlv2Container container, LdapMessage parent ) throws XmlPullParserException
+ {
+ Control control = new Control();
+
+ parent.addControl( control );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the Control's attributes
+ String attributeValue;
+ // TYPE
+ attributeValue = xpp.getAttributeValue( "", "type" );
+ if ( attributeValue != null )
+ {
+ if ( !OID.isOID( attributeValue ) )
+ {
+ throw new XmlPullParserException( "Incorrect value for 'type' attribute. This is not an OID.", xpp, null );
+ }
+ control.setControlType( attributeValue );
+ }
+ else
+ {
+ throw new XmlPullParserException( "type attribute is required", xpp, null );
+ }
+ // CRITICALITY
+ attributeValue = xpp.getAttributeValue( "", "criticality" );
+ if ( attributeValue != null )
+ {
+ if ( attributeValue.equals( "true" ) )
+ {
+ control.setCriticality( true );
+ }
+ else if ( attributeValue.equals( "false" ) )
+ {
+ control.setCriticality( false );
+ }
+ else
+ {
+ throw new XmlPullParserException( "Incorrect value for 'criticality' attribute", xpp, null );
+ }
+ }
+ }
+
+ /**
+ * GrammarAction that creates a Control for LDAP Result
+ */
+ private final GrammarAction ldapResultControlCreation = new GrammarAction( "Create Control for LDAP Result" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ LdapResponse ldapResponse = container.getBatchResponse().getCurrentResponse();
+ // Search Response is a special case
+ if ( ldapResponse instanceof SearchResponse )
+ {
+ ldapResponse = ( ( SearchResponse ) ldapResponse ).getSearchResultDone();
+ }
+
+ createAndAddControl( container, ldapResponse );
+ }
+ };
+
+ /**
+ * GrammarAction that creates a Control for Search Result Entry
+ */
+ private final GrammarAction searchResultEntryControlCreation = new GrammarAction(
+ "Create Control for Search Result Entry" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ LdapMessage ldapMessage = ( ( SearchResponse ) container.getBatchResponse().getCurrentResponse() )
+ .getCurrentSearchResultEntry();
+ createAndAddControl( container, ldapMessage );
+ }
+ };
+
+ /**
+ * GrammarAction that creates a Control for Search Result Entry
+ */
+ private final GrammarAction searchResultReferenceControlCreation = new GrammarAction(
+ "Create Control for Search Result Reference" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ LdapMessage ldapMessage = ( ( SearchResponse ) container.getBatchResponse().getCurrentResponse() )
+ .getCurrentSearchResultReference();
+ createAndAddControl( container, ldapMessage );
+ }
+ };
+
+
+ /**
+ * Creates a Control Value parsing the current node and adds it to the given parent
+ * @param container the DSMLv2Container
+ * @param parent the parent
+ * @throws XmlPullParserException
+ */
+ private void createAndAddControlValue( Dsmlv2Container container, LdapMessage parent )
+ throws XmlPullParserException
+ {
+ Control control = parent.getCurrentControl();
+
+ XmlPullParser xpp = container.getParser();
+ try
+ {
+ // We have to catch the type Attribute Value before going to the next Text node
+ String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
+
+ // Getting the value
+ String nextText = xpp.nextText();
+ if ( !nextText.equals( "" ) )
+ {
+ if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
+ {
+ control.setControlValue( Base64.decode( nextText.trim().toCharArray() ) );
+ }
+ else
+ {
+ control.setControlValue( nextText.trim() );
+ }
+ }
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An unexpected error ocurred : " + e.getMessage(), xpp, null );
+ }
+ }
+
+ /**
+ * GrammarAction that creates a Control Value for LDAP Result
+ */
+ private final GrammarAction ldapResultControlValueCreation = new GrammarAction(
+ "Add ControlValue to Control for LDAP Result" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ LdapResponse ldapResponse = container.getBatchResponse().getCurrentResponse();
+ // Search Response is a special case
+ if ( ldapResponse instanceof SearchResponse )
+ {
+ ldapResponse = ( ( SearchResponse ) ldapResponse ).getSearchResultDone();
+ }
+
+ createAndAddControlValue( container, ldapResponse );
+ }
+ };
+
+ /**
+ * GrammarAction that creates a Control Value for Search Result Entry
+ */
+ private final GrammarAction searchResultEntryControlValueCreation = new GrammarAction(
+ "Add ControlValue to Control for Search Result Entry" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ LdapMessage ldapMessage = ( ( SearchResponse ) container.getBatchResponse().getCurrentResponse() )
+ .getCurrentSearchResultEntry();
+ createAndAddControlValue( container, ldapMessage );
+ }
+ };
+
+ /**
+ * GrammarAction that creates a Control Value for Search Result Reference
+ */
+ private final GrammarAction searchResultReferenceControlValueCreation = new GrammarAction(
+ "Add ControlValue to Control for Search Result Entry" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ LdapMessage ldapMessage = ( ( SearchResponse ) container.getBatchResponse().getCurrentResponse() )
+ .getCurrentSearchResultReference();
+ createAndAddControlValue( container, ldapMessage );
+ }
+ };
+
+ /**
+ * GrammarAction that adds a Result Code to a LDAP Result
+ */
+ private final GrammarAction ldapResultAddResultCode = new GrammarAction( "Add ResultCode to LDAP Result" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ LdapResponse ldapResponse = container.getBatchResponse().getCurrentResponse();
+
+ LdapResult ldapResult = null;
+
+ // Search Response is a special case
+ // ResultCode can only occur in a case of Search Result Done in a Search Response
+ if ( ldapResponse instanceof SearchResponse )
+ {
+ SearchResponse searchResponse = ( SearchResponse ) ldapResponse;
+ ldapResult = searchResponse.getSearchResultDone().getLdapResult();
+ }
+ else
+ {
+ ldapResult = ldapResponse.getLdapResult();
+ }
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the request's attributes
+ String attributeValue;
+ // code
+ attributeValue = xpp.getAttributeValue( "", "code" );
+ if ( attributeValue != null )
+ {
+ try
+ {
+ ldapResult.setResultCode( ResultCodeEnum.getResultCode( Integer.parseInt( attributeValue ) ) );
+ }
+ catch ( NumberFormatException e )
+ {
+ throw new XmlPullParserException( "the given resultCode is not an integer", xpp, null );
+ }
+ }
+ else
+ {
+ throw new XmlPullParserException( "code attribute is required", xpp, null );
+ }
+ // descr
+ attributeValue = xpp.getAttributeValue( "", "descr" );
+ if ( attributeValue != null )
+ {
+ if ( DSMLV2_DESCR_TAGS.contains( attributeValue ) == false )
+ {
+ throw new XmlPullParserException( "descr ('" + attributeValue
+ + "') doesn't match with the possible values", xpp, null );
+ }
+
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that adds a Error Message to a LDAP Result
+ */
+ private final GrammarAction ldapResultAddErrorMessage = new GrammarAction( "Add Error Message to LDAP Result" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ LdapResponse ldapResponse = container.getBatchResponse().getCurrentResponse();
+
+ LdapResult ldapResult = null;
+
+ // Search Response is a special case
+ // ResultCode can only occur in a case of Search Result Done in a Search Response
+ if ( ldapResponse instanceof SearchResponse )
+ {
+ SearchResponse searchResponse = ( SearchResponse ) ldapResponse;
+ ldapResult = searchResponse.getSearchResultDone().getLdapResult();
+ }
+ else
+ {
+ ldapResult = ldapResponse.getLdapResult();
+ }
+
+ XmlPullParser xpp = container.getParser();
+ try
+ {
+ String nextText = xpp.nextText();
+ if ( !nextText.equals( "" ) )
+ {
+ ldapResult.setErrorMessage( nextText.trim() );
+ }
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An unexpected error ocurred : " + e.getMessage(), xpp, null );
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that adds a Referral to a LDAP Result
+ */
+ private final GrammarAction ldapResultAddReferral = new GrammarAction( "Add Referral to LDAP Result" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ LdapResponse ldapResponse = container.getBatchResponse().getCurrentResponse();
+
+ LdapResult ldapResult = null;
+
+ // Search Response is a special case
+ // ResultCode can only occur in a case of Search Result Done in a Search Response
+ if ( ldapResponse instanceof SearchResponse )
+ {
+ SearchResponse searchResponse = ( SearchResponse ) ldapResponse;
+ ldapResult = searchResponse.getSearchResultDone().getLdapResult();
+ }
+ else
+ {
+ ldapResult = ldapResponse.getLdapResult();
+ }
+
+ // Initialization of the Referrals if needed
+ if ( ldapResult.getReferrals() == null )
+ {
+ ldapResult.initReferrals();
+ }
+
+ XmlPullParser xpp = container.getParser();
+ try
+ {
+ String nextText = xpp.nextText();
+ if ( !nextText.equals( "" ) )
+ {
+ try
+ {
+ ldapResult.addReferral( new LdapURL( nextText.trim() ) );
+ }
+ catch ( LdapURLEncodingException e )
+ {
+ throw new XmlPullParserException( e.getMessage(), xpp, null );
+ }
+ }
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An unexpected error ocurred : " + e.getMessage(), xpp, null );
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that creates the Search Response
+ */
+ private final GrammarAction searchResponseCreation = new GrammarAction( "Create Search Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ SearchResponse searchResponse = new SearchResponse();
+
+ container.getBatchResponse().addResponse( searchResponse );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the batchRequest's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ searchResponse.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that creates a Search Result Entry
+ */
+ private final GrammarAction searchResultEntryCreation = new GrammarAction(
+ "Add Search Result Entry to Search Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ SearchResultEntry searchResultEntry = new SearchResultEntry();
+
+ SearchResponse searchResponse = ( SearchResponse ) container.getBatchResponse().getCurrentResponse();
+
+ searchResponse.addSearchResultEntry( searchResultEntry );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the request's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ searchResultEntry.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+ }
+ // dn
+ attributeValue = xpp.getAttributeValue( "", "dn" );
+ if ( attributeValue != null )
+ {
+ try
+ {
+ searchResultEntry.setObjectName( new LdapDN( attributeValue ) );
+ }
+ catch ( InvalidNameException e )
+ {
+ throw new XmlPullParserException( e.getMessage(), xpp, null );
+ }
+ }
+ else
+ {
+ throw new XmlPullParserException( "dn attribute is required", xpp, null );
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that creates a Search Result Reference
+ */
+ private final GrammarAction searchResultReferenceCreation = new GrammarAction(
+ "Add Search Result Reference to Search Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ SearchResultReference searchResultReference = new SearchResultReference();
+
+ SearchResponse searchResponse = ( SearchResponse ) container.getBatchResponse().getCurrentResponse();
+
+ searchResponse.addSearchResultReference( searchResultReference );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the request's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ searchResultReference.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that creates a Search Result Done
+ */
+ private final GrammarAction searchResultDoneCreation = new GrammarAction(
+ "Add Search Result Done to Search Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ SearchResultDone searchResultDone = new SearchResultDone();
+
+ searchResultDone.setLdapResult( new LdapResult() );
+
+ SearchResponse searchResponse = ( SearchResponse ) container.getBatchResponse().getCurrentResponse();
+
+ searchResponse.setSearchResultDone( searchResultDone );
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the batchRequest's attributes
+ String attributeValue;
+ // requestID
+ attributeValue = xpp.getAttributeValue( "", "requestID" );
+ if ( attributeValue != null )
+ {
+ searchResultDone.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+ }
+ // MatchedDN
+ attributeValue = xpp.getAttributeValue( "", "matchedDN" );
+ if ( attributeValue != null )
+ {
+ try
+ {
+ searchResultDone.getLdapResult().setMatchedDN( new LdapDN( attributeValue ) );
+ }
+ catch ( InvalidNameException e )
+ {
+ throw new XmlPullParserException( "" + e.getMessage(), xpp, null );
+ }
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that adds an Attr to a Search Result Entry
+ */
+ private final GrammarAction searchResultEntryAddAttr = new GrammarAction( "Add Attr to Search Result Entry" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ SearchResponse searchResponse = ( SearchResponse ) container.getBatchResponse().getCurrentResponse();
+
+ SearchResultEntry searchResultEntry = searchResponse.getCurrentSearchResultEntry();
+
+ XmlPullParser xpp = container.getParser();
+
+ // Checking and adding the request's attributes
+ String attributeValue;
+ // name
+ attributeValue = xpp.getAttributeValue( "", "name" );
+ if ( attributeValue != null )
+ {
+ searchResultEntry.addAttributeValues( attributeValue );
+ }
+ else
+ {
+ throw new XmlPullParserException( "name attribute is required", xpp, null );
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that adds a Value to an Attr of a Search Result Entry
+ */
+ private final GrammarAction searchResultEntryAddValue = new GrammarAction(
+ "Add a Value to an Attr of a Search Result Entry" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ SearchResponse searchResponse = ( SearchResponse ) container.getBatchResponse().getCurrentResponse();
+ SearchResultEntry searchResultEntry = searchResponse.getCurrentSearchResultEntry();
+
+ XmlPullParser xpp = container.getParser();
+ try
+ {
+ // We have to catch the type Attribute Value before going to the next Text node
+ String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
+
+ // Getting the value
+ String nextText = xpp.nextText();
+ if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
+ {
+ searchResultEntry.addAttributeValue( Base64.decode( nextText.toCharArray() ) );
+ }
+ else
+ {
+ searchResultEntry.addAttributeValue( nextText );
+ }
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An unexpected error ocurred : " + e.getMessage(), xpp, null );
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that adds a Ref to a Search Result Reference
+ */
+ private final GrammarAction searchResultReferenceAddRef = new GrammarAction(
+ "Add a Ref to a Search Result Reference" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ SearchResponse searchResponse = ( SearchResponse ) container.getBatchResponse().getCurrentResponse();
+ SearchResultReference searchResultReference = searchResponse.getCurrentSearchResultReference();
+
+ XmlPullParser xpp = container.getParser();
+ try
+ {
+ String nextText = xpp.nextText();
+ if ( !nextText.equals( "" ) )
+ {
+ searchResultReference.addSearchResultReference( new LdapURL( nextText ) );
+ }
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An unexpected error ocurred : " + e.getMessage(), xpp, null );
+ }
+ catch ( LdapURLEncodingException e )
+ {
+ throw new XmlPullParserException( e.getMessage(), xpp, null );
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that adds Result Code to an Extended Response
+ */
+ private final GrammarAction extendedResponseAddResultCode = ldapResultAddResultCode;
+
+ /**
+ * GrammarAction that creates the Search Response
+ */
+ private final GrammarAction extendedResponseAddErrorMessage = ldapResultAddErrorMessage;
+
+ /**
+ * GrammarAction that adds a Referral to an Extended Response
+ */
+ private final GrammarAction extendedResponseAddReferral = ldapResultAddReferral;
+
+ /**
+ * GrammarAction that adds a Response Name to an Extended Response
+ */
+ private final GrammarAction extendedResponseAddResponseName = new GrammarAction(
+ "Add Response Name to Extended Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ ExtendedResponse extendedResponse = ( ExtendedResponse ) container.getBatchResponse().getCurrentResponse();
+
+ XmlPullParser xpp = container.getParser();
+ try
+ {
+ String nextText = xpp.nextText();
+ if ( !nextText.equals( "" ) )
+ {
+ extendedResponse.setResponseName( new OID( nextText.trim() ) );
+ }
+
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An unexpected error ocurred : " + e.getMessage(), xpp, null );
+ }
+ catch ( DecoderException e )
+ {
+ throw new XmlPullParserException( e.getMessage(), xpp, null );
+ }
+ }
+ };
+
+ /**
+ * GrammarAction that adds a Response to an Extended Response
+ */
+ private final GrammarAction extendedResponseAddResponse = new GrammarAction( "Add Response to Extended Response" )
+ {
+ public void action( Dsmlv2Container container ) throws XmlPullParserException
+ {
+ ExtendedResponse extendedResponse = ( ExtendedResponse ) container.getBatchResponse().getCurrentResponse();
+
+ XmlPullParser xpp = container.getParser();
+ try
+ {
+ // We have to catch the type Attribute Value before going to the next Text node
+ String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
+
+ // Getting the value
+ String nextText = xpp.nextText();
+ if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
+ {
+ extendedResponse.setResponse( Base64.decode( nextText.trim().toCharArray() ) );
+ }
+ else
+ {
+ extendedResponse.setResponse( nextText.trim() );
+ }
+ }
+ catch ( IOException e )
+ {
+ throw new XmlPullParserException( "An unexpected error ocurred : " + e.getMessage(), xpp, null );
+ }
+ }
+ };
+
+
+ /**
+ * Get the instance of this grammar
+ *
+ * @return
+ * an instance on this grammar
+ */
+ public static Dsmlv2ResponseGrammar getInstance()
+ {
+ return instance;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ErrorResponse.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ErrorResponse.java
new file mode 100644
index 0000000..bbc6216
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ErrorResponse.java
@@ -0,0 +1,243 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import org.apache.directory.shared.ldap.codec.LdapResponse;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.dom4j.Element;
+
+
+/**
+ * Class representing Error Response. <br>
+ * <br>
+ * An Error Response has a requestID, a message, and a type which can be :
+ * <ul>
+ * <li>NOT_ATTEMPTED,</li>
+ * <li>COULD_NOT_CONNECT,</li>
+ * <li>CONNECTION_CLOSED,</li>
+ * <li>MALFORMED_REQUEST,</li>
+ * <li>GATEWAY_INTERNAL_ERROR,</li>
+ * <li>AUTHENTICATION_FAILED,</li>
+ * <li>UNRESOLVABLE_URI,</li>
+ * <li>OTHER</li>
+ * </ul>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ErrorResponse extends LdapResponse implements DsmlDecorator
+{
+ /**
+ * This enum represents the different types of error response
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ public enum ErrorResponseType
+ {
+ NOT_ATTEMPTED, COULD_NOT_CONNECT, CONNECTION_CLOSED, MALFORMED_REQUEST, GATEWAY_INTERNAL_ERROR, AUTHENTICATION_FAILED, UNRESOLVABLE_URI, OTHER
+ };
+
+ /** The type of error response */
+ private ErrorResponseType type;
+
+ /** The associated message */
+ private String message;
+
+ /** The request ID */
+ private int requestID;
+
+
+ /**
+ * Creates a new instance of ErrorResponse.
+ */
+ public ErrorResponse()
+ {
+ }
+
+
+ /**
+ * Creates a new instance of ErrorResponse.
+ *
+ * @param requestID
+ * the requestID of the response
+ * @param type
+ * the type of the response
+ * @param message
+ * the associated message
+ */
+ public ErrorResponse( int requestID, ErrorResponseType type, String message )
+ {
+ this.requestID = requestID;
+ this.type = type;
+ this.message = message;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( "errorResponse" );
+
+ // RequestID
+ if ( requestID != 0 )
+ {
+ element.addAttribute( "requestID", "" + requestID );
+ }
+
+ // Type
+ element.addAttribute( "type", getTypeDescr( type ) );
+
+ // TODO Add Detail
+
+ if ( ( message != null ) && ( !"".equals( message ) ) )
+ {
+ Element messageElement = element.addElement( "message" );
+ messageElement.addText( message );
+ }
+
+ return element;
+ }
+
+
+ /**
+ * Returns the String associated to the error response type
+ *
+ * @param type
+ * the error response type
+ * @return
+ * the corresponding String
+ */
+ public String getTypeDescr( ErrorResponseType type )
+ {
+ if ( type.equals( ErrorResponseType.NOT_ATTEMPTED ) )
+ {
+ return "notAttempted";
+ }
+ else if ( type.equals( ErrorResponseType.COULD_NOT_CONNECT ) )
+ {
+ return "couldNotConnect";
+ }
+ else if ( type.equals( ErrorResponseType.CONNECTION_CLOSED ) )
+ {
+ return "connectionClosed";
+ }
+ else if ( type.equals( ErrorResponseType.MALFORMED_REQUEST ) )
+ {
+ return "malformedRequest";
+ }
+ else if ( type.equals( ErrorResponseType.GATEWAY_INTERNAL_ERROR ) )
+ {
+ return "gatewayInternalError";
+ }
+ else if ( type.equals( ErrorResponseType.AUTHENTICATION_FAILED ) )
+ {
+ return "authenticationFailed";
+ }
+ else if ( type.equals( ErrorResponseType.UNRESOLVABLE_URI ) )
+ {
+ return "unresolvableURI";
+ }
+ else if ( type.equals( ErrorResponseType.OTHER ) )
+ {
+ return "other";
+ }
+ else
+ {
+ return "unknown";
+ }
+ }
+
+
+ /**
+ * Gets the message
+ *
+ * @return
+ * the message
+ */
+ public String getMessage()
+ {
+ return message;
+ }
+
+
+ /**
+ * Sets the message
+ *
+ * @param message
+ * the message to set
+ */
+ public void setMessage( String message )
+ {
+ this.message = message;
+ }
+
+
+ /**
+ * Gets the request ID
+ *
+ * @return
+ * the request ID
+ */
+ public int getRequestID()
+ {
+ return requestID;
+ }
+
+
+ /**
+ * Sets the request ID
+ *
+ * @param requestID
+ * the request ID to set
+ */
+ public void setRequestID( int requestID )
+ {
+ this.requestID = requestID;
+ }
+
+
+ /**
+ * Gets the type of error response
+ *
+ * @return
+ * the type of error response
+ */
+ public ErrorResponseType getType()
+ {
+ return type;
+ }
+
+
+ /**
+ * Sets the type of error response
+ *
+ * @param type
+ * the type of error response to set
+ */
+ public void setType( ErrorResponseType type )
+ {
+ this.type = type;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ExtendedResponseDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ExtendedResponseDsml.java
new file mode 100644
index 0000000..93c0abc
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ExtendedResponseDsml.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.extended.ExtendedResponse;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.apache.directory.studio.dsmlv2.ParserUtils;
+import org.dom4j.Element;
+import org.dom4j.Namespace;
+import org.dom4j.QName;
+
+
+/**
+ * DSML Decorator for ExtendedResponse
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ExtendedResponseDsml extends LdapResponseDecorator implements DsmlDecorator
+{
+ /**
+ * Creates a new instance of ExtendedResponseDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public ExtendedResponseDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( "extendedResponse" );
+ ExtendedResponse extendedResponse = ( ExtendedResponse ) instance;
+
+ // LDAP Result
+ LdapResultDsml ldapResultDsml = new LdapResultDsml( extendedResponse.getLdapResult(), instance );
+ ldapResultDsml.toDsml( element );
+
+ // ResponseName
+ String responseName = extendedResponse.getResponseName();
+ if ( responseName != null )
+ {
+ element.addElement( "responseName").addText( responseName );
+ }
+
+ // Response
+ Object response = extendedResponse.getResponse();
+ if ( response != null )
+ {
+ if ( ParserUtils.needsBase64Encoding( response ) )
+ {
+ Namespace xsdNamespace = new Namespace( ParserUtils.XSD, ParserUtils.XML_SCHEMA_URI );
+ Namespace xsiNamespace = new Namespace( ParserUtils.XSI, ParserUtils.XML_SCHEMA_INSTANCE_URI );
+ element.getDocument().getRootElement().add( xsdNamespace );
+ element.getDocument().getRootElement().add( xsiNamespace );
+
+ Element responseElement = element.addElement( "response").addText( ParserUtils.base64Encode( response ) );
+ responseElement.addAttribute( new QName("type", xsiNamespace), ParserUtils.XSD + ":" + ParserUtils.BASE64BINARY );
+ }
+ else
+ {
+ element.addElement( "response").addText( response.toString() );
+ }
+ }
+
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResponseDecorator.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResponseDecorator.java
new file mode 100644
index 0000000..ac18ab8
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResponseDecorator.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapResponse;
+import org.apache.directory.shared.ldap.codec.LdapResult;
+import org.apache.directory.studio.dsmlv2.LdapMessageDecorator;
+
+
+/**
+ * Decorator abstract class for LdapResponse
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class LdapResponseDecorator extends LdapMessageDecorator
+{
+ /**
+ * Creates a new instance of LdapResponseDecorator.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public LdapResponseDecorator( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapResponse#getLdapResponseLength()
+ */
+ public int getLdapResponseLength()
+ {
+ return ( ( LdapResponse ) instance ).getLdapResponseLength();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapResponse#getLdapResult()
+ */
+ public LdapResult getLdapResult()
+ {
+ return ( ( LdapResponse ) instance ).getLdapResult();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.shared.ldap.codec.LdapResponse#setLdapResult(org.apache.directory.shared.ldap.codec.LdapResult)
+ */
+ public void setLdapResult( LdapResult ldapResult )
+ {
+ ( ( LdapResponse ) instance ).setLdapResult( ldapResult );
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResultDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResultDsml.java
new file mode 100644
index 0000000..436b3fc
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResultDsml.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import java.util.List;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapResult;
+import org.apache.directory.shared.ldap.codec.util.LdapURL;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.apache.directory.studio.dsmlv2.ParserUtils;
+import org.dom4j.Element;
+
+
+/**
+ * DSML Decorator for the LdapResult class.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class LdapResultDsml implements DsmlDecorator
+{
+ /** The LDAP Result to decorate */
+ private LdapResult result;
+
+ /** The associated LDAP Message */
+ private LdapMessage message;
+
+
+ /**
+ * Creates a new instance of LdapResultDsml.
+ *
+ * @param result
+ * the LdapResult to decorate
+ * @param message
+ * the associated message
+ */
+ public LdapResultDsml( LdapResult result, LdapMessage message )
+ {
+ this.result = result;
+ this.message = message;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+
+ // RequestID
+ int requestID = message.getMessageId();
+ if ( requestID != 0 )
+ {
+ root.addAttribute( "requestID", "" + requestID );
+ }
+
+ // Matched DN
+ String matchedDN = result.getMatchedDN();
+ if ( !matchedDN.equals( "" ) )
+ {
+ root.addAttribute( "matchedDN", matchedDN );
+ }
+
+ // Controls
+ ParserUtils.addControls( root, message.getControls() );
+
+ // ResultCode
+ Element resultCodeElement = root.addElement( "resultCode" );
+ resultCodeElement.addAttribute( "code", "" + result.getResultCode().getResultCode() );
+ resultCodeElement.addAttribute( "descr", LdapResultEnum.getResultCodeDescr( result.getResultCode() ) );
+
+ // ErrorMessage
+ String errorMessage = ( result.getErrorMessage() );
+ if ( ( errorMessage != null ) && ( !errorMessage.equals( "" ) ) )
+ {
+ Element errorMessageElement = root.addElement( "errorMessage" );
+ errorMessageElement.addText( errorMessage );
+ }
+
+ // Referals
+ List<LdapURL> referals = result.getReferrals();
+ if ( referals != null )
+ {
+ for ( int i = 0; i < referals.size(); i++ )
+ {
+ Element referalElement = root.addElement( "referal" );
+ referalElement.addText( referals.get( i ).toString() );
+ }
+ }
+
+ return root;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResultEnum.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResultEnum.java
new file mode 100644
index 0000000..e28f28b
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResultEnum.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+
+
+/**
+ * This Class helps to get resultCodeDesc for a ResultCode of a LdapResult.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class LdapResultEnum
+{
+ /**
+ * Gets the String description of a given result code
+ *
+ * @param resultCode
+ * a result code
+ * @return
+ * the String description corresponding to the result code
+ */
+ public static String getResultCodeDescr( ResultCodeEnum resultCode )
+ {
+ switch ( resultCode )
+ {
+ case SUCCESS:
+ return "success";
+ case OPERATIONS_ERROR:
+ return "operationsError";
+ case PROTOCOL_ERROR:
+ return "protocolError";
+ case TIME_LIMIT_EXCEEDED:
+ return "timeLimitExceeded";
+ case SIZE_LIMIT_EXCEEDED:
+ return "sizeLimitExceeded";
+ case COMPARE_FALSE:
+ return "compareFalse";
+ case COMPARE_TRUE:
+ return "compareTrue";
+ case AUTH_METHOD_NOT_SUPPORTED:
+ return "authMethodNotSupported";
+ case STRONG_AUTH_REQUIRED:
+ return "strongAuthRequired";
+ case PARTIAL_RESULTS:
+ return "partialResults";
+ case REFERRAL:
+ return "referral";
+ case ADMIN_LIMIT_EXCEEDED:
+ return "adminLimitExceeded";
+ case UNAVAILABLE_CRITICAL_EXTENSION:
+ return "unavailableCriticalExtension";
+ case CONFIDENTIALITY_REQUIRED:
+ return "confidentialityRequired";
+ case SASL_BIND_IN_PROGRESS:
+ return "saslBindInProgress";
+ case NO_SUCH_ATTRIBUTE:
+ return "noSuchAttribute";
+ case UNDEFINED_ATTRIBUTE_TYPE:
+ return "undefinedAttributeType";
+ case INAPPROPRIATE_MATCHING:
+ return "inappropriateMatching";
+ case CONSTRAINT_VIOLATION:
+ return "constraintViolation";
+ case ATTRIBUTE_OR_VALUE_EXISTS:
+ return "attributeOrValueExists";
+ case INVALID_ATTRIBUTE_SYNTAX:
+ return "invalidAttributeSyntax";
+ case NO_SUCH_OBJECT:
+ return "NO_SUCH_OBJECT";
+ case ALIAS_PROBLEM:
+ return "aliasProblem";
+ case INVALID_DN_SYNTAX:
+ return "invalidDNSyntax";
+ case ALIAS_DEREFERENCING_PROBLEM:
+ return "aliasDereferencingProblem";
+ case INAPPROPRIATE_AUTHENTICATION:
+ return "inappropriateAuthentication";
+ case INVALID_CREDENTIALS:
+ return "invalidCredentials";
+ case INSUFFICIENT_ACCESS_RIGHTS:
+ return "insufficientAccessRights";
+ case BUSY:
+ return "busy";
+ case UNAVAILABLE:
+ return "unavailable";
+ case UNWILLING_TO_PERFORM:
+ return "unwillingToPerform";
+ case LOOP_DETECT:
+ return "loopDetect";
+ case NAMING_VIOLATION:
+ return "namingViolation";
+ case OBJECT_CLASS_VIOLATION:
+ return "objectClassViolation";
+ case NOT_ALLOWED_ON_NON_LEAF:
+ return "notAllowedOnNonLeaf";
+ case NOT_ALLOWED_ON_RDN:
+ return "notAllowedOnRDN";
+ case ENTRY_ALREADY_EXISTS:
+ return "entryAlreadyExists";
+ case OBJECT_CLASS_MODS_PROHIBITED:
+ return "objectClassModsProhibited";
+ case AFFECTS_MULTIPLE_DSAS:
+ return "affectsMultipleDSAs";
+ case OTHER:
+ return "other";
+ case UNKNOWN:
+ return "unknown";
+
+ default:
+ return "unknoxn";
+ }
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModDNResponseDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModDNResponseDsml.java
new file mode 100644
index 0000000..c44fd5b
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModDNResponseDsml.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponse;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.dom4j.Element;
+
+
+/**
+ * DSML Decorator for ModDNResponse
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ModDNResponseDsml extends LdapResponseDecorator implements DsmlDecorator
+{
+ /**
+ * Creates a new instance of ModDNResponseDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public ModDNResponseDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( "modDNResponse" );
+
+ LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( ModifyDNResponse ) instance ).getLdapResult(), instance );
+ ldapResultDsml.toDsml( element );
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModifyResponseDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModifyResponseDsml.java
new file mode 100644
index 0000000..3620ba5
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModifyResponseDsml.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.modify.ModifyResponse;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.dom4j.Element;
+
+
+/**
+ * DSML Decorator for ModifyResponse
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ModifyResponseDsml extends LdapResponseDecorator implements DsmlDecorator
+{
+ /**
+ * Creates a new instance of ModifyResponseDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public ModifyResponseDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( "modifyResponse" );
+
+ LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( ModifyResponse ) instance ).getLdapResult(), instance );
+ ldapResultDsml.toDsml( element );
+ return element;
+ }
+
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResponse.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResponse.java
new file mode 100644
index 0000000..feb2184
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResponse.java
@@ -0,0 +1,173 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.shared.ldap.codec.LdapResponse;
+import org.apache.directory.shared.ldap.codec.search.SearchResultDone;
+import org.apache.directory.shared.ldap.codec.search.SearchResultEntry;
+import org.apache.directory.shared.ldap.codec.search.SearchResultReference;
+
+
+/**
+ * This class represents the DSML Search Response
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SearchResponse extends LdapResponse
+{
+ /** The List of contained Search Result Entries */
+ private List<SearchResultEntry> searchResultEntryList;
+
+ /** The List of contained Search Result References */
+ private List<SearchResultReference> searchResultReferenceList;
+
+ /** The Search Result Done object */
+ private SearchResultDone searchResultDone;
+
+
+ /**
+ * Creates a new instance of SearchResponse.
+ */
+ public SearchResponse()
+ {
+ searchResultEntryList = new ArrayList<SearchResultEntry>();
+ searchResultReferenceList = new ArrayList<SearchResultReference>();
+ }
+
+
+ /**
+ * Adds a Search Result Entry
+ *
+ * @param searchResultEntry
+ * the Search Result Entry to add
+ * @return
+ * true (as per the general contract of the Collection.add method)
+ */
+ public boolean addSearchResultEntry( SearchResultEntry searchResultEntry )
+ {
+ return searchResultEntryList.add( searchResultEntry );
+ }
+
+
+ /**
+ * Gets the Current Search Result Entry
+ *
+ * @return
+ * the current Searche Result Entry
+ */
+ public SearchResultEntry getCurrentSearchResultEntry()
+ {
+ if ( searchResultEntryList.size() > 0 )
+ {
+ return searchResultEntryList.get( searchResultEntryList.size() - 1 );
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+
+ /**
+ * Gets the Search Result Entry List
+ *
+ * @return
+ * the Search Result Entry List
+ */
+ public List<SearchResultEntry> getSearchResultEntryList()
+ {
+ return searchResultEntryList;
+ }
+
+
+ /**
+ * Adds a Search Result Reference
+ *
+ * @param searchResultReference
+ * the Search Result Reference to add
+ * @return
+ * true (as per the general contract of the Collection.add method)
+ */
+ public boolean addSearchResultReference( SearchResultReference searchResultReference )
+ {
+ return searchResultReferenceList.add( searchResultReference );
+ }
+
+
+ /**
+ * Gets the current Search Result Reference
+ *
+ * @return
+ * the current Search Result Reference
+ */
+ public SearchResultReference getCurrentSearchResultReference()
+ {
+ if ( searchResultReferenceList.size() > 0 )
+ {
+ return searchResultReferenceList.get( searchResultReferenceList.size() - 1 );
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+
+ /**
+ * Gets the Search Result Reference List
+ *
+ * @return
+ * the Search Result Reference List
+ */
+ public List<SearchResultReference> getSearchResultReferenceList()
+ {
+ return searchResultReferenceList;
+ }
+
+
+ /**
+ * Gets the Search Result Entry
+ *
+ * @return
+ * the Search Result Entry
+ */
+ public SearchResultDone getSearchResultDone()
+ {
+ return searchResultDone;
+ }
+
+
+ /**
+ * Sets the Search Result Entry
+ *
+ * @param searchResultDone
+ * the Search Result Entry to set
+ */
+ public void setSearchResultDone( SearchResultDone searchResultDone )
+ {
+ this.searchResultDone = searchResultDone;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResponseDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResponseDsml.java
new file mode 100644
index 0000000..2608f75
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResponseDsml.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import java.util.List;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.dom4j.Element;
+
+
+/**
+ * This class represents the Search Response Dsml Container.
+ * It is used to store Search Responses (Search Result Entry,
+ * Search Result Reference and SearchResultDone).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SearchResponseDsml extends LdapResponseDecorator implements DsmlDecorator
+{
+ /** The responses */
+ private List<DsmlDecorator> responses;
+
+
+ /**
+ * Creates a new instance of SearchResponseDsml.
+ */
+ public SearchResponseDsml()
+ {
+ super( new LdapMessage() );
+ }
+
+
+ /**
+ * Adds a response.
+ *
+ * @param response
+ * the response to add
+ * @return
+ * true (as per the general contract of the Collection.add method).
+ */
+ public boolean addResponse( DsmlDecorator response )
+ {
+ return responses.add( response );
+ }
+
+
+ /**
+ * Removes a response.
+ *
+ * @param response
+ * the response to remove
+ * @return
+ * true if this list contained the specified element.
+ */
+ public boolean removeResponse( DsmlDecorator response )
+ {
+ return responses.remove( response );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( "searchResponse" );
+
+ // RequestID
+ int requestID = instance.getMessageId();
+ if ( requestID != 0 )
+ {
+ element.addAttribute( "requestID", "" + requestID );
+ }
+
+ for ( DsmlDecorator response : responses )
+ {
+ response.toDsml( element );
+ }
+
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultDoneDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultDoneDsml.java
new file mode 100644
index 0000000..0036af2
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultDoneDsml.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.search.SearchResultDone;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.dom4j.Element;
+
+
+/**
+ * DSML Decorator for SearchResultDone
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SearchResultDoneDsml extends LdapResponseDecorator implements DsmlDecorator
+{
+ /**
+ * Creates a new instance of SearchResultDoneDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public SearchResultDoneDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( "searchResultDone" );
+
+ LdapResultDsml ldapResultDsml = new LdapResultDsml( ( ( SearchResultDone ) instance ).getLdapResult(), instance );
+ ldapResultDsml.toDsml( element );
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java
new file mode 100644
index 0000000..4cbc7bc
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.search.SearchResultEntry;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.apache.directory.studio.dsmlv2.ParserUtils;
+import org.dom4j.Element;
+import org.dom4j.Namespace;
+import org.dom4j.QName;
+
+
+/**
+ * DSML Decorator for SearchResultEntry
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SearchResultEntryDsml extends LdapResponseDecorator implements DsmlDecorator
+{
+ /**
+ * Creates a new instance of SearchResultEntryDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public SearchResultEntryDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( "searchResultEntry" );
+ SearchResultEntry searchResultEntry = ( SearchResultEntry ) instance;
+ element.addAttribute( "dn", searchResultEntry.getObjectName().toString() );
+
+ Attributes attributes = searchResultEntry.getPartialAttributeList();
+ NamingEnumeration ne = attributes.getAll();
+
+ // Looping on Attributes Enumeration
+ while ( ne.hasMoreElements() )
+ {
+ Attribute attribute = ( Attribute ) ne.nextElement();
+
+ Element attributeElement = element.addElement( "attr" );
+ attributeElement.addAttribute( "name", attribute.getID() );
+
+ // Looping on Values Enumeration
+ try
+ {
+ NamingEnumeration ne2 = attribute.getAll();
+
+ while ( ne2.hasMoreElements() )
+ {
+ Object value = ne2.nextElement();
+
+ if ( ParserUtils.needsBase64Encoding( value ) )
+ {
+ Namespace xsdNamespace = new Namespace( ParserUtils.XSD, ParserUtils.XML_SCHEMA_URI );
+ Namespace xsiNamespace = new Namespace( ParserUtils.XSI, ParserUtils.XML_SCHEMA_INSTANCE_URI );
+ attributeElement.getDocument().getRootElement().add( xsdNamespace );
+ attributeElement.getDocument().getRootElement().add( xsiNamespace );
+
+ Element valueElement = attributeElement.addElement( "value" ).addText(
+ ParserUtils.base64Encode( value ) );
+ valueElement
+ .addAttribute( new QName( "type", xsiNamespace ), ParserUtils.XSD + ":" + ParserUtils.BASE64BINARY );
+ }
+ else
+ {
+ attributeElement.addElement( "value" ).addText( value.toString() );
+ }
+ }
+ }
+ catch ( NamingException e )
+ {
+ }
+ }
+
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultReferenceDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultReferenceDsml.java
new file mode 100644
index 0000000..403080b
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultReferenceDsml.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.reponse;
+
+
+import java.util.List;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.search.SearchResultReference;
+import org.apache.directory.shared.ldap.codec.util.LdapURL;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.dom4j.Element;
+
+
+/**
+ * DSML Decorator for SearchResultReference
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SearchResultReferenceDsml extends LdapResponseDecorator implements DsmlDecorator
+{
+ /**
+ * Creates a new instance of SearchResultReferenceDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public SearchResultReferenceDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( "searchResultReference" );
+ SearchResultReference searchResultReference = ( SearchResultReference ) instance;
+
+ // Adding References
+ List<LdapURL> refsList = searchResultReference.getSearchResultReferences();
+ for ( int i = 0; i < refsList.size(); i++ )
+ {
+ element.addElement( "ref" ).addText( refsList.get( i ).toString() );
+ }
+
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AbandonRequestDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AbandonRequestDsml.java
new file mode 100644
index 0000000..31de752
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AbandonRequestDsml.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.dsmlv2.request;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.abandon.AbandonRequest;
+import org.dom4j.Element;
+
+/**
+ * DSML Decorator for AbandonRequest
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AbandonRequestDsml extends AbstractRequestDsml
+{
+ /**
+ * Creates a new instance of AbandonRequestDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public AbandonRequestDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = super.toDsml( root );
+
+ AbandonRequest request = ( AbandonRequest ) instance;
+
+ // AbandonID
+ if ( request.getAbandonedMessageId() != 0 )
+ {
+ element.addAttribute( "abandonID", "" + request.getAbandonedMessageId() );
+ }
+
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AbstractRequestDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AbstractRequestDsml.java
new file mode 100644
index 0000000..739bda8
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AbstractRequestDsml.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+ package org.apache.directory.studio.dsmlv2.request;
+
+
+import org.apache.directory.shared.ldap.codec.LdapConstants;
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.apache.directory.studio.dsmlv2.ParserUtils;
+import org.dom4j.Element;
+
+
+public abstract class AbstractRequestDsml extends LdapRequestDecorator implements DsmlDecorator
+{
+ /**
+ * Creates a new instance of AbstractRequestDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public AbstractRequestDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /**
+ * Creates the Request Element and adds RequestID and Controls.
+ *
+ * @param root
+ * the root element
+ * @return
+ * the Request Element of the given name containing
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = root.addElement( getRequestName() );
+
+ // Request ID
+ int requestID = instance.getMessageId();
+ if ( requestID != 0 )
+ {
+ element.addAttribute( "requestID", "" + requestID );
+ }
+
+ // Controls
+ ParserUtils.addControls( element, instance.getControls() );
+
+ return element;
+ }
+
+ /**
+ * Gets the name of the request according to the type of the decorated element.
+ *
+ * @return
+ * the name of the request according to the type of the decorated element.
+ */
+ private String getRequestName()
+ {
+ switch ( instance.getMessageType() )
+ {
+ case LdapConstants.ABANDON_REQUEST:
+ return "abandonRequest";
+ case LdapConstants.ADD_REQUEST:
+ return "addRequest";
+ case LdapConstants.BIND_REQUEST:
+ return "authRequest";
+ case LdapConstants.COMPARE_REQUEST:
+ return "compareRequest";
+ case LdapConstants.DEL_REQUEST:
+ return "delRequest";
+ case LdapConstants.EXTENDED_REQUEST:
+ return "extendedRequest";
+ case LdapConstants.MODIFYDN_REQUEST:
+ return "modDNRequest";
+ case LdapConstants.MODIFY_REQUEST:
+ return "modifyRequest";
+ case LdapConstants.SEARCH_REQUEST:
+ return "searchRequest";
+ default:
+ return "error";
+ }
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java
new file mode 100644
index 0000000..2296d03
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.dsmlv2.request;
+
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.add.AddRequest;
+import org.apache.directory.studio.dsmlv2.ParserUtils;
+import org.dom4j.Element;
+import org.dom4j.Namespace;
+import org.dom4j.QName;
+
+
+/**
+ * DSML Decorator for AddRequest
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AddRequestDsml extends AbstractRequestDsml
+{
+ /**
+ * Creates a new instance of AddRequestDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public AddRequestDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = super.toDsml( root );
+
+ AddRequest request = ( AddRequest ) instance;
+
+ // DN
+ if ( request.getEntry() != null )
+ {
+ element.addAttribute( "dn", request.getEntry().toString() );
+ }
+
+ // Attributes
+ Attributes attributes = request.getAttributes();
+ if ( attributes != null )
+ {
+ NamingEnumeration ne = attributes.getAll();
+ while ( ne.hasMoreElements() )
+ {
+ Attribute attribute = ( Attribute ) ne.nextElement();
+ Element attributeElement = element.addElement( "attr" );
+ attributeElement.addAttribute( "name", attribute.getID() );
+
+ // Looping on Values Enumeration
+ try
+ {
+ NamingEnumeration ne2 = attribute.getAll();
+
+ while ( ne2.hasMoreElements() )
+ {
+ Object value = ne2.nextElement();
+
+ if ( ParserUtils.needsBase64Encoding( value ) )
+ {
+ Namespace xsdNamespace = new Namespace( "xsd", ParserUtils.XML_SCHEMA_URI );
+ Namespace xsiNamespace = new Namespace( "xsi", ParserUtils.XML_SCHEMA_INSTANCE_URI );
+ attributeElement.getDocument().getRootElement().add( xsdNamespace );
+ attributeElement.getDocument().getRootElement().add( xsiNamespace );
+
+ Element valueElement = attributeElement.addElement( "value" ).addText(
+ ParserUtils.base64Encode( value ) );
+ valueElement
+ .addAttribute( new QName( "type", xsiNamespace ), "xsd:" + ParserUtils.BASE64BINARY );
+ }
+ else
+ {
+ attributeElement.addElement( "value" ).addText( value.toString() );
+ }
+ }
+ }
+ catch ( NamingException e )
+ {
+ }
+ }
+ }
+
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java
new file mode 100644
index 0000000..b7c2a77
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.dsmlv2.request;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.bind.BindRequest;
+import org.dom4j.Element;
+
+/**
+ * DSML Decorator for BindRequest
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class AuthRequestDsml extends AbstractRequestDsml
+{
+ /**
+ * Creates a new instance of AuthRequestDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public AuthRequestDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = super.toDsml( root );
+
+ BindRequest request = ( BindRequest ) instance;
+
+ // AbandonID
+ String name = request.getName().toString();
+ if ( ( name != null ) && ( !"".equals( name ) ) )
+ {
+ element.addAttribute( "principal", name );
+ }
+
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/BatchRequest.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/BatchRequest.java
new file mode 100644
index 0000000..4792f10
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/BatchRequest.java
@@ -0,0 +1,261 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.request;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+
+
+/**
+ * This class represents the Batch Request of a DSML Request
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class BatchRequest
+{
+ /**
+ * The requests contained in the Batch Request
+ */
+ private List<LdapMessage> requests;
+
+ /**
+ * The ID of the request
+ */
+ private int requestID;
+
+ /**
+ * This enum represents the different types of processing for a Batch Request
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ public enum Processing
+ {
+ SEQUENTIAL, PARALLEL
+ };
+
+ /**
+ * The type of processing of the Batch Request
+ */
+ private Processing processing;
+
+ /**
+ * This enum represents the different types of on error handling for a BatchRequest
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ public enum OnError
+ {
+ RESUME, EXIT
+ };
+
+ /**
+ * The type of on error handling
+ */
+ private OnError onError;
+
+ /**
+ * This enum represents the different types of response order for a Batch Request
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+ public enum ResponseOrder
+ {
+ SEQUENTIAL, UNORDERED
+ };
+
+ /**
+ * The response order
+ */
+ private ResponseOrder responseOrder;
+
+
+ /**
+ * Creates a new instance of BatchRequest.
+ */
+ public BatchRequest()
+ {
+ requests = new ArrayList<LdapMessage>();
+ responseOrder = ResponseOrder.SEQUENTIAL;
+ processing = Processing.SEQUENTIAL;
+ onError = OnError.EXIT;
+ }
+
+
+ /**
+ * Adds a request
+ *
+ * @param request
+ * the resquest to add
+ * @return
+ * true (as per the general contract of the Collection.add method)
+ */
+ public boolean addRequest( LdapMessage request )
+ {
+ return requests.add( request );
+ }
+
+
+ /**
+ * Gets the current request
+ *
+ * @return
+ * the current request
+ */
+ public LdapMessage getCurrentRequest()
+ {
+ return requests.get( requests.size() - 1 );
+ }
+
+
+ /**
+ * Gets the ID of the request
+ *
+ * @return
+ * the ID of the request
+ */
+ public int getRequestID()
+ {
+ return requestID;
+ }
+
+
+ /**
+ * Sets the ID of the request
+ *
+ * @param requestID
+ * the ID to set
+ */
+ public void setRequestID( int requestID )
+ {
+ this.requestID = requestID;
+ }
+
+
+ /**
+ * Gets the processing type of the request
+ *
+ * @return
+ * the processing type of the request
+ */
+ public Processing getProcessing()
+ {
+ return processing;
+ }
+
+
+ /**
+ * Sets the processing type of the request
+ *
+ * @param processing
+ * the processing type to set
+ */
+ public void setProcessing( Processing processing )
+ {
+ this.processing = processing;
+ }
+
+
+ /**
+ * Gets the on error handling type of the request
+ *
+ * @return
+ * the on error handling type of the request
+ */
+ public OnError getOnError()
+ {
+ return onError;
+ }
+
+
+ /**
+ * Sets the on error handling type of the request
+ *
+ * @param onError
+ * the on error handling type to set
+ */
+ public void setOnError( OnError onError )
+ {
+ this.onError = onError;
+ }
+
+
+ /**
+ * Gets the reponse order type of the request
+ *
+ * @return
+ * the reponse order type of the request
+ */
+ public ResponseOrder getResponseOrder()
+ {
+ return responseOrder;
+ }
+
+
+ /**
+ * Sets the reponse order type of the request
+ *
+ * @param responseOrder
+ * the reponse order type to set
+ */
+ public void setResponseOrder( ResponseOrder responseOrder )
+ {
+ this.responseOrder = responseOrder;
+ }
+
+
+ /**
+ * Gets the List of all the requests in the Batch Request
+ *
+ * @return
+ * the List of all the requests in the Batch Request
+ */
+ public List getRequests()
+ {
+ return requests;
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer();
+
+ sb.append( "[" );
+ sb.append( "processing: " + processing );
+ sb.append( " - " );
+ sb.append( "onError: " + onError );
+ sb.append( " - " );
+ sb.append( "responseOrder: " + responseOrder );
+ sb.append( "]" );
+
+ return sb.toString();
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/BatchRequestDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/BatchRequestDsml.java
new file mode 100644
index 0000000..444a625
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/BatchRequestDsml.java
@@ -0,0 +1,236 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.dsmlv2.request;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.studio.dsmlv2.DsmlDecorator;
+import org.apache.directory.studio.dsmlv2.ParserUtils;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest.OnError;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest.Processing;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest.ResponseOrder;
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+
+
+/**
+ * This class represents the Batch Request. It can be used to generate an the XML String of a BatchRequest.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class BatchRequestDsml
+{
+ /** The Requests list */
+ private List<DsmlDecorator> requests;
+
+ /** The ID of the request */
+ private int requestID;
+
+ /** The type of processing of the Batch Request */
+ private Processing processing;
+
+ /** The type of on error handling */
+ private OnError onError;
+
+ /** The response order */
+ private ResponseOrder responseOrder;
+
+
+ /**
+ * Creates a new instance of BatchResponseDsml.
+ */
+ public BatchRequestDsml()
+ {
+ requests = new ArrayList<DsmlDecorator>();
+ responseOrder = ResponseOrder.SEQUENTIAL;
+ processing = Processing.SEQUENTIAL;
+ onError = OnError.EXIT;
+ }
+
+
+ /**
+ * Adds a request to the Batch Request DSML.
+ *
+ * @param request
+ * the request to add
+ * @return
+ * true (as per the general contract of the Collection.add method).
+ */
+ public boolean addRequest( DsmlDecorator request )
+ {
+ return requests.add( request );
+ }
+
+
+ /**
+ * Removes a request from the Batch Request DSML.
+ *
+ * @param request
+ * the request to remove
+ * @return
+ * true if this list contained the specified element.
+ */
+ public boolean removeRequest( DsmlDecorator request )
+ {
+ return requests.remove( request );
+ }
+
+
+ /**
+ * Gets the ID of the request
+ *
+ * @return
+ * the ID of the request
+ */
+ public int getRequestID()
+ {
+ return requestID;
+ }
+
+
+ /**
+ * Sets the ID of the request
+ *
+ * @param requestID
+ * the ID to set
+ */
+ public void setRequestID( int requestID )
+ {
+ this.requestID = requestID;
+ }
+
+
+ /**
+ * Gets the processing type of the request
+ *
+ * @return
+ * the processing type of the request
+ */
+ public Processing getProcessing()
+ {
+ return processing;
+ }
+
+
+ /**
+ * Sets the processing type of the request
+ *
+ * @param processing
+ * the processing type to set
+ */
+ public void setProcessing( Processing processing )
+ {
+ this.processing = processing;
+ }
+
+
+ /**
+ * Gets the on error handling type of the request
+ *
+ * @return
+ * the on error handling type of the request
+ */
+ public OnError getOnError()
+ {
+ return onError;
+ }
+
+
+ /**
+ * Sets the on error handling type of the request
+ *
+ * @param onError
+ * the on error handling type to set
+ */
+ public void setOnError( OnError onError )
+ {
+ this.onError = onError;
+ }
+
+
+ /**
+ * Gets the reponse order type of the request
+ *
+ * @return
+ * the reponse order type of the request
+ */
+ public ResponseOrder getResponseOrder()
+ {
+ return responseOrder;
+ }
+
+
+ /**
+ * Sets the reponse order type of the request
+ *
+ * @param responseOrder
+ * the reponse order type to set
+ */
+ public void setResponseOrder( ResponseOrder responseOrder )
+ {
+ this.responseOrder = responseOrder;
+ }
+
+
+ /**
+ * Converts the Batch Request to its XML representation in the DSMLv2 format.
+ */
+ public String toDsml()
+ {
+ Document document = DocumentHelper.createDocument();
+ Element element = document.addElement( "batchRequest" );
+
+ // RequestID
+ if ( requestID != 0 )
+ {
+ element.addAttribute( "requestID", "" + requestID );
+ }
+
+ // ResponseOrder
+ if ( responseOrder == ResponseOrder.UNORDERED )
+ {
+ element.addAttribute( "responseOrder", "unordered" );
+ }
+
+ // Processing
+ if ( processing == Processing.PARALLEL )
+ {
+ element.addAttribute( "processing", "parallel" );
+ }
+
+ // On Error
+ if ( onError == OnError.RESUME )
+ {
+ element.addAttribute( "onError", "resume" );
+ }
+
+ // Requests
+ for ( DsmlDecorator request : requests )
+ {
+ request.toDsml( element );
+ }
+
+ return ParserUtils.styleDocument( document ).asXML();
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java
new file mode 100644
index 0000000..e7b2309
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.dsmlv2.request;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.compare.CompareRequest;
+import org.dom4j.Element;
+
+/**
+ * DSML Decorator for CompareRequest
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CompareRequestDsml extends AbstractRequestDsml
+{
+ /**
+ * Creates a new instance of CompareRequestDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public CompareRequestDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = super.toDsml( root );
+
+ CompareRequest request = ( CompareRequest ) instance;
+
+ // DN
+ if ( request.getEntry() != null )
+ {
+ element.addAttribute( "dn", request.getEntry().toString() );
+ }
+
+ // Assertion
+ Element assertionElement = element.addElement( "assertion");
+ if ( request.getAttributeDesc() != null )
+ {
+ assertionElement.addAttribute( "name", request.getAttributeDesc() );
+ }
+ if ( request.getAssertionValue() != null )
+ {
+ assertionElement.addElement( "value").setText( (String) request.getAssertionValue() );
+ }
+
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java
new file mode 100644
index 0000000..88efcf5
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+package org.apache.directory.studio.dsmlv2.request;
+
+import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.del.DelRequest;
+import org.dom4j.Element;
+
+/**
+ * DSML Decorator for DelRequest
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class DelRequestDsml extends AbstractRequestDsml
+{
+ /**
+ * Creates a new instance of DelRequestDsml.
+ *
+ * @param ldapMessage
+ * the message to decorate
+ */
+ public DelRequestDsml( LdapMessage ldapMessage )
+ {
+ super( ldapMessage );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getMessageType()
+ {
+ return instance.getMessageType();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public Element toDsml( Element root )
+ {
+ Element element = super.toDsml( root );
+
+ DelRequest request = ( DelRequest ) instance;
+
+ // DN
+ if ( request.getEntry() != null )
+ {
+ element.addAttribute( "dn", request.getEntry().toString() );
+ }
+
+ return element;
+ }
+}
diff --git a/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/Dsmlv2Grammar.java b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/Dsmlv2Grammar.java
new file mode 100644
index 0000000..1648eb7
--- /dev/null
+++ b/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/Dsmlv2Grammar.java
@@ -0,0 +1,2720 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+package org.apache.directory.studio.dsmlv2.request;
+
+
+import java.io.IOException;
+import java.lang.reflect.Array;
+import java.util.HashMap;
+
+import javax.naming.InvalidNameException;
+
+import org.apache.directory.shared.asn1.Asn1Object;
+import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.asn1.primitives.OID;
+import org.apache.directory.shared.ldap.codec.AttributeValueAssertion;
+import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.codec.LdapConstants;
+import org.apache.directory.shared.ldap.codec.abandon.AbandonRequest;
+import org.apache.directory.shared.ldap.codec.add.AddRequest;
+import org.apache.directory.shared.ldap.codec.bind.BindRequest;
+import org.apache.directory.shared.ldap.codec.bind.SimpleAuthentication;
+import org.apache.directory.shared.ldap.codec.compare.CompareRequest;
+import org.apache.directory.shared.ldap.codec.del.DelRequest;
+import org.apache.directory.shared.ldap.codec.extended.ExtendedRequest;
+import org.apache.directory.shared.ldap.codec.modify.ModifyRequest;
+import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequest;
+import org.apache.directory.shared.ldap.codec.search.AndFilter;
+import org.apache.directory.shared.ldap.codec.search.AttributeValueAssertionFilter;
+import org.apache.directory.shared.ldap.codec.search.ExtensibleMatchFilter;
+import org.apache.directory.shared.ldap.codec.search.Filter;
+import org.apache.directory.shared.ldap.codec.search.NotFilter;
+import org.apache.directory.shared.ldap.codec.search.OrFilter;
+import org.apache.directory.shared.ldap.codec.search.PresentFilter;
+import org.apache.directory.shared.ldap.codec.search.SearchRequest;
+import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
+import org.apache.directory.shared.ldap.message.ScopeEnum;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
+import org.apache.directory.shared.ldap.util.Base64;
+import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.directory.studio.dsmlv2.AbstractGrammar;
+import org.apache.directory.studio.dsmlv2.Dsmlv2Container;
+import org.apache.directory.studio.dsmlv2.Dsmlv2StatesEnum;
+import org.apache.directory.studio.dsmlv2.GrammarAction;
+import org.apache.directory.studio.dsmlv2.GrammarTransition;
+import org.apache.directory.studio.dsmlv2.IGrammar;
+import org.apache.directory.studio.dsmlv2.ParserUtils;
+import org.apache.directory.studio.dsmlv2.Tag;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest.OnError;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest.Processing;
+import org.apache.directory.studio.dsmlv2.request.BatchRequest.ResponseOrder;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+
+/**
+ * This Class represents the DSMLv2 Request Grammar
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Dsmlv2Grammar extends AbstractGrammar implements IGrammar
+{
+ /** The instance of grammar. Dsmlv2Grammar is a singleton */
+ private static Dsmlv2Grammar instance = new Dsmlv2Grammar();
+
+
+ /**
+ * Creates a new instance of Dsmlv2Grammar.
+ */
+ @SuppressWarnings("unchecked")
+ private Dsmlv2Grammar()
+ {
+ name = Dsmlv2Grammar.class.getName();
+ statesEnum = Dsmlv2StatesEnum.getInstance();
+
+ // Create the transitions table
+ super.transitions = ( HashMap<Tag, GrammarTransition>[] ) Array.newInstance( HashMap.class, 200 );; // TODO Change this value
+
+ //====================================================
+ // Transitions concerning : BATCH REQUEST
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.INIT_GRAMMAR_STATE] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_END_TAG] = new HashMap<Tag, GrammarTransition>();
+
+ // ** OPEN BATCH REQUEST **
+ // State: [INIT_GRAMMAR_STATE] - Tag: <batchRequest>
+ super.transitions[Dsmlv2StatesEnum.INIT_GRAMMAR_STATE].put( new Tag( "batchRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE, Dsmlv2StatesEnum.BATCHREQUEST_START_TAG,
+ batchRequestCreation ) );
+
+ // ** CLOSE BATCH REQUEST **
+ // state: [BATCHREQUEST_START_TAG] - Tag: </batchRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG]
+ .put( new Tag( "batchRequest", Tag.END ), new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG,
+ Dsmlv2StatesEnum.BATCHREQUEST_END_TAG, null ) );
+ //state: [BATCHREQUEST_LOOP] - Tag: </batchRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP].put( new Tag( "batchRequest", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.END_STATE, null ) );
+
+ // ** ABANDON REQUEST **
+ // State: [BATCHREQUEST_START_TAG] - Tag: <abandonRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG].put( new Tag( "abandonRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG,
+ abandonRequestCreation ) );
+ // state: [BATCHREQUEST_LOOP] - Tag: <abandonRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP].put( new Tag( "abandonRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG,
+ abandonRequestCreation ) );
+
+ // ** ADD REQUEST **
+ // state: [BATCHREQUEST_START_TAG] - Tag: <addRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG].put( new Tag( "addRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.ADD_REQUEST_START_TAG,
+ addRequestCreation ) );
+ // state: [BATCHREQUEST_LOOP] - Tag: <addRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP].put( new Tag( "addRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.ADD_REQUEST_START_TAG,
+ addRequestCreation ) );
+
+ // ** AUTH REQUEST **
+ // state: [BATCHREQUEST_START_TAG] - Tag: <authRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG].put( new Tag( "authRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.AUTH_REQUEST_START_TAG,
+ authRequestCreation ) );
+
+ // ** COMPARE REQUEST **
+ // state: [BATCHREQUEST_START_TAG] - Tag: <compareRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG].put( new Tag( "compareRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.COMPARE_REQUEST_START_TAG,
+ compareRequestCreation ) );
+ // state: [BATCHREQUEST_LOOP] - Tag: <compareRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP].put( new Tag( "compareRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.COMPARE_REQUEST_START_TAG,
+ compareRequestCreation ) );
+
+ // ** DEL REQUEST **
+ // state: [BATCHREQUEST_START_TAG] - Tag: <delRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG].put( new Tag( "delRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.DEL_REQUEST_START_TAG,
+ delRequestCreation ) );
+ // state: [BATCHREQUEST_LOOP] - Tag: <delRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP].put( new Tag( "delRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.DEL_REQUEST_START_TAG,
+ delRequestCreation ) );
+
+ // ** EXTENDED REQUEST **
+ // state: [BATCHREQUEST_START_TAG] - Tag: <extendedRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG].put( new Tag( "extendedRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG,
+ Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG, extendedRequestCreation ) );
+ // state: [BATCHREQUEST_LOOP] - Tag: <extendedRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP].put( new Tag( "extendedRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG,
+ extendedRequestCreation ) );
+
+ // ** MOD DN REQUEST **
+ // state: [BATCHREQUEST_START_TAG] - Tag: <modDNRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG].put( new Tag( "modDNRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG,
+ Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG, modDNRequestCreation ) );
+ // state: [BATCHREQUEST_LOOP] - Tag: <modDNRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP].put( new Tag( "modDNRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG,
+ modDNRequestCreation ) );
+
+ // ** MODIFY REQUEST **
+ // state: [BATCHREQUEST_START_TAG] - Tag: <modifyRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG].put( new Tag( "modifyRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG,
+ modifyRequestCreation ) );
+ // state: [BATCHREQUEST_LOOP] - Tag: <modifyRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP].put( new Tag( "modifyRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG,
+ modifyRequestCreation ) );
+
+ // ** SEARCH REQUEST **
+ // state: [BATCHREQUEST_START_TAG] - Tag: <searchRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_START_TAG].put( new Tag( "searchRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_START_TAG, Dsmlv2StatesEnum.SEARCH_REQUEST_START_TAG,
+ searchRequestCreation ) );
+ // state: [BATCHREQUEST_LOOP] - Tag: <searchRequest>
+ super.transitions[Dsmlv2StatesEnum.BATCHREQUEST_LOOP].put( new Tag( "searchRequest", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.BATCHREQUEST_LOOP, Dsmlv2StatesEnum.SEARCH_REQUEST_START_TAG,
+ searchRequestCreation ) );
+
+ //====================================================
+ // Transitions concerning : ABANDON REQUEST
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROLVALUE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [ABANDON_REQUEST_START_TAG] - Tag: </abandonRequest>
+ super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG]
+ .put( new Tag( "abandonRequest", Tag.END ), new GrammarTransition(
+ Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ // State: [ABANDON_REQUEST_START_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.ABANDON_REQUEST_START_TAG,
+ Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [ABANDON_REQUEST_CONTROL_START_TAG] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG].put(
+ new Tag( "controlValue", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
+
+ // State: [ABANDON_REQUEST_CONTROLVALUE_END_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROLVALUE_END_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROLVALUE_END_TAG,
+ Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [ABANDON_REQUEST_CONTROL_START_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [ABANDON_REQUEST_CONTROL_END_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [ABANDON_REQUEST_CONTROL_END_TAG] - Tag: </abandonRequest>
+ super.transitions[Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG].put( new Tag( "abandonRequest", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.ABANDON_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ //====================================================
+ // Transitions concerning : ADD REQUEST
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROLVALUE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_ATTR_END_TAG] = new HashMap<Tag, GrammarTransition>();
+
+ // state: [ADD_REQUEST_START_TAG] -> Tag: </addRequest>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_START_TAG].put( new Tag( "addRequest", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ // State: [ADD_REQUEST_START_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_START_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_START_TAG,
+ Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [ADD_REQUEST_CONTROL_START_TAG] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG].put( new Tag( "controlValue", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.ADD_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
+
+ // State: [ADD_REQUEST_CONTROLVALUE_END_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROLVALUE_END_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_CONTROLVALUE_END_TAG,
+ Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [ADD_REQUEST_CONTROL_START_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [ADD_REQUEST_CONTROL_END_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [ADD_REQUEST_CONTROL_END_TAG] - Tag: </addRequest>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG].put( new Tag( "addRequest", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP,
+ null ) );
+
+ // State: [ADD_REQUEST_START_TAG] - Tag: <attr>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_START_TAG].put( new Tag( "attr", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_START_TAG, Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG,
+ addRequestAddAttribute ) );
+
+ // State: [ADD_REQUEST_CONTROL_END_TAG] - Tag: <attr>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG].put( new Tag( "attr", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG, addRequestAddAttribute ) );
+
+ // State: [ADD_REQUEST_ATTR_END_TAG] - Tag: <attr>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_ATTR_END_TAG].put( new Tag( "attr", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_ATTR_END_TAG,
+ Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG, addRequestAddAttribute ) );
+
+ // State: [ADD_REQUEST_ATTR_START_TAG] - Tag: </attr>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG].put( new Tag( "attr", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG,
+ Dsmlv2StatesEnum.ADD_REQUEST_ATTR_END_TAG, null ) );
+
+ // State: [ADD_REQUEST_ATTR_START_TAG] - Tag: <value>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG].put( new Tag( "value", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG,
+ Dsmlv2StatesEnum.ADD_REQUEST_ATTR_START_TAG, addRequestAddValue ) );
+
+ // State: [ADD_REQUEST_ATTR_END_TAG] - Tag: </addRequest>
+ super.transitions[Dsmlv2StatesEnum.ADD_REQUEST_ATTR_END_TAG]
+ .put( new Tag( "addRequest", Tag.END ), new GrammarTransition( Dsmlv2StatesEnum.ADD_REQUEST_ATTR_END_TAG,
+ Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ //====================================================
+ // Transitions concerning : AUTH REQUEST
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROLVALUE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+
+ // state: [AUTH_REQUEST_START_TAG] -> Tag: </authRequest>
+ super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_START_TAG].put( new Tag( "authRequest", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ // State: [AUTH_REQUEST_START_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_START_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_START_TAG,
+ Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [AUTH_REQUEST_CONTROL_START_TAG] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG].put( new Tag( "controlValue", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.AUTH_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
+
+ // State: [AUTH_REQUEST_CONTROLVALUE_END_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROLVALUE_END_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_CONTROLVALUE_END_TAG,
+ Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [AUTH_REQUEST_CONTROL_START_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [AUTH_REQUEST_CONTROL_END_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [AUTH_REQUEST_CONTROL_END_TAG] - Tag: </authRequest>
+ super.transitions[Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG].put( new Tag( "authRequest", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.AUTH_REQUEST_CONTROL_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP,
+ null ) );
+
+ //====================================================
+ // Transitions concerning : COMPARE REQUEST
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROLVALUE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_VALUE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [COMPARE_REQUEST_START_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_START_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_START_TAG,
+ Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [COMPARE_REQUEST_CONTROL_START_TAG] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG].put(
+ new Tag( "controlValue", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
+
+ // State: [COMPARE_REQUEST_CONTROLVALUE_END_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROLVALUE_END_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROLVALUE_END_TAG,
+ Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [COMPARE_REQUEST_CONTROL_START_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [COMPARE_REQUEST_CONTROL_END_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [COMPARE_REQUEST_CONTROL_END_TAG] - Tag: </compareRequest>
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG].put( new Tag( "compareRequest", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ // State: [COMPARE_REQUEST_START_TAG] - Tag: <assertion>
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_START_TAG].put( new Tag( "assertion", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_START_TAG, compareRequestAddAssertion ) );
+
+ // State: [COMPARE_REQUEST_CONTROL_END_TAG] - Tag: <assertion>
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG].put( new Tag( "assertion", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_START_TAG, compareRequestAddAssertion ) );
+
+ // State: [COMPARE_REQUEST_ASSERTION_START_TAG] - Tag: <value>
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_START_TAG].put( new Tag( "value", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_START_TAG,
+ Dsmlv2StatesEnum.COMPARE_REQUEST_VALUE_END_TAG, compareRequestAddValue ) );
+
+ //State: [COMPARE_REQUEST_VALUE_END_TAG] - Tag: </assertion>
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_VALUE_END_TAG].put( new Tag( "assertion", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.COMPARE_REQUEST_VALUE_END_TAG,
+ Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_END_TAG, null ) );
+
+ // State: [COMPARE_REQUEST_ASSERTION_END_TAG] - Tag: </compareRequest>
+ super.transitions[Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_END_TAG].put(
+ new Tag( "compareRequest", Tag.END ), new GrammarTransition(
+ Dsmlv2StatesEnum.COMPARE_REQUEST_ASSERTION_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ //====================================================
+ // Transitions concerning : DEL REQUEST
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROLVALUE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [DEL_REQUEST_START_TAG] - Tag: </delRequest>
+ super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_START_TAG].put( new Tag( "delRequest", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ // State: [DEL_REQUEST_START_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_START_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_START_TAG,
+ Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [DEL_REQUEST_CONTROL_START_TAG] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG].put( new Tag( "controlValue", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.DEL_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
+
+ // State: [DEL_REQUEST_CONTROLVALUE_END_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROLVALUE_END_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_CONTROLVALUE_END_TAG,
+ Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [DEL_REQUEST_CONTROL_START_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [DEL_REQUEST_CONTROL_END_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [DEL_REQUEST_CONTROL_END_TAG] - Tag: </delRequest>
+ super.transitions[Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG].put( new Tag( "delRequest", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.DEL_REQUEST_CONTROL_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP,
+ null ) );
+
+ //====================================================
+ // Transitions concerning : EXTENDED REQUEST
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROLVALUE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTVALUE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [EXTENDED_REQUEST_START_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG,
+ Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [EXTENDED_REQUEST_CONTROL_START_TAG] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG].put(
+ new Tag( "controlValue", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
+
+ // State: [EXTENDED_REQUEST_CONTROLVALUE_END_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROLVALUE_END_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROLVALUE_END_TAG,
+ Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [EXTENDED_REQUEST_CONTROL_START_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [EXTENDED_REQUEST_CONTROL_END_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [EXTENDED_REQUEST_CONTROL_END_TAG] - Tag: </extendedRequest>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG].put(
+ new Tag( "extendedRequest", Tag.END ), new GrammarTransition(
+ Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ // State: [EXTENDED_REQUEST_START_TAG] - Tag: <requestName>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG].put( new Tag( "requestName", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_START_TAG,
+ Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG, extendedRequestAddName ) );
+
+ // State: [EXTENDED_REQUEST_CONTROL_END_TAG] - Tag: <requestName>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG].put( new Tag( "requestName", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG, extendedRequestAddName ) );
+
+ // State: [EXTENDED_REQUEST_REQUESTNAME_END_TAG] - Tag: </extendedRequest>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG].put( new Tag( "extendedRequest",
+ Tag.END ), new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG,
+ Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ // State: [EXTENDED_REQUEST_REQUESTNAME_END_TAG] - Tag: <requestValue>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG].put( new Tag( "requestValue",
+ Tag.START ), new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTNAME_END_TAG,
+ Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTVALUE_END_TAG, extendedRequestAddValue ) );
+
+ // State: [EXTENDED_REQUEST_REQUESTVALUE_END_TAG] - Tag: </requestRequest>
+ super.transitions[Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTVALUE_END_TAG].put( new Tag( "extendedRequest",
+ Tag.END ), new GrammarTransition( Dsmlv2StatesEnum.EXTENDED_REQUEST_REQUESTVALUE_END_TAG,
+ Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ //====================================================
+ // Transitions concerning : MODIFY DN REQUEST
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [MODIFY_DN_REQUEST_START_TAG] - Tag: </modDNRequest>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG].put( new Tag( "modDNRequest", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP,
+ null ) );
+
+ // State: [MODIFY_DN_REQUEST_START_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_DN_REQUEST_START_TAG,
+ Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [MODIFY_DN_REQUEST_CONTROL_START_TAG] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG].put(
+ new Tag( "controlValue", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
+
+ // State: [MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG,
+ Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [MODIFY_DN_REQUEST_CONTROL_START_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [MODIFY_DN_REQUEST_CONTROL_END_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [MODIFY_DN_REQUEST_CONTROL_END_TAG] - Tag: </modDNRequest>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG].put( new Tag( "modDNRequest", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_DN_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ //====================================================
+ // Transitions concerning : MODIFY REQUEST
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROLVALUE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [MODIFY_REQUEST_START_TAG] - Tag: </modifyRequest>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG]
+ .put( new Tag( "modifyRequest", Tag.END ), new GrammarTransition(
+ Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ // State: [MODIFY_REQUEST_START_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG,
+ Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [MODIFY_REQUEST_CONTROL_START_TAG] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG].put( new Tag( "controlValue", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
+
+ // State: [MODIFY_REQUEST_CONTROLVALUE_END_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROLVALUE_END_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROLVALUE_END_TAG,
+ Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [MODIFY_REQUEST_CONTROL_START_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [MODIFY_REQUEST_CONTROL_END_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [MODIFY_REQUEST_CONTROL_END_TAG] - Tag: </modifyRequest>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG].put( new Tag( "modifyRequest", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP,
+ null ) );
+
+ // State: [MODIFY_REQUEST_CONTROL_END_TAG] - Tag: <modification>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG].put( new Tag( "modification", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG, modifyRequestAddModification ) );
+
+ // State: [MODIFY_REQUEST_START_TAG] - Tag: <modification>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG].put( new Tag( "modification", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_START_TAG,
+ Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG, modifyRequestAddModification ) );
+
+ // State: [MODIFY_REQUEST_MODIFICATION_END_TAG] - Tag: <modification>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG].put(
+ new Tag( "modification", Tag.START ), new GrammarTransition(
+ Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG,
+ Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG, modifyRequestAddModification ) );
+
+ // State: [MODIFY_REQUEST_MODIFICATION_START_TAG] - Tag: </modification>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG].put(
+ new Tag( "modification", Tag.END ), new GrammarTransition(
+ Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG,
+ Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG, null ) );
+
+ // State: [MODIFY_REQUEST_MODIFICATION_START_TAG] - Tag: <value>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG].put( new Tag( "value", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_START_TAG,
+ Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG, modifyRequestAddValue ) );
+
+ // State: [MODIFY_REQUEST_VALUE_END_TAG] - Tag: <value>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG].put( new Tag( "value", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG,
+ Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG, modifyRequestAddValue ) );
+
+ // State: [MODIFY_REQUEST_VALUE_END_TAG] - Tag: </modification>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG].put( new Tag( "modification", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.MODIFY_REQUEST_VALUE_END_TAG,
+ Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG, null ) );
+
+ // State: [MODIFY_REQUEST_MODIFICATION_END_TAG] - Tag: </modifyRequest>
+ super.transitions[Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG].put(
+ new Tag( "modifyRequest", Tag.END ), new GrammarTransition(
+ Dsmlv2StatesEnum.MODIFY_REQUEST_MODIFICATION_END_TAG, Dsmlv2StatesEnum.BATCHREQUEST_LOOP, null ) );
+
+ //====================================================
+ // Transitions concerning : SEARCH REQUEST
+ //====================================================
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROLVALUE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_END_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_START_TAG] = new HashMap<Tag, GrammarTransition>();
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_END_TAG] = new HashMap<Tag, GrammarTransition>();
+
+ // State: [SEARCH_REQUEST_START_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_START_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_START_TAG,
+ Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [SEARCH_REQUEST_CONTROL_START_TAG] - Tag: <controlValue>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG].put( new Tag( "controlValue", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROLVALUE_END_TAG, controlValueCreation ) );
+
+ // State: [SEARCH_REQUEST_CONTROLVALUE_END_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROLVALUE_END_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROLVALUE_END_TAG,
+ Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [SEARCH_REQUEST_CONTROL_START_TAG] - Tag: </control>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG].put( new Tag( "control", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG,
+ Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG, null ) );
+
+ // State: [SEARCH_REQUEST_CONTROL_END_TAG] - Tag: <control>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG].put( new Tag( "control", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_END_TAG,
+ Dsmlv2StatesEnum.SEARCH_REQUEST_CONTROL_START_TAG, controlCreation ) );
+
+ // State: [SEARCH_REQUEST_ATTRIBUTES_START_TAG] - Tag: </attributes>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_START_TAG].put( new Tag( "attributes", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_START_TAG,
+ Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_END_TAG, null ) );
+
+ // State: [SEARCH_REQUEST_ATTRIBUTES_START_TAG] - Tag: <attribute>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_START_TAG].put( new Tag( "attribute", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTES_START_TAG,
+ Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_START_TAG, searchRequestAddAttribute ) );
+
+ // State: [SEARCH_REQUEST_ATTRIBUTE_START_TAG] - Tag: </attribute>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_START_TAG].put( new Tag( "attribute", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_START_TAG,
+ Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_END_TAG, null ) );
+
+ // State: [SEARCH_REQUEST_ATTRIBUTE_END_TAG] - Tag: <attribute>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_END_TAG].put( new Tag( "attribute", Tag.START ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_END_TAG,
+ Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_START_TAG, searchRequestAddAttribute ) );
+
+ // State: [SEARCH_REQUEST_ATTRIBUTE_END_TAG] - Tag: </attributes>
+ super.transitions[Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_END_TAG].put( new Tag( "attributes", Tag.END ),
+ new GrammarTransition( Dsmlv2StatesEnum.SEARCH_REQUEST_ATTRIBUTE_END_TAG,