directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r778450 - in /directory/studio/trunk/valueeditors: ./ src/main/java/org/apache/directory/studio/valueeditors/uuid/
Date Mon, 25 May 2009 16:30:25 GMT
Author: kayyagari
Date: Mon May 25 16:30:25 2009
New Revision: 778450

URL: http://svn.apache.org/viewvc?rev=778450&view=rev
Log:
an editor to show entryUUID attribute value

Added:
    directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/uuid/
    directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/uuid/InPlaceUuidValueEditor.java
Modified:
    directory/studio/trunk/valueeditors/plugin.properties
    directory/studio/trunk/valueeditors/plugin.xml
    directory/studio/trunk/valueeditors/plugin_de.properties
    directory/studio/trunk/valueeditors/plugin_fr.properties

Modified: directory/studio/trunk/valueeditors/plugin.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/valueeditors/plugin.properties?rev=778450&r1=778449&r2=778450&view=diff
==============================================================================
--- directory/studio/trunk/valueeditors/plugin.properties (original)
+++ directory/studio/trunk/valueeditors/plugin.properties Mon May 25 16:30:25 2009
@@ -33,4 +33,6 @@
 
 ValueEditor_AdministrativeRoleValueEditor_name=Administrative Role Editor
 
-ValueEditor_InPlaceOidValueEditor_name=OID Editor
\ No newline at end of file
+ValueEditor_InPlaceOidValueEditor_name=OID Editor
+
+ValueEditor_InPlaceEntryUUIDValueEditor_name=Entry UUID Editor
\ No newline at end of file

Modified: directory/studio/trunk/valueeditors/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/valueeditors/plugin.xml?rev=778450&r1=778449&r2=778450&view=diff
==============================================================================
--- directory/studio/trunk/valueeditors/plugin.xml (original)
+++ directory/studio/trunk/valueeditors/plugin.xml Mon May 25 16:30:25 2009
@@ -80,6 +80,12 @@
              syntaxOID="1.3.6.1.4.1.18060.0.4.0.0.2">
        </syntax>
     </valueEditor>
+    <valueEditor
+          class="org.apache.directory.studio.valueeditors.uuid.InPlaceUuidValueEditor"
+          icon="resources/icons/passwordeditor.gif"
+          name="%ValueEditor_InPlaceEntryUUIDValueEditor_name">
+       <attribute attributeType="entryUUID"/>
+    </valueEditor>
    </extension>
 
 </plugin>

Modified: directory/studio/trunk/valueeditors/plugin_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/valueeditors/plugin_de.properties?rev=778450&r1=778449&r2=778450&view=diff
==============================================================================
--- directory/studio/trunk/valueeditors/plugin_de.properties (original)
+++ directory/studio/trunk/valueeditors/plugin_de.properties Mon May 25 16:30:25 2009
@@ -26,3 +26,5 @@
 ValueEditor_AddressValueEditor_name=Adressen Editor
 
 ValueEditor_AdministrativeRoleValueEditor_name=Administrativer Rollen Editor
+
+ValueEditor_InPlaceEntryUUIDValueEditor_name=Entry UUID Editor
\ No newline at end of file

Modified: directory/studio/trunk/valueeditors/plugin_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/valueeditors/plugin_fr.properties?rev=778450&r1=778449&r2=778450&view=diff
==============================================================================
--- directory/studio/trunk/valueeditors/plugin_fr.properties (original)
+++ directory/studio/trunk/valueeditors/plugin_fr.properties Mon May 25 16:30:25 2009
@@ -24,3 +24,4 @@
 ValueEditor_IntegerValueEditor_name=Editeur de nombre entier
 ValueEditor_AdministrativeRoleValueEditor_name=Editeur de r\u00F4le d'administration
 ValueEditor_InPlaceOidValueEditor_name=Editeur d'OID
+ValueEditor_InPlaceEntryUUIDValueEditor_name=Editeur d'EntryUUID
\ No newline at end of file

Added: directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/uuid/InPlaceUuidValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/uuid/InPlaceUuidValueEditor.java?rev=778450&view=auto
==============================================================================
--- directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/uuid/InPlaceUuidValueEditor.java
(added)
+++ directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/uuid/InPlaceUuidValueEditor.java
Mon May 25 16:30:25 2009
@@ -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.valueeditors.uuid;
+
+import java.util.UUID;
+
+import org.apache.directory.studio.ldapbrowser.core.model.IValue;
+import org.apache.directory.studio.valueeditors.AbstractInPlaceStringValueEditor;
+
+
+
+
+/**
+ * Implementation of IValueEditor for attribute 'entryUUID' with syntax 1.3.6.1.4.1.18060.0.4.1.2.29

+ * . 
+ * 
+ * Currently only the getDisplayXXX() methods are implemented.
+ * For modification the raw string must be edited.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class InPlaceUuidValueEditor extends AbstractInPlaceStringValueEditor
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getDisplayValue( IValue value )
+    {
+        byte[] displayValue = value.getBinaryValue();
+
+        if ( !showRawValues() )
+        {
+        	if( displayValue == null )
+        	{
+        		return "NULL";
+        	}
+        	
+        	return UUID.nameUUIDFromBytes( displayValue ).toString(); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+
+        return "Binay entryUUID value";
+    }
+
+}



Mime
View raw message