directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1668963 [1/4] - in /directory/studio/trunk/plugins: ./ openldap.common.ui/ openldap.common.ui/.settings/ openldap.common.ui/META-INF/ openldap.common.ui/src/ openldap.common.ui/src/main/ openldap.common.ui/src/main/java/ openldap.common.ui...
Date Tue, 24 Mar 2015 19:24:45 GMT
Author: elecharny
Date: Tue Mar 24 19:24:44 2015
New Revision: 1668963

URL: http://svn.apache.org/r1668963
Log:
Added the openldap.common.ui plugin

Added:
    directory/studio/trunk/plugins/openldap.common.ui/
    directory/studio/trunk/plugins/openldap.common.ui/.classpath
    directory/studio/trunk/plugins/openldap.common.ui/.project
    directory/studio/trunk/plugins/openldap.common.ui/.settings/
    directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.core.resources.prefs
    directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.jdt.core.prefs
    directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.m2e.core.prefs
    directory/studio/trunk/plugins/openldap.common.ui/META-INF/
    directory/studio/trunk/plugins/openldap.common.ui/META-INF/MANIFEST.MF
    directory/studio/trunk/plugins/openldap.common.ui/build.properties
    directory/studio/trunk/plugins/openldap.common.ui/plugin.properties
    directory/studio/trunk/plugins/openldap.common.ui/pom-first.xml
    directory/studio/trunk/plugins/openldap.common.ui/pom.xml
    directory/studio/trunk/plugins/openldap.common.ui/src/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/Messages.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/OpenLdapCommonUiConstants.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/OpenLdapCommonUiPlugin.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/AttributeDialog.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/PasswordDialog.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/UnixPermissions.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/UnixPermissionsDialog.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/messages.properties
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/messages_de.properties
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/messages_fr.properties
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/widgets/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/widgets/BooleanWithDefaultWidget.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/widgets/DirectoryBrowserWidget.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/widgets/EntryWidget.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/widgets/FileBrowserWidget.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/widgets/LogOperation.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/widgets/LogOperationsWidget.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/widgets/PasswordWidget.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/widgets/UnixPermissionsWidget.java
    directory/studio/trunk/plugins/openldap.common.ui/src/main/resources/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/resources/org/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/resources/org/apache/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/resources/org/apache/directory/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/resources/org/apache/directory/studio/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/resources/org/apache/directory/studio/openldap/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/resources/org/apache/directory/studio/openldap/common/
    directory/studio/trunk/plugins/openldap.common.ui/src/main/resources/org/apache/directory/studio/openldap/common/ui/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/java/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/java/org/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/java/org/apache/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/java/org/apache/directory/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/java/org/apache/directory/studio/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/java/org/apache/directory/studio/openldap/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/java/org/apache/directory/studio/openldap/common/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/java/org/apache/directory/studio/openldap/common/ui/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/java/org/apache/directory/studio/openldap/common/ui/dialogs/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/java/org/apache/directory/studio/openldap/common/ui/dialogs/UnixPermissionsTest.java
    directory/studio/trunk/plugins/openldap.common.ui/src/test/resources/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/resources/org/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/resources/org/apache/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/resources/org/apache/directory/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/resources/org/apache/directory/studio/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/resources/org/apache/directory/studio/openldap/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/resources/org/apache/directory/studio/openldap/common/
    directory/studio/trunk/plugins/openldap.common.ui/src/test/resources/org/apache/directory/studio/openldap/common/ui/
    directory/studio/trunk/plugins/openldap.common.ui/target/
    directory/studio/trunk/plugins/openldap.common.ui/target/.plxarc
    directory/studio/trunk/plugins/openldap.common.ui/target/MANIFEST.MF
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/META-INF/
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/META-INF/DEPENDENCIES
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/META-INF/LICENSE
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/META-INF/NOTICE
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/Messages.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/OpenLdapCommonUiConstants.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/OpenLdapCommonUiPlugin.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/AttributeDialog$1.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/AttributeDialog.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/PasswordDialog$1.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/PasswordDialog$2.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/PasswordDialog$3.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/PasswordDialog$4.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/PasswordDialog$5.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/PasswordDialog$6.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/PasswordDialog.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/UnixPermissions.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/UnixPermissionsDialog$1.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/UnixPermissionsDialog$2.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/UnixPermissionsDialog$3.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/dialogs/UnixPermissionsDialog.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/messages.properties
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/messages_de.properties
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/messages_fr.properties
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/BooleanWithDefaultWidget$1.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/BooleanWithDefaultWidget$2.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/BooleanWithDefaultWidget$BooleanValue.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/BooleanWithDefaultWidget.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/DirectoryBrowserWidget$1.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/DirectoryBrowserWidget$2.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/DirectoryBrowserWidget.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/EntryWidget$1.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/EntryWidget$2.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/EntryWidget$3.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/EntryWidget.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/FileBrowserWidget$1.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/FileBrowserWidget$2.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/FileBrowserWidget.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/LogOperation.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/LogOperationsWidget$1.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/LogOperationsWidget$2.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/LogOperationsWidget$3.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/LogOperationsWidget$4.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/LogOperationsWidget$5.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/LogOperationsWidget$6.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/LogOperationsWidget$7.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/LogOperationsWidget.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/PasswordWidget$1.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/PasswordWidget$2.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/PasswordWidget$3.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/PasswordWidget.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/UnixPermissionsWidget$1.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/classes/org/apache/directory/studio/openldap/common/ui/widgets/UnixPermissionsWidget.class   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/generated-sources/
    directory/studio/trunk/plugins/openldap.common.ui/target/generated-sources/annotations/
    directory/studio/trunk/plugins/openldap.common.ui/target/local-artifacts.properties
    directory/studio/trunk/plugins/openldap.common.ui/target/maven-archiver/
    directory/studio/trunk/plugins/openldap.common.ui/target/maven-archiver/pom.properties
    directory/studio/trunk/plugins/openldap.common.ui/target/maven-shared-archive-resources/
    directory/studio/trunk/plugins/openldap.common.ui/target/maven-shared-archive-resources/META-INF/
    directory/studio/trunk/plugins/openldap.common.ui/target/maven-shared-archive-resources/META-INF/DEPENDENCIES
    directory/studio/trunk/plugins/openldap.common.ui/target/maven-shared-archive-resources/META-INF/LICENSE
    directory/studio/trunk/plugins/openldap.common.ui/target/maven-shared-archive-resources/META-INF/NOTICE
    directory/studio/trunk/plugins/openldap.common.ui/target/org.apache.directory.studio.openldap.common.ui-2.0.0-SNAPSHOT.jar   (with props)
    directory/studio/trunk/plugins/openldap.common.ui/target/p2artifacts.xml
    directory/studio/trunk/plugins/openldap.common.ui/target/p2content.xml
    directory/studio/trunk/plugins/openldap.common.ui/target/test-classes/
    directory/studio/trunk/plugins/openldap.common.ui/target/test-classes/META-INF/
    directory/studio/trunk/plugins/openldap.common.ui/target/test-classes/META-INF/DEPENDENCIES
    directory/studio/trunk/plugins/openldap.common.ui/target/test-classes/META-INF/LICENSE
    directory/studio/trunk/plugins/openldap.common.ui/target/test-classes/META-INF/NOTICE
Modified:
    directory/studio/trunk/plugins/pom-first.xml
    directory/studio/trunk/plugins/pom.xml
    directory/studio/trunk/plugins/valueeditors/pom-first.xml

Added: directory/studio/trunk/plugins/openldap.common.ui/.classpath
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/.classpath?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/.classpath (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/.classpath Tue Mar 24 19:24:44 2015
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+        <classpathentry kind="src" path="src/main/java/"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: directory/studio/trunk/plugins/openldap.common.ui/.project
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/.project?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/.project (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/.project Tue Mar 24 19:24:44 2015
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.apache.directory.studio.openldap.common.ui</name>
+	<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</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>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.core.resources.prefs?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.core.resources.prefs (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.core.resources.prefs Tue Mar 24 19:24:44 2015
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding//src/test/java=UTF-8
+encoding//src/test/resources=UTF-8
+encoding/<project>=UTF-8
+

Added: directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.jdt.core.prefs?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.jdt.core.prefs (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.jdt.core.prefs Tue Mar 24 19:24:44 2015
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning

Added: directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.m2e.core.prefs
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.m2e.core.prefs?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.m2e.core.prefs (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/.settings/org.eclipse.m2e.core.prefs Tue Mar 24 19:24:44 2015
@@ -0,0 +1,5 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
+

Added: directory/studio/trunk/plugins/openldap.common.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/META-INF/MANIFEST.MF?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/META-INF/MANIFEST.MF (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/META-INF/MANIFEST.MF Tue Mar 24 19:24:44 2015
@@ -0,0 +1,51 @@
+Manifest-Version: 1.0
+Bnd-LastModified: 1427224401146
+Build-Jdk: 1.7.0_55
+Built-By: elecharny
+Bundle-Activator: org.apache.directory.studio.openldap.common.ui.OpenLda
+ pCommonUIPlugin
+Bundle-DocURL: http://www.apache.org/
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Name: Apache Directory Studio OpenLDAP Common UI Manifest Generat
+ ion
+Bundle-SymbolicName: org.apache.directory.studio.openldap.common.ui;sing
+ leton:=true
+Bundle-Vendor: The Apache Software Foundation
+Bundle-Version: 2.0.0.qualifier
+Created-By: Apache Maven Bundle Plugin
+Eclipse-LazyStart: true
+Export-Package: org.apache.directory.studio.openldap.common.ui.widgets;v
+ ersion="2.0.0",org.apache.directory.studio.openldap.common.ui.dialogs;v
+ ersion="2.0.0",org.apache.directory.studio.openldap.common.ui;version="
+ 2.0.0"
+Implementation-Title: Apache Directory Studio OpenLDAP Common UI Manifes
+ t Generation
+Implementation-Vendor: The Apache Software Foundation
+Implementation-Vendor-Id: org.apache.directory.studio
+Implementation-Version: 2.0.0.qualifier
+Import-Package: org.apache.directory.studio.openldap.common.ui
+Require-Bundle: org.apache.directory.server.core.api;bundle-version="2.0
+ .0.M20-SNAPSHOT",org.apache.directory.server.ldif.partition;bundle-vers
+ ion="2.0.0.M20-SNAPSHOT",org.apache.directory.server.xdbm.partition;bun
+ dle-version="2.0.0.M20-SNAPSHOT",org.apache.directory.api.asn1.api;bund
+ le-version="1.0.0.M29-SNAPSHOT",org.apache.directory.api.ldap.model;bun
+ dle-version="1.0.0.M29-SNAPSHOT",org.apache.directory.api.ldap.schema;b
+ undle-version="1.0.0.M29-SNAPSHOT",org.apache.directory.api.util;bundle
+ -version="1.0.0.M29-SNAPSHOT",org.apache.directory.studio.common.core,o
+ rg.apache.directory.studio.common.ui,org.apache.directory.studio.connec
+ tion.core,org.apache.directory.studio.connection.ui,org.apache.director
+ y.studio.ldapbrowser.common,org.apache.directory.studio.ldapbrowser.cor
+ e,org.apache.directory.studio.valueeditors,org.apache.directory.studio.
+ common.core,org.apache.directory.studio.common.ui,org.apache.directory.
+ studio.connection.core,org.apache.directory.studio.connection.ui,org.ap
+ ache.directory.studio.ldapbrowser.common,org.apache.directory.studio.ld
+ apbrowser.core,org.apache.directory.studio.valueeditors,org.eclipse.cor
+ e.runtime,org.eclipse.core.resources,org.eclipse.ui,org.eclipse.ui.edit
+ ors,org.eclipse.ui.forms,org.eclipse.ui.ide
+Specification-Title: Apache Directory Studio OpenLDAP Common UI Manifest
+  Generation
+Specification-Vendor: The Apache Software Foundation
+Specification-Version: 2.0.0.qualifier
+Tool: Bnd-2.3.0.201405100607

Added: directory/studio/trunk/plugins/openldap.common.ui/build.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/build.properties?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/build.properties (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/build.properties Tue Mar 24 19:24:44 2015
@@ -0,0 +1,4 @@
+source.. = src/main/java/
+bin.includes = META-INF/,\
+               .,\
+               plugin.properties

Added: directory/studio/trunk/plugins/openldap.common.ui/plugin.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/plugin.properties?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/plugin.properties (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/plugin.properties Tue Mar 24 19:24:44 2015
@@ -0,0 +1,18 @@
+# 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_id=org.apache.directory.studio.openldap.common.ui

Added: directory/studio/trunk/plugins/openldap.common.ui/pom-first.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/pom-first.xml?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/pom-first.xml (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/pom-first.xml Tue Mar 24 19:24:44 2015
@@ -0,0 +1,97 @@
+<?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">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.studio</groupId>
+    <artifactId>parent-plugins</artifactId>
+    <version>2.0.0.qualifier</version>
+    <relativePath>../pom-first.xml</relativePath>
+  </parent>
+
+  <artifactId>org.apache.directory.studio.openldap.common.ui</artifactId>
+  <name>Apache Directory Studio OpenLDAP Common UI Manifest Generation</name>
+  <description/>
+  <packaging>bundle</packaging>
+
+  <build>
+     <!-- MANIFEST.MF Generation -->
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+          <manifestLocation>META-INF</manifestLocation>
+          <instructions>
+            <Bundle-SymbolicName>${project.artifactId};singleton:=true</Bundle-SymbolicName>
+            <Bundle-Localization>plugin</Bundle-Localization>
+            <Eclipse-LazyStart>true</Eclipse-LazyStart>
+            <Bundle-Activator>org.apache.directory.studio.openldap.common.ui.OpenLdapCommonUIPlugin</Bundle-Activator>
+            
+            <Export-Package>org.apache.directory.studio.openldap.common.ui,
+ org.apache.directory.studio.openldap.common.ui.dialogs,
+ org.apache.directory.studio.openldap.common.ui.widgets</Export-Package>
+ 
+            <Require-Bundle>org.apache.directory.server.core.api;bundle-version="${org.apache.directory.server.bundleversion}",
+ org.apache.directory.server.ldif.partition;bundle-version="${org.apache.directory.server.bundleversion}",
+ org.apache.directory.server.xdbm.partition;bundle-version="${org.apache.directory.server.bundleversion}",
+ org.apache.directory.api.asn1.api;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.model;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.ldap.schema;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.api.util;bundle-version="${org.apache.directory.api.bundleversion}",
+ org.apache.directory.studio.common.core,
+ org.apache.directory.studio.common.ui,
+ org.apache.directory.studio.connection.core,
+ org.apache.directory.studio.connection.ui,
+ org.apache.directory.studio.ldapbrowser.common,
+ org.apache.directory.studio.ldapbrowser.core,
+ org.apache.directory.studio.valueeditors,
+ org.apache.directory.studio.common.core,
+ org.apache.directory.studio.common.ui,
+ org.apache.directory.studio.connection.core,
+ org.apache.directory.studio.connection.ui,
+ org.apache.directory.studio.ldapbrowser.common,
+ org.apache.directory.studio.ldapbrowser.core,
+ org.apache.directory.studio.valueeditors,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.ui,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.forms,
+ org.eclipse.ui.ide</Require-Bundle>
+          </instructions>
+        </configuration>
+        <executions>
+          <execution>
+            <id>generate-manifest</id>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>manifest</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
+

Added: directory/studio/trunk/plugins/openldap.common.ui/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/pom.xml?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/pom.xml (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/pom.xml Tue Mar 24 19:24:44 2015
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.studio</groupId>
+    <artifactId>parent-plugins</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+    <relativePath>../</relativePath>
+  </parent>
+
+  <artifactId>org.apache.directory.studio.openldap.common.ui</artifactId>
+  <name>Apache Directory Studio OpenLDAP Common UI</name>
+  <packaging>eclipse-plugin</packaging>
+  <description />
+</project>
\ No newline at end of file

Added: directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/Messages.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/Messages.java?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/Messages.java (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/Messages.java Tue Mar 24 19:24:44 2015
@@ -0,0 +1,54 @@
+/*
+ *  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.openldap.common.ui;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+/**
+ * The messages handling
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class Messages
+{
+    private static final ResourceBundle RESOURCE_BUNDLE = 
+        ResourceBundle.getBundle( Messages.class.getPackage().getName() + ".messages" );
+
+
+    private Messages()
+    {
+    }
+
+
+    public static String getString( String key )
+    {
+        try
+        {
+            return RESOURCE_BUNDLE.getString( key );
+        }
+        catch ( MissingResourceException e )
+        {
+            return '!' + key + '!';
+        }
+    }
+}

Added: directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/OpenLdapCommonUiConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/OpenLdapCommonUiConstants.java?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/OpenLdapCommonUiConstants.java (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/OpenLdapCommonUiConstants.java Tue Mar 24 19:24:44 2015
@@ -0,0 +1,45 @@
+/*
+ *  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.openldap.common.ui;
+
+
+/**
+ * Contains constants for the value editors.
+ * Final reference -> class shouldn't be extended
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public final class OpenLdapCommonUiConstants
+{
+    /**
+     *  Ensures no construction of this class, also ensures there is no need for final keyword above
+     *  (Implicit super constructor is not visible for default constructor),
+     *  but is still self documenting.
+     */
+    private OpenLdapCommonUiConstants()
+    {
+    }
+
+    /** The plug-in ID */
+    public static final String PLUGIN_ID = OpenLdapCommonUiPlugin.getDefault().getPluginProperties()
+        .getString( "Plugin_id" ); //$NON-NLS-1$
+
+    public static final String DIALOGSETTING_KEY_DIRECTORY_HISTORY = "directoryHistory"; //$NON-NLS-1$
+}

Added: directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/OpenLdapCommonUiPlugin.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/OpenLdapCommonUiPlugin.java?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/OpenLdapCommonUiPlugin.java (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/OpenLdapCommonUiPlugin.java Tue Mar 24 19:24:44 2015
@@ -0,0 +1,174 @@
+/*
+ *  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.openldap.common.ui;
+
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.PropertyResourceBundle;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+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
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class OpenLdapCommonUiPlugin extends AbstractUIPlugin
+{
+    /** The shared instance */
+    private static OpenLdapCommonUiPlugin plugin;
+
+    /** The plugin properties */
+    private PropertyResourceBundle properties;
+
+
+    /**
+     * The constructor
+     */
+    public OpenLdapCommonUiPlugin()
+    {
+        plugin = this;
+    }
+
+
+    /**
+     * {@inheritDoc} 
+     */
+    public void start( BundleContext context ) throws Exception
+    {
+        super.start( context );
+    }
+
+
+    /**
+     * {@inheritDoc} 
+     */
+    public void stop( BundleContext context ) throws Exception
+    {
+        plugin = null;
+        super.stop( context );
+    }
+
+
+    /**
+     * Returns the shared instance
+     *
+     * @return the shared instance
+     */
+    public static OpenLdapCommonUiPlugin getDefault()
+    {
+        return plugin;
+    }
+
+
+    /**
+     * Use this method to get SWT images. Use the IMG_ constants from
+     * ValueEditorConstants 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
+     * ValueEditorConstants 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 on filesystem)
+     * @return The SWT Image or null
+     * @see OpenLdapCommonUiConstants
+     */
+    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 plugin properties.
+     *
+     * @return the plugin properties
+     */
+    public PropertyResourceBundle getPluginProperties()
+    {
+        if ( properties == null )
+        {
+            try
+            {
+                properties = new PropertyResourceBundle( FileLocator.openStream( getBundle(), new Path(
+                    "plugin.properties" ), false ) ); //$NON-NLS-1$
+            }
+            catch ( IOException e )
+            {
+                // We can't use the PLUGIN_ID constant since loading the plugin.properties file has failed,
+                // So we're using a default plugin id.
+                getLog().log( new Status( Status.ERROR, "org.apache.directory.studio.openldap.common.ui", Status.OK, //$NON-NLS-1$
+                    Messages.getString( "OpenLdapCommonUiPlugin.UnableGetPluginProperties" ), e ) ); //$NON-NLS-1$
+            }
+        }
+
+        return properties;
+    }
+}

Added: directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/AttributeDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/AttributeDialog.java?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/AttributeDialog.java (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/AttributeDialog.java Tue Mar 24 19:24:44 2015
@@ -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.openldap.common.ui.dialogs;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.directory.api.ldap.model.schema.AttributeType;
+import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * The AttributeDialog is used to enter/select an attribute type.
+ */
+public class AttributeDialog extends Dialog
+{
+    /** The possible attribute types */
+    private String[] attributeTypes;
+
+    /** The return attribute */
+    private String returnAttribute;
+
+    // UI widgets
+    private Button okButton;
+    private Combo combo;
+
+
+    /**
+     * Creates a new instance of AttributeDialog.
+     * 
+     * @param parentShell the parent shell
+     * @param connection the connection
+     */
+    public AttributeDialog( Shell parentShell, IBrowserConnection browserConnection )
+    {
+        super( parentShell );
+        init( browserConnection, null );
+    }
+
+
+    /**
+     * Creates a new instance of AttributeDialog.
+     * 
+     * @param parentShell the parent shell
+     * @param connection the connection
+     * @param attribute the attribute
+     */
+    public AttributeDialog( Shell parentShell, IBrowserConnection browserConnection, String attribute )
+    {
+        super( parentShell );
+        init( browserConnection, attribute );
+    }
+
+
+    /**
+     * Initializes the object.
+     * 
+     * @param connection the connection
+     * @param attribute the attribute
+     */
+    private void init( IBrowserConnection browserConnection, String attribute )
+    {
+        List<String> attributeTypes = new ArrayList<String>();
+
+        if ( browserConnection != null )
+        {
+            Collection<AttributeType> atds = browserConnection.getSchema().getAttributeTypeDescriptions();
+
+            for ( AttributeType atd : atds )
+            {
+                for ( String name : atd.getNames() )
+                {
+                    attributeTypes.add( name );
+                }
+            }
+
+            Collections.sort( attributeTypes );
+        }
+
+        this.attributeTypes = attributeTypes.toArray( new String[attributeTypes.size()] );
+        returnAttribute = attribute;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void configureShell( Shell newShell )
+    {
+        super.configureShell( newShell );
+        newShell.setText( "Select Attribute Type" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void createButtonsForButtonBar( Composite parent )
+    {
+        okButton = createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true );
+        createButton( parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false );
+
+        validate();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void okPressed()
+    {
+        returnAttribute = combo.getText();
+        super.okPressed();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Control createDialogArea( Composite parent )
+    {
+        Composite composite = ( Composite ) super.createDialogArea( parent );
+
+        Composite c = BaseWidgetUtils.createColumnContainer( composite, 2, 1 );
+        BaseWidgetUtils.createLabel( c, "Attribute Type:", 1 );
+        combo = BaseWidgetUtils.createCombo( c, attributeTypes, -1, 1 );
+
+        if ( returnAttribute != null )
+        {
+            combo.setText( returnAttribute );
+        }
+        
+        combo.addModifyListener( new ModifyListener()
+        {
+            public void modifyText( ModifyEvent e )
+            {
+                validate();
+            }
+        } );
+
+        return composite;
+    }
+
+
+    /**
+     * Validates the dialog.
+     */
+    private void validate()
+    {
+        okButton.setEnabled( !"".equals( combo.getText() ) ); //$NON-NLS-1$
+    }
+
+
+    /**
+     * Gets the entered/selected attribute.
+     * 
+     * @return the attribute
+     */
+    public String getAttribute()
+    {
+        return returnAttribute;
+    }
+}

Added: directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/PasswordDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/PasswordDialog.java?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/PasswordDialog.java (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/PasswordDialog.java Tue Mar 24 19:24:44 2015
@@ -0,0 +1,527 @@
+/*
+/*
+ *  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.openldap.common.ui.dialogs;
+
+
+import org.apache.directory.api.ldap.model.constants.LdapSecurityConstants;
+import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
+import org.apache.directory.studio.ldapbrowser.core.model.Password;
+import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
+import org.apache.directory.studio.valueeditors.ValueEditorsActivator;
+import org.apache.directory.studio.valueeditors.ValueEditorsConstants;
+import org.apache.directory.studio.valueeditors.password.Messages;
+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.ISelectionChangedListener;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+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.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.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * The PasswordDialog is used from the password value editor to view the current password
+ * and to enter a new password.
+ */
+public class PasswordDialog extends Dialog
+{
+    /** The constant for no hash method */
+    private static final String NO_HASH_METHOD = "NO-HASH-METHOD";
+
+    /** The supported hash methods */
+    private static final Object[] HASH_METHODS =
+        {
+            LdapSecurityConstants.HASH_METHOD_SHA,
+            LdapSecurityConstants.HASH_METHOD_SHA256,
+            LdapSecurityConstants.HASH_METHOD_SHA384,
+            LdapSecurityConstants.HASH_METHOD_SHA512,
+            LdapSecurityConstants.HASH_METHOD_SSHA,
+            LdapSecurityConstants.HASH_METHOD_SSHA256,
+            LdapSecurityConstants.HASH_METHOD_SSHA384,
+            LdapSecurityConstants.HASH_METHOD_SSHA512,
+            LdapSecurityConstants.HASH_METHOD_MD5,
+            LdapSecurityConstants.HASH_METHOD_SMD5,
+            LdapSecurityConstants.HASH_METHOD_CRYPT,
+            NO_HASH_METHOD };
+
+    /** The current password */
+    private Password currentPassword;
+
+    /** The new password */
+    private Password newPassword;
+
+    /** The return password*/
+    private byte[] returnPassword;
+
+    // UI Widgets
+    private Button okButton;
+    private Group currentPasswordGroup;
+    private Text currentPasswordText;
+    private Text currentPasswordHashMethodText;
+    private Text currentPasswordValueHexText;
+    private Text currentPasswordSaltHexText;
+    private Button showCurrentPasswordDetailsButton;
+    private Group newPasswordGroup;
+    private Text newPasswordText;
+    private ComboViewer newPasswordHashMethodComboViewer;
+    private Text newPasswordPreviewText;
+    private Button newSaltButton;
+    private Text newPasswordPreviewValueHexText;
+    private Text newPasswordPreviewSaltHexText;
+    private Button showNewPasswordDetailsButton;
+
+
+    /**
+     * Creates a new instance of PasswordDialog.
+     * 
+     * @param parentShell the parent shell
+     * @param currentPassword the current password, null if none
+     * @param entry the entry used to bind 
+     */
+    public PasswordDialog( Shell parentShell, byte[] currentPassword )
+    {
+        super( parentShell );
+        super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+
+        if ( currentPassword != null )
+        {
+            this.currentPassword = new Password( currentPassword );
+        }
+    }
+
+
+    /**
+     * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+     */
+    protected void configureShell( Shell shell )
+    {
+        super.configureShell( shell );
+        shell.setText( Messages.getString( "PasswordDialog.PasswordEditor" ) ); //$NON-NLS-1$
+        shell.setImage( ValueEditorsActivator.getDefault().getImage( ValueEditorsConstants.IMG_PASSWORDEDITOR ) );
+    }
+
+
+    /**
+     * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+     */
+    protected void okPressed()
+    {
+        // create password
+        if ( newPassword != null )
+        {
+            returnPassword = newPassword.toBytes();
+        }
+        else
+        {
+            returnPassword = null;
+        }
+
+        super.okPressed();
+    }
+
+
+    /**
+     * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
+     */
+    protected void createButtonsForButtonBar( Composite parent )
+    {
+        okButton = createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false );
+        createButton( parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false );
+
+        if ( hasCurrentPassword() )
+        {
+            updateCurrentPasswordGroup();
+        }
+
+        updateNewPasswordGroup();
+    }
+
+
+    /**
+     * @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( SWT.FILL, SWT.FILL, true, true );
+        gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
+        //        gd.heightHint = convertVerticalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );// * 2 / 3;
+        composite.setLayoutData( gd );
+
+        if ( hasCurrentPassword() )
+        {
+            createCurrentPasswordGroup( composite );
+        }
+
+        createNewPasswordGroup( composite );
+
+        addListeners();
+
+        applyDialogFont( composite );
+        return composite;
+    }
+
+
+    /**
+     * Creates the current password group.
+     *
+     * @param parent the parent composite
+     */
+    private void createCurrentPasswordGroup( Composite parent )
+    {
+        currentPasswordGroup = BaseWidgetUtils.createGroup( parent, "Current Password", 1 );
+        currentPasswordGroup.setLayout( new GridLayout( 2, false ) );
+        currentPasswordGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+        // Current password text
+        BaseWidgetUtils.createLabel( currentPasswordGroup, Messages
+            .getString( "PasswordDialog.CurrentPassword" ) + ":", 1 ); //$NON-NLS-1$//$NON-NLS-2$
+        currentPasswordText = BaseWidgetUtils.createReadonlyText( currentPasswordGroup, "", 1 ); //$NON-NLS-1$
+
+        // Current password details composite
+        new Label( currentPasswordGroup, SWT.NONE );
+        Composite currentPasswordDetailsComposite = BaseWidgetUtils.createColumnContainer( currentPasswordGroup,
+            2, 1 );
+
+        // Current password hash method label
+        BaseWidgetUtils.createLabel( currentPasswordDetailsComposite,
+            Messages.getString( "PasswordDialog.HashMethod" ), 1 ); //$NON-NLS-1$
+        currentPasswordHashMethodText = BaseWidgetUtils.createLabeledText( currentPasswordDetailsComposite, "", 1 ); //$NON-NLS-1$
+
+        // Current password hex label
+        BaseWidgetUtils.createLabel( currentPasswordDetailsComposite, Messages
+            .getString( "PasswordDialog.PasswordHex" ), 1 ); //$NON-NLS-1$
+        currentPasswordValueHexText = BaseWidgetUtils.createLabeledText( currentPasswordDetailsComposite, "", 1 ); //$NON-NLS-1$
+
+        // Current password salt hex label
+        BaseWidgetUtils.createLabel( currentPasswordDetailsComposite,
+            Messages.getString( "PasswordDialog.SaltHex" ), 1 ); //$NON-NLS-1$
+        currentPasswordSaltHexText = BaseWidgetUtils.createLabeledText( currentPasswordDetailsComposite, "", 1 ); //$NON-NLS-1$
+
+        // Show current password details button
+        showCurrentPasswordDetailsButton = BaseWidgetUtils.createCheckbox( currentPasswordDetailsComposite, Messages
+            .getString( "PasswordDialog.ShowCurrentPasswordDetails" ), 2 ); //$NON-NLS-1$
+    }
+
+
+    /**
+     * Creates the new password group.
+     *
+     * @param parent the parent composite
+     */
+    private void createNewPasswordGroup( Composite parent )
+    {
+        newPasswordGroup = BaseWidgetUtils.createGroup( parent, "New Password", 1 );
+        newPasswordGroup.setLayout( new GridLayout( 2, false ) );
+        newPasswordGroup.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+        // New password text
+        BaseWidgetUtils.createLabel( newPasswordGroup, Messages.getString( "PasswordDialog.EnterNewPassword" ), 1 ); //$NON-NLS-1$
+        newPasswordText = BaseWidgetUtils.createText( newPasswordGroup, "", 1 ); //$NON-NLS-1$
+
+        // New password hashing method combo
+        BaseWidgetUtils.createLabel( newPasswordGroup, Messages.getString( "PasswordDialog.SelectHashMethod" ), 1 ); //$NON-NLS-1$
+        newPasswordHashMethodComboViewer = new ComboViewer( newPasswordGroup );
+        newPasswordHashMethodComboViewer.setContentProvider( new ArrayContentProvider() );
+        newPasswordHashMethodComboViewer.setLabelProvider( new LabelProvider()
+        {
+            public String getText( Object element )
+            {
+                String hashMethod = getHashMethodName( element );
+
+                if ( !"".equals( hashMethod ) )
+                {
+                    return hashMethod;
+                }
+
+                return super.getText( element );
+            }
+        } );
+        
+        newPasswordHashMethodComboViewer.setInput( HASH_METHODS );
+        newPasswordHashMethodComboViewer.setSelection( new StructuredSelection( NO_HASH_METHOD ) );
+        newPasswordHashMethodComboViewer.getControl().setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );
+
+        // New password preview text
+        BaseWidgetUtils.createLabel( newPasswordGroup, Messages.getString( "PasswordDialog.PasswordPreview" ), 1 ); //$NON-NLS-1$
+        newPasswordPreviewText = BaseWidgetUtils.createReadonlyText( newPasswordGroup, "", 1 ); //$NON-NLS-1$
+
+        // New salt button
+        newSaltButton = BaseWidgetUtils.createButton( newPasswordGroup, Messages
+            .getString( "PasswordDialog.NewSalt" ), 1 ); //$NON-NLS-1$
+        newSaltButton.setLayoutData( new GridData() );
+        newSaltButton.setEnabled( false );
+
+        // New password preview details composite
+        Composite newPasswordPreviewDetailsComposite = BaseWidgetUtils.createColumnContainer( newPasswordGroup, 2,
+            1 );
+
+        // New password preview hex label
+        BaseWidgetUtils.createLabel( newPasswordPreviewDetailsComposite,
+            Messages.getString( "PasswordDialog.PasswordHex" ), 1 ); //$NON-NLS-1$
+        newPasswordPreviewValueHexText = BaseWidgetUtils.createLabeledText( newPasswordPreviewDetailsComposite, ":", 1 ); //$NON-NLS-1$
+
+        // New password preview salt hex label
+        BaseWidgetUtils.createLabel( newPasswordPreviewDetailsComposite,
+            Messages.getString( "PasswordDialog.SaltHex" ), 1 ); //$NON-NLS-1$
+        newPasswordPreviewSaltHexText = BaseWidgetUtils.createLabeledText( newPasswordPreviewDetailsComposite, "", 1 ); //$NON-NLS-1$
+
+        // Show new password details button
+        showNewPasswordDetailsButton = BaseWidgetUtils.createCheckbox( newPasswordPreviewDetailsComposite, Messages
+            .getString( "PasswordDialog.ShowNewPasswordDetails" ), 2 ); //$NON-NLS-1$
+    }
+
+
+    /**
+     * Updates the current password tab.
+     */
+    private void updateCurrentPasswordGroup()
+    {
+        // set current password to the UI widgets
+        if ( currentPassword != null )
+        {
+            currentPasswordHashMethodText.setText( getCurrentPasswordHashMethodName() );
+            currentPasswordValueHexText.setText( Utils
+                .getNonNullString( currentPassword.getHashedPasswordAsHexString() ) );
+            currentPasswordSaltHexText.setText( Utils.getNonNullString( currentPassword.getSaltAsHexString() ) );
+            currentPasswordText.setText( currentPassword.toString() );
+        }
+
+        // show password details?
+        if ( showCurrentPasswordDetailsButton.getSelection() )
+        {
+            currentPasswordText.setEchoChar( '\0' );
+            currentPasswordValueHexText.setEchoChar( '\0' );
+            currentPasswordSaltHexText.setEchoChar( '\0' );
+        }
+        else
+        {
+            currentPasswordText.setEchoChar( '\u2022' );
+            currentPasswordValueHexText.setEchoChar( '\u2022' );
+            currentPasswordSaltHexText.setEchoChar( currentPasswordSaltHexText.getText().equals(
+                Utils.getNonNullString( null ) ) ? '\0' : '\u2022' );
+        }
+    }
+
+
+    /**
+     * Updates the new password tab.
+     */
+    private void updateNewPasswordGroup()
+    {
+        // set new password to the UI widgets
+        newPassword = new Password( getSelectedNewPasswordHashMethod(), newPasswordText.getText() );
+        if ( !"".equals( newPasswordText.getText() ) || newPassword.getHashMethod() == null ) //$NON-NLS-1$
+        {
+            newPasswordPreviewValueHexText
+                .setText( Utils.getNonNullString( newPassword.getHashedPasswordAsHexString() ) );
+            newPasswordPreviewSaltHexText.setText( Utils.getNonNullString( newPassword.getSaltAsHexString() ) );
+            newPasswordPreviewText.setText( newPassword.toString() );
+            newSaltButton.setEnabled( newPassword.getSalt() != null );
+            okButton.setEnabled( true );
+            getShell().setDefaultButton( okButton );
+        }
+        else
+        {
+            newPassword = null;
+            newPasswordPreviewValueHexText.setText( Utils.getNonNullString( null ) );
+            newPasswordPreviewSaltHexText.setText( Utils.getNonNullString( null ) );
+            newPasswordPreviewText.setText( Utils.getNonNullString( null ) );
+            newSaltButton.setEnabled( false );
+            okButton.setEnabled( false );
+        }
+
+        // show password details?
+        if ( showNewPasswordDetailsButton.getSelection() )
+        {
+            newPasswordText.setEchoChar( '\0' );
+            newPasswordPreviewText.setEchoChar( '\0' );
+            newPasswordPreviewValueHexText.setEchoChar( '\0' );
+            newPasswordPreviewSaltHexText.setEchoChar( '\0' );
+        }
+        else
+        {
+            newPasswordText.setEchoChar( '\u2022' );
+            newPasswordPreviewText.setEchoChar( newPasswordPreviewText.getText()
+                .equals( Utils.getNonNullString( null ) ) ? '\0' : '\u2022' );
+            newPasswordPreviewValueHexText.setEchoChar( newPasswordPreviewValueHexText.getText().equals(
+                Utils.getNonNullString( null ) ) ? '\0' : '\u2022' );
+            newPasswordPreviewSaltHexText.setEchoChar( newPasswordPreviewSaltHexText.getText().equals(
+                Utils.getNonNullString( null ) ) ? '\0' : '\u2022' );
+        }
+    }
+
+
+    /**
+     * Adds the listeners.
+     */
+    private void addListeners()
+    {
+        if ( hasCurrentPassword() )
+        {
+            showCurrentPasswordDetailsButton.addSelectionListener( new SelectionAdapter()
+            {
+                public void widgetSelected( SelectionEvent arg0 )
+                {
+                    updateCurrentPasswordGroup();
+                }
+            } );
+        }
+
+        newPasswordText.addModifyListener( new ModifyListener()
+        {
+            public void modifyText( ModifyEvent e )
+            {
+                updateNewPasswordGroup();
+            }
+        } );
+
+        newPasswordHashMethodComboViewer.addSelectionChangedListener( new ISelectionChangedListener()
+        {
+            public void selectionChanged( SelectionChangedEvent event )
+            {
+                updateNewPasswordGroup();
+            }
+        } );
+
+        newSaltButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent event )
+            {
+                updateNewPasswordGroup();
+            }
+        } );
+
+        showNewPasswordDetailsButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent arg0 )
+            {
+                updateNewPasswordGroup();
+            }
+        } );
+    }
+
+
+    /**
+     * Indicates if the dialog has a current password.
+     *
+     * @return <code>true</code> if the dialog has a current password,
+     *         <code>false</code> if not.
+     */
+    private boolean hasCurrentPassword()
+    {
+        return ( ( currentPassword != null ) && ( currentPassword.toBytes().length > 0 ) );
+    }
+
+
+    /**
+     * Gets the selected new password hash method.
+     *
+     * @return the selected new password hash method
+     */
+    private LdapSecurityConstants getSelectedNewPasswordHashMethod()
+    {
+        StructuredSelection selection = ( StructuredSelection ) newPasswordHashMethodComboViewer.getSelection();
+
+        if ( !selection.isEmpty() )
+        {
+            Object selectedObject = selection.getFirstElement();
+
+            if ( selectedObject instanceof LdapSecurityConstants )
+            {
+                return ( LdapSecurityConstants ) selectedObject;
+            }
+        }
+
+        return null;
+    }
+
+
+    /**
+     * Gets the name of the hash method.
+     *
+     * @param o the hash method object
+     * @return the name of the hash method
+     */
+    private String getHashMethodName( Object o )
+    {
+        if ( o instanceof LdapSecurityConstants )
+        {
+            LdapSecurityConstants hashMethod = ( LdapSecurityConstants ) o;
+
+            return hashMethod.getName();
+        }
+        else if ( ( o instanceof String ) && NO_HASH_METHOD.equals( o ) )
+        {
+            return BrowserCoreMessages.model__no_hash;
+        }
+
+        return null;
+    }
+
+
+    /**
+     * Gets the current password hash method name.
+     *
+     * @return the current password hash method name
+     */
+    private String getCurrentPasswordHashMethodName()
+    {
+        LdapSecurityConstants hashMethod = currentPassword.getHashMethod();
+
+        if ( hashMethod != null )
+        {
+            return Utils.getNonNullString( getHashMethodName( hashMethod ) );
+        }
+        else
+        {
+            return Utils.getNonNullString( getHashMethodName( NO_HASH_METHOD ) );
+        }
+    }
+
+
+    /**
+     * Gets the new password.
+     * 
+     * @return the password, either encrypted by the selected
+     *         algorithm or as plain text.
+     */
+    public byte[] getNewPassword()
+    {
+        return returnPassword;
+    }
+}

Added: directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/UnixPermissions.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/UnixPermissions.java?rev=1668963&view=auto
==============================================================================
--- directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/UnixPermissions.java (added)
+++ directory/studio/trunk/plugins/openldap.common.ui/src/main/java/org/apache/directory/studio/openldap/common/ui/dialogs/UnixPermissions.java Tue Mar 24 19:24:44 2015
@@ -0,0 +1,654 @@
+/*
+ *  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.openldap.common.ui.dialogs;
+
+
+import java.text.ParseException;
+import java.util.regex.Pattern;
+
+
+/**
+ * The class defines an Unix Permissions.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class UnixPermissions
+{
+    /** The pattern used to match a symbolic value (e.g. "-rw-------") */
+    private static final Pattern SYMBOLIC_FORMAT_PATTERN = Pattern.compile(
+        "^-(-|r)(-|w)(-|x)(-|r)(-|w)(-|x)(-|r)(-|w)(-|x)$", Pattern.CASE_INSENSITIVE );
+
+    private boolean ownerRead;
+    private boolean ownerWrite;
+    private boolean ownerExecute;
+    private boolean groupRead;
+    private boolean groupWrite;
+    private boolean groupExecute;
+    private boolean othersRead;
+    private boolean othersWrite;
+    private boolean othersExecute;
+
+
+    /**
+     * Creates a new instance of UnixPermissions.
+     *
+     */
+    public UnixPermissions()
+    {
+    }
+
+
+    /**
+     * Creates a new instance of UnixPermissions.
+     *
+     * @param s the string
+     * @throws ParseException if an error occurs during the parsing of the string
+     */
+    public UnixPermissions( String s ) throws ParseException
+    {
+        if ( ( s != null ) && ( !s.isEmpty() ) )
+        {
+            // First let's trim the value
+            String trimmed = s.trim();
+            int integerValue = -1;
+
+            try
+            {
+                integerValue = Integer.parseInt( trimmed );
+            }
+            catch ( NumberFormatException e )
+            {
+                // Silent, integerValue will be -1.
+            }
+
+            // Is it an octal value?
+            if ( trimmed.startsWith( "0" ) )
+            {
+                if ( trimmed.length() == 4 )
+                {
+                    readOwnerOctalValue( trimmed.charAt( 1 ) );
+                    readGroupOctalValue( trimmed.charAt( 2 ) );
+                    readOthersOctalValue( trimmed.charAt( 3 ) );
+                }
+                else
+                {
+                    throw new ParseException( "Unable to recognize the format for this Unix Permissions String '" + s
+                        + "'.", 0 );
+                }
+            }
+            // Is it a decimal value?
+            else if ( integerValue != -1 )
+            {
+                String octal = Integer.toOctalString( integerValue );
+
+                if ( octal.length() == 1 )
+                {
+                    octal = "00" + octal;
+                }
+                else if ( octal.length() == 2 )
+                {
+                    octal = "0" + octal;
+                }
+
+                readOwnerOctalValue( octal.charAt( 0 ) );
+                readGroupOctalValue( octal.charAt( 1 ) );
+                readOthersOctalValue( octal.charAt( 2 ) );
+            }
+            // Is it a symbolic value?
+            else if ( SYMBOLIC_FORMAT_PATTERN.matcher( trimmed ).matches() )
+            {
+                readOwnerSymbolicValue( trimmed.substring( 1, 4 ) );
+                readGroupSymbolicValue( trimmed.substring( 4, 7 ) );
+                readOthersSymbolicValue( trimmed.substring( 7, 10 ) );
+            }
+            else
+            {
+                throw new ParseException( "Unable to recognize the format for this Unix Permissions String '" + s
+                    + "'.", 0 );
+            }
+        }
+    }
+
+
+    /**
+     * Reads the owner octal value.
+     *
+     * @param ownerValue the owner value
+     */
+    private void readOwnerOctalValue( char ownerValue )
+    {
+        if ( ownerValue == '1' )
+        {
+            ownerExecute = true;
+        }
+        else if ( ownerValue == '2' )
+        {
+            ownerWrite = true;
+        }
+        else if ( ownerValue == '3' )
+        {
+            ownerExecute = true;
+            ownerWrite = true;
+        }
+        else if ( ownerValue == '4' )
+        {
+            ownerRead = true;
+        }
+        else if ( ownerValue == '5' )
+        {
+            ownerExecute = true;
+            ownerRead = true;
+        }
+        else if ( ownerValue == '6' )
+        {
+            ownerWrite = true;
+            ownerRead = true;
+        }
+        else if ( ownerValue == '7' )
+        {
+            ownerExecute = true;
+            ownerWrite = true;
+            ownerRead = true;
+        }
+    }
+
+
+    /**
+     * Reads the group octal value.
+     *
+     * @param groupValue the group value
+     */
+    private void readGroupOctalValue( char groupValue )
+    {
+        if ( groupValue == '1' )
+        {
+            groupExecute = true;
+        }
+        else if ( groupValue == '2' )
+        {
+            groupWrite = true;
+        }
+        else if ( groupValue == '3' )
+        {
+            groupExecute = true;
+            groupWrite = true;
+        }
+        else if ( groupValue == '4' )
+        {
+            groupRead = true;
+        }
+        else if ( groupValue == '5' )
+        {
+            groupExecute = true;
+            groupRead = true;
+        }
+        else if ( groupValue == '6' )
+        {
+            groupWrite = true;
+            groupRead = true;
+        }
+        else if ( groupValue == '7' )
+        {
+            groupExecute = true;
+            groupWrite = true;
+            groupRead = true;
+        }
+    }
+
+
+    /**
+     * Reads the others octal value.
+     *
+     * @param othersValue the others value
+     */
+    private void readOthersOctalValue( char othersValue )
+    {
+        if ( othersValue == '1' )
+        {
+            othersExecute = true;
+        }
+        else if ( othersValue == '2' )
+        {
+            othersWrite = true;
+        }
+        else if ( othersValue == '3' )
+        {
+            othersExecute = true;
+            othersWrite = true;
+        }
+        else if ( othersValue == '4' )
+        {
+            othersRead = true;
+        }
+        else if ( othersValue == '5' )
+        {
+            othersExecute = true;
+            othersRead = true;
+        }
+        else if ( othersValue == '6' )
+        {
+            othersWrite = true;
+            othersRead = true;
+        }
+        else if ( othersValue == '7' )
+        {
+            othersExecute = true;
+            othersWrite = true;
+            othersRead = true;
+        }
+    }
+
+
+    /**
+     * Reads the owner symbolic value.
+     *
+     * @param ownerValue the owner value
+     */
+    private void readOwnerSymbolicValue( String ownerValue )
+    {
+        if ( ownerValue.length() == 3 )
+        {
+            // Read
+            if ( ownerValue.charAt( 0 ) == 'r' )
+            {
+                ownerRead = true;
+            }
+
+            // Write
+            if ( ownerValue.charAt( 1 ) == 'w' )
+            {
+                ownerWrite = true;
+            }
+
+            // Execute
+            if ( ownerValue.charAt( 2 ) == 'x' )
+            {
+                ownerExecute = true;
+            }
+        }
+    }
+
+
+    /**
+     * Reads the group symbolic value.
+     *
+     * @param groupValue the group value
+     */
+    private void readGroupSymbolicValue( String groupValue )
+    {
+        if ( groupValue.length() == 3 )
+        {
+            // Read
+            if ( groupValue.charAt( 0 ) == 'r' )
+            {
+                groupRead = true;
+            }
+
+            // Write
+            if ( groupValue.charAt( 1 ) == 'w' )
+            {
+                groupWrite = true;
+            }
+
+            // Execute
+            if ( groupValue.charAt( 2 ) == 'x' )
+            {
+                groupExecute = true;
+            }
+        }
+    }
+
+
+    /**
+     * Reads the others symbolic value.
+     *
+     * @param othersValue the others value
+     */
+    private void readOthersSymbolicValue( String othersValue )
+    {
+        if ( othersValue.length() == 3 )
+        {
+            // Read
+            if ( othersValue.charAt( 0 ) == 'r' )
+            {
+                othersRead = true;
+            }
+
+            // Write
+            if ( othersValue.charAt( 1 ) == 'w' )
+            {
+                othersWrite = true;
+            }
+
+            // Execute
+            if ( othersValue.charAt( 2 ) == 'x' )
+            {
+                othersExecute = true;
+            }
+        }
+    }
+
+
+    /**
+     * Gets the integer value.
+     *
+     * @return the integer value
+     */
+    public Integer getDecimalValue()
+    {
+        return Integer.parseInt( getOctalValue(), 8 );
+    }
+
+
+    /**
+     * Gets the octal value.
+     * 
+     * @return the octal value
+     */
+    public String getOctalValue()
+    {
+        int value = 0;
+
+        // Owner Read
+        if ( ownerRead )
+        {
+            value = value + 400;
+        }
+
+        // Owner Write
+        if ( ownerWrite )
+        {
+            value = value + 200;
+        }
+
+        // Owner Execute
+        if ( ownerExecute )
+        {
+            value = value + 100;
+        }
+
+        // Group Read
+        if ( groupRead )
+        {
+            value = value + 40;
+        }
+
+        // Group Write
+        if ( groupWrite )
+        {
+            value = value + 20;
+        }
+
+        // Group Execute
+        if ( groupExecute )
+        {
+            value = value + 10;
+        }
+
+        // Others Read
+        if ( othersRead )
+        {
+            value = value + 4;
+        }
+
+        // Others Write
+        if ( othersWrite )
+        {
+            value = value + 2;
+        }
+
+        // Others Execute
+        if ( othersExecute )
+        {
+            value = value + 1;
+        }
+
+        // Adding zeros before returning the value
+        if ( value < 10 )
+        {
+            return "000" + value;
+        }
+        else if ( value < 100 )
+        {
+            return "00" + value;
+        }
+        else if ( value < 1000 )
+        {
+            return "0" + value;
+        }
+        else
+        {
+            return "" + value;
+        }
+    }
+
+
+    /**
+     * Gets the symbolic value (no type included).
+     * 
+     * @return the symbolic value
+     */
+    public String getSymbolicValue()
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( '-' );
+
+        // Owner Read
+        if ( ownerRead )
+        {
+            sb.append( 'r' );
+        }
+        else
+        {
+            sb.append( '-' );
+        }
+
+        // Owner Write
+        if ( ownerWrite )
+        {
+            sb.append( 'w' );
+        }
+        else
+        {
+            sb.append( '-' );
+        }
+
+        // Owner Execute
+        if ( ownerExecute )
+        {
+            sb.append( 'x' );
+        }
+        else
+        {
+            sb.append( '-' );
+        }
+
+        // Group Read
+        if ( groupRead )
+        {
+            sb.append( 'r' );
+        }
+        else
+        {
+            sb.append( '-' );
+        }
+
+        // Group Write
+        if ( groupWrite )
+        {
+            sb.append( 'w' );
+        }
+        else
+        {
+            sb.append( '-' );
+        }
+
+        // Group Execute
+        if ( groupExecute )
+        {
+            sb.append( 'x' );
+        }
+        else
+        {
+            sb.append( '-' );
+        }
+
+        // Others Read
+        if ( othersRead )
+        {
+            sb.append( 'r' );
+        }
+        else
+        {
+            sb.append( '-' );
+        }
+
+        // Others Write
+        if ( othersWrite )
+        {
+            sb.append( 'w' );
+        }
+        else
+        {
+            sb.append( '-' );
+        }
+
+        // Others Execute
+        if ( othersExecute )
+        {
+            sb.append( 'x' );
+        }
+        else
+        {
+            sb.append( '-' );
+        }
+
+        return sb.toString();
+    }
+
+
+    public boolean isGroupExecute()
+    {
+        return groupExecute;
+    }
+
+
+    public boolean isGroupRead()
+    {
+        return groupRead;
+    }
+
+
+    public boolean isGroupWrite()
+    {
+        return groupWrite;
+    }
+
+
+    public boolean isOthersExecute()
+    {
+        return othersExecute;
+    }
+
+
+    public boolean isOthersRead()
+    {
+        return othersRead;
+    }
+
+
+    public boolean isOthersWrite()
+    {
+        return othersWrite;
+    }
+
+
+    public boolean isOwnerExecute()
+    {
+        return ownerExecute;
+    }
+
+
+    public boolean isOwnerRead()
+    {
+        return ownerRead;
+    }
+
+
+    public boolean isOwnerWrite()
+    {
+        return ownerWrite;
+    }
+
+
+    public void setGroupExecute( boolean groupExecute )
+    {
+        this.groupExecute = groupExecute;
+    }
+
+
+    public void setGroupRead( boolean groupRead )
+    {
+        this.groupRead = groupRead;
+    }
+
+
+    public void setGroupWrite( boolean groupWrite )
+    {
+        this.groupWrite = groupWrite;
+    }
+
+
+    public void setOthersExecute( boolean othersExecute )
+    {
+        this.othersExecute = othersExecute;
+    }
+
+
+    public void setOthersRead( boolean othersRead )
+    {
+        this.othersRead = othersRead;
+    }
+
+
+    public void setOthersWrite( boolean othersWrite )
+    {
+        this.othersWrite = othersWrite;
+    }
+
+
+    public void setOwnerExecute( boolean ownerExecute )
+    {
+        this.ownerExecute = ownerExecute;
+    }
+
+
+    public void setOwnerRead( boolean ownerRead )
+    {
+        this.ownerRead = ownerRead;
+    }
+
+
+    public void setOwnerWrite( boolean ownerWrite )
+    {
+        this.ownerWrite = ownerWrite;
+    }
+}



Mime
View raw message