You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2010/10/07 10:11:11 UTC
svn commit: r1005358 - in
/directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor:
model/ valueeditors/
Author: pamarcelot
Date: Thu Oct 7 08:11:11 2010
New Revision: 1005358
URL: http://svn.apache.org/viewvc?rev=1005358&view=rev
Log:
Fixed 'aciitemeditor' module.
Modified:
directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java
directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapperFactory.java
directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java
directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java
directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java
Modified: directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java?rev=1005358&r1=1005357&r2=1005358&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapper.java Thu Oct 7 08:11:11 2010
@@ -28,12 +28,25 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-
import org.apache.directory.shared.ldap.aci.ACIItemParser;
import org.apache.directory.shared.ldap.aci.ItemFirstACIItem;
import org.apache.directory.shared.ldap.aci.ProtectedItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.AllAttributeValuesItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.AllUserAttributeTypesAndValuesItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.AllUserAttributeTypesItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.AttributeTypeItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.AttributeValueItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.ClassesItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.EntryItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.MaxImmSubItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.MaxValueCountElem;
+import org.apache.directory.shared.ldap.aci.protectedItem.MaxValueCountItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.RangeOfValuesItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.RestrictedByElem;
+import org.apache.directory.shared.ldap.aci.protectedItem.RestrictedByItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.SelfValueItem;
+import org.apache.directory.shared.ldap.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
import org.eclipse.osgi.util.NLS;
@@ -51,18 +64,18 @@ public class ProtectedItemWrapper
static
{
Map<Class<? extends ProtectedItem>, String> map = new HashMap<Class<? extends ProtectedItem>, String>();
- map.put( ProtectedItem.Entry.class, "entry" ); //$NON-NLS-1$
- map.put( ProtectedItem.AllUserAttributeTypes.class, "allUserAttributeTypes" ); //$NON-NLS-1$
- map.put( ProtectedItem.AttributeType.class, "attributeType" ); //$NON-NLS-1$
- map.put( ProtectedItem.AllAttributeValues.class, "allAttributeValues" ); //$NON-NLS-1$
- map.put( ProtectedItem.AllUserAttributeTypesAndValues.class, "allUserAttributeTypesAndValues" ); //$NON-NLS-1$
- map.put( ProtectedItem.AttributeValue.class, "attributeValue" ); //$NON-NLS-1$
- map.put( ProtectedItem.SelfValue.class, "selfValue" ); //$NON-NLS-1$
- map.put( ProtectedItem.RangeOfValues.class, "rangeOfValues" ); //$NON-NLS-1$
- map.put( ProtectedItem.MaxValueCount.class, "maxValueCount" ); //$NON-NLS-1$
- map.put( ProtectedItem.MaxImmSub.class, "maxImmSub" ); //$NON-NLS-1$
- map.put( ProtectedItem.RestrictedBy.class, "restrictedBy" ); //$NON-NLS-1$
- map.put( ProtectedItem.Classes.class, "classes" ); //$NON-NLS-1$
+ map.put( EntryItem.class, "entry" ); //$NON-NLS-1$
+ map.put( AllUserAttributeTypesItem.class, "allUserAttributeTypes" ); //$NON-NLS-1$
+ map.put( AttributeTypeItem.class, "attributeType" ); //$NON-NLS-1$
+ map.put( AllAttributeValuesItem.class, "allAttributeValues" ); //$NON-NLS-1$
+ map.put( AllUserAttributeTypesAndValuesItem.class, "allUserAttributeTypesAndValues" ); //$NON-NLS-1$
+ map.put( AttributeValueItem.class, "attributeValue" ); //$NON-NLS-1$
+ map.put( SelfValueItem.class, "selfValue" ); //$NON-NLS-1$
+ map.put( RangeOfValuesItem.class, "rangeOfValues" ); //$NON-NLS-1$
+ map.put( MaxValueCountItem.class, "maxValueCount" ); //$NON-NLS-1$
+ map.put( MaxImmSubItem.class, "maxImmSub" ); //$NON-NLS-1$
+ map.put( RestrictedByItem.class, "restrictedBy" ); //$NON-NLS-1$
+ map.put( ClassesItem.class, "classes" ); //$NON-NLS-1$
classToIdentifierMap = Collections.unmodifiableMap( map );
}
@@ -71,28 +84,28 @@ public class ProtectedItemWrapper
static
{
Map<Class<? extends ProtectedItem>, String> map = new HashMap<Class<? extends ProtectedItem>, String>();
- map.put( ProtectedItem.Entry.class, Messages.getString( "ProtectedItemWrapper.protectedItem.entry.label" ) ); //$NON-NLS-1$
- map.put( ProtectedItem.AllUserAttributeTypes.class, Messages
+ map.put( EntryItem.class, Messages.getString( "ProtectedItemWrapper.protectedItem.entry.label" ) ); //$NON-NLS-1$
+ map.put( AllUserAttributeTypesItem.class, Messages
.getString( "ProtectedItemWrapper.protectedItem.allUserAttributeTypes.label" ) ); //$NON-NLS-1$
- map.put( ProtectedItem.AttributeType.class, Messages
+ map.put( AttributeTypeItem.class, Messages
.getString( "ProtectedItemWrapper.protectedItem.attributeType.label" ) ); //$NON-NLS-1$
- map.put( ProtectedItem.AllAttributeValues.class, Messages
+ map.put( AllAttributeValuesItem.class, Messages
.getString( "ProtectedItemWrapper.protectedItem.allAttributeValues.label" ) ); //$NON-NLS-1$
- map.put( ProtectedItem.AllUserAttributeTypesAndValues.class, Messages
+ map.put( AllUserAttributeTypesAndValuesItem.class, Messages
.getString( "ProtectedItemWrapper.protectedItem.allUserAttributeTypesAndValues.label" ) ); //$NON-NLS-1$
- map.put( ProtectedItem.AttributeValue.class, Messages
+ map.put( AttributeValueItem.class, Messages
.getString( "ProtectedItemWrapper.protectedItem.attributeValue.label" ) ); //$NON-NLS-1$
- map.put( ProtectedItem.SelfValue.class, Messages
+ map.put( SelfValueItem.class, Messages
.getString( "ProtectedItemWrapper.protectedItem.selfValue.label" ) ); //$NON-NLS-1$
- map.put( ProtectedItem.RangeOfValues.class, Messages
+ map.put( RangeOfValuesItem.class, Messages
.getString( "ProtectedItemWrapper.protectedItem.rangeOfValues.label" ) ); //$NON-NLS-1$
- map.put( ProtectedItem.MaxValueCount.class, Messages
+ map.put( MaxValueCountItem.class, Messages
.getString( "ProtectedItemWrapper.protectedItem.maxValueCount.label" ) ); //$NON-NLS-1$
- map.put( ProtectedItem.MaxImmSub.class, Messages
+ map.put( MaxImmSubItem.class, Messages
.getString( "ProtectedItemWrapper.protectedItem.maxImmSub.label" ) ); //$NON-NLS-1$
- map.put( ProtectedItem.RestrictedBy.class, Messages
+ map.put( RestrictedByItem.class, Messages
.getString( "ProtectedItemWrapper.protectedItem.restrictedBy.label" ) ); //$NON-NLS-1$
- map.put( ProtectedItem.Classes.class, Messages.getString( "ProtectedItemWrapper.protectedItem.classes.label" ) ); //$NON-NLS-1$
+ map.put( ClassesItem.class, Messages.getString( "ProtectedItemWrapper.protectedItem.classes.label" ) ); //$NON-NLS-1$
classToDisplayMap = Collections.unmodifiableMap( map );
}
@@ -190,76 +203,73 @@ public class ProtectedItemWrapper
// switch on userClass type
// no value in ProtectedItem.Entry, ProtectedItem.AllUserAttributeTypes and ProtectedItem.AllUserAttributeTypesAndValues
- if ( item.getClass() == ProtectedItem.AttributeType.class )
+ if ( item.getClass() == AttributeTypeItem.class )
{
- ProtectedItem.AttributeType at = ( ProtectedItem.AttributeType ) item;
- for ( Iterator<String> it = at.iterator(); it.hasNext(); )
+ AttributeTypeItem at = ( AttributeTypeItem ) item;
+ for ( Iterator<AttributeType> it = at.iterator(); it.hasNext(); )
{
- values.add( it.next() );
+ AttributeType attributeType = it.next();
+ values.add( attributeType.toString() );
}
}
- else if ( item.getClass() == ProtectedItem.AllAttributeValues.class )
+ else if ( item.getClass() == AllAttributeValuesItem.class )
{
- ProtectedItem.AllAttributeValues aav = ( ProtectedItem.AllAttributeValues ) item;
- for ( Iterator<String> it = aav.iterator(); it.hasNext(); )
+ AllAttributeValuesItem aav = ( AllAttributeValuesItem ) item;
+ for ( Iterator<AttributeType> it = aav.iterator(); it.hasNext(); )
{
- values.add( it.next() );
+ AttributeType attributeType = it.next();
+ values.add( attributeType.toString() );
}
}
- else if ( item.getClass() == ProtectedItem.AttributeValue.class )
+ else if ( item.getClass() == AttributeValueItem.class )
{
- ProtectedItem.AttributeValue av = ( ProtectedItem.AttributeValue ) item;
- for ( Iterator<Attribute> it = av.iterator(); it.hasNext(); )
+ AttributeValueItem av = ( AttributeValueItem ) item;
+ for ( Iterator<EntryAttribute> it = av.iterator(); it.hasNext(); )
{
- Attribute attribute = it.next();
- try
- {
- values.add( attribute.getID() + "=" + attribute.get() ); //$NON-NLS-1$
- }
- catch ( NamingException e )
- {
- }
+ EntryAttribute entryAttribute = it.next();
+ values.add( entryAttribute.getId() + "=" + entryAttribute.get() ); //$NON-NLS-1$
}
}
- else if ( item.getClass() == ProtectedItem.SelfValue.class )
+ else if ( item.getClass() == SelfValueItem.class )
{
- ProtectedItem.SelfValue sv = ( ProtectedItem.SelfValue ) item;
- for ( Iterator<String> it = sv.iterator(); it.hasNext(); )
+ SelfValueItem sv = ( SelfValueItem ) item;
+ for ( Iterator<AttributeType> it = sv.iterator(); it.hasNext(); )
{
- values.add( it.next() );
+ AttributeType attributeType = it.next();
+ values.add( attributeType.toString() );
}
}
- else if ( item.getClass() == ProtectedItem.RangeOfValues.class )
+ else if ( item.getClass() == RangeOfValuesItem.class )
{
- ProtectedItem.RangeOfValues rov = ( ProtectedItem.RangeOfValues ) item;
- values.add( rov.getFilter().toString() );
+ RangeOfValuesItem rov = ( RangeOfValuesItem ) item;
+ values.add( rov.getRefinement().toString() );
}
- else if ( item.getClass() == ProtectedItem.MaxValueCount.class )
+ else if ( item.getClass() == MaxValueCountItem.class )
{
- ProtectedItem.MaxValueCount mvc = ( ProtectedItem.MaxValueCount ) item;
- for ( Iterator<ProtectedItem.MaxValueCountItem> it = mvc.iterator(); it.hasNext(); )
+ MaxValueCountItem mvc = ( MaxValueCountItem ) item;
+ for ( Iterator<MaxValueCountElem> it = mvc.iterator(); it.hasNext(); )
{
- ProtectedItem.MaxValueCountItem mvci = it.next();
+ MaxValueCountElem mvci = it.next();
values.add( mvci.toString() );
}
}
- else if ( item.getClass() == ProtectedItem.MaxImmSub.class )
+ else if ( item.getClass() == MaxImmSubItem.class )
{
- ProtectedItem.MaxImmSub mis = ( ProtectedItem.MaxImmSub ) item;
+ MaxImmSubItem mis = ( MaxImmSubItem ) item;
values.add( Integer.toString( mis.getValue() ) );
}
- else if ( item.getClass() == ProtectedItem.RestrictedBy.class )
+ else if ( item.getClass() == RestrictedByItem.class )
{
- ProtectedItem.RestrictedBy rb = ( ProtectedItem.RestrictedBy ) item;
- for ( Iterator<ProtectedItem.RestrictedByItem> it = rb.iterator(); it.hasNext(); )
+ RestrictedByItem rb = ( RestrictedByItem ) item;
+ for ( Iterator<RestrictedByElem> it = rb.iterator(); it.hasNext(); )
{
- ProtectedItem.RestrictedByItem rbi = it.next();
- values.add( rbi.toString() );
+ RestrictedByElem rbe = it.next();
+ values.add( rbe.toString() );
}
}
- else if ( item.getClass() == ProtectedItem.Classes.class )
+ else if ( item.getClass() == ClassesItem.class )
{
- ProtectedItem.Classes classes = ( ProtectedItem.Classes ) item;
+ ClassesItem classes = ( ClassesItem ) item;
StringBuilder sb = new StringBuilder();
classes.getClasses().printRefinementToBuffer( sb );
values.add( sb.toString() );
Modified: directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapperFactory.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapperFactory.java?rev=1005358&r1=1005357&r2=1005358&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapperFactory.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ProtectedItemWrapperFactory.java Thu Oct 7 08:11:11 2010
@@ -20,7 +20,18 @@
package org.apache.directory.studio.aciitemeditor.model;
-import org.apache.directory.shared.ldap.aci.ProtectedItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.AllAttributeValuesItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.AllUserAttributeTypesAndValuesItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.AllUserAttributeTypesItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.AttributeTypeItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.AttributeValueItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.ClassesItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.EntryItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.MaxImmSubItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.MaxValueCountItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.RangeOfValuesItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.RestrictedByItem;
+import org.apache.directory.shared.ldap.aci.protectedItem.SelfValueItem;
import org.apache.directory.studio.aciitemeditor.valueeditors.AttributeTypeAndValueValueEditor;
import org.apache.directory.studio.aciitemeditor.valueeditors.AttributeTypeValueEditor;
import org.apache.directory.studio.aciitemeditor.valueeditors.FilterValueEditor;
@@ -49,62 +60,62 @@ public class ProtectedItemWrapperFactory
ProtectedItemWrapper[] protectedItemWrappers = new ProtectedItemWrapper[]
{
// entry
- new ProtectedItemWrapper( ProtectedItem.Entry.class, false, "", //$NON-NLS-1$
+ new ProtectedItemWrapper( EntryItem.class, false, "", //$NON-NLS-1$
"", //$NON-NLS-1$
null ),
// allUserAttributeTypes
- new ProtectedItemWrapper( ProtectedItem.AllUserAttributeTypes.class, false, "", //$NON-NLS-1$
+ new ProtectedItemWrapper( AllUserAttributeTypesItem.class, false, "", //$NON-NLS-1$
"", //$NON-NLS-1$
null ),
// attributeType { 1.2.3, cn }
- new ProtectedItemWrapper( ProtectedItem.AttributeType.class, true, "", //$NON-NLS-1$
+ new ProtectedItemWrapper( AttributeTypeItem.class, true, "", //$NON-NLS-1$
"", //$NON-NLS-1$
new AttributeTypeValueEditor() ),
// allAttributeValues { 1.2.3, cn }
- new ProtectedItemWrapper( ProtectedItem.AllAttributeValues.class, true, "", //$NON-NLS-1$
+ new ProtectedItemWrapper( AllAttributeValuesItem.class, true, "", //$NON-NLS-1$
"", //$NON-NLS-1$
new AttributeTypeValueEditor() ),
// attributeType
- new ProtectedItemWrapper( ProtectedItem.AllUserAttributeTypesAndValues.class, false, "", //$NON-NLS-1$
+ new ProtectedItemWrapper( AllUserAttributeTypesAndValuesItem.class, false, "", //$NON-NLS-1$
"", //$NON-NLS-1$
null ),
// attributeValue { ou=people, cn=Ersin }
- new ProtectedItemWrapper( ProtectedItem.AttributeValue.class, true, "", //$NON-NLS-1$
+ new ProtectedItemWrapper( AttributeValueItem.class, true, "", //$NON-NLS-1$
"", //$NON-NLS-1$
new AttributeTypeAndValueValueEditor() ),
// selfValue { 1.2.3, cn }
- new ProtectedItemWrapper( ProtectedItem.SelfValue.class, true, "", //$NON-NLS-1$
+ new ProtectedItemWrapper( SelfValueItem.class, true, "", //$NON-NLS-1$
"", //$NON-NLS-1$
new AttributeTypeValueEditor() ),
// rangeOfValues (cn=E*)
- new ProtectedItemWrapper( ProtectedItem.RangeOfValues.class, false, "", //$NON-NLS-1$
+ new ProtectedItemWrapper( RangeOfValuesItem.class, false, "", //$NON-NLS-1$
"", //$NON-NLS-1$
new FilterValueEditor() ),
// maxValueCount { { type 10.11.12, maxCount 10 }, { maxCount 20, type 11.12.13 } }
- new ProtectedItemWrapper( ProtectedItem.MaxValueCount.class, true, "", //$NON-NLS-1$
+ new ProtectedItemWrapper( MaxValueCountItem.class, true, "", //$NON-NLS-1$
"", //$NON-NLS-1$
new MaxValueCountValueEditor() ),
// maxImmSub 3
- new ProtectedItemWrapper( ProtectedItem.MaxImmSub.class, false, "", //$NON-NLS-1$
+ new ProtectedItemWrapper( MaxImmSubItem.class, false, "", //$NON-NLS-1$
"", //$NON-NLS-1$
new IntegerValueEditor() ),
// restrictedBy { { type 10.11.12, valuesIn ou }, { valuesIn cn, type 11.12.13 } }
- new ProtectedItemWrapper( ProtectedItem.RestrictedBy.class, true, "", //$NON-NLS-1$
+ new ProtectedItemWrapper( RestrictedByItem.class, true, "", //$NON-NLS-1$
"", //$NON-NLS-1$
new RestrictedByValueEditor() ),
// classes and : { item: xyz , or:{item:X,item:Y} }
- new ProtectedItemWrapper( ProtectedItem.Classes.class, false, "", //$NON-NLS-1$
+ new ProtectedItemWrapper( ClassesItem.class, false, "", //$NON-NLS-1$
"", //$NON-NLS-1$
new TextValueEditor() // TODO: RefinementValueEditor
),
Modified: directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java?rev=1005358&r1=1005357&r2=1005358&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java Thu Oct 7 08:11:11 2010
@@ -33,7 +33,7 @@ import java.util.Set;
import org.apache.directory.shared.ldap.aci.ACIItemParser;
import org.apache.directory.shared.ldap.aci.UserClass;
import org.apache.directory.shared.ldap.aci.UserFirstACIItem;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
import org.eclipse.osgi.util.NLS;
@@ -166,8 +166,8 @@ public class UserClassWrapper
if ( userClass.getClass() == UserClass.Name.class )
{
UserClass.Name name = ( UserClass.Name ) userClass;
- Set<LdapDN> jndiNames = name.getNames();
- for ( LdapDN jndiName : jndiNames )
+ Set<DN> jndiNames = name.getNames();
+ for ( DN jndiName : jndiNames )
{
values.add( jndiName.toString() );
}
@@ -175,8 +175,8 @@ public class UserClassWrapper
else if ( userClass.getClass() == UserClass.UserGroup.class )
{
UserClass.UserGroup userGrops = ( UserClass.UserGroup ) userClass;
- Set<LdapDN> jndiNames = userGrops.getNames();
- for ( LdapDN jndiName : jndiNames )
+ Set<DN> jndiNames = userGrops.getNames();
+ for ( DN jndiName : jndiNames )
{
values.add( jndiName.toString() );
}
@@ -188,7 +188,7 @@ public class UserClassWrapper
for ( SubtreeSpecification subtreeSpecification : subtreeSpecifications )
{
StringBuilder buffer = new StringBuilder();
- subtreeSpecification.printToBuffer( buffer );
+ subtreeSpecification.toString( buffer );
String s = buffer.toString();
values.add( s );
}
Modified: directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java?rev=1005358&r1=1005357&r2=1005358&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java Thu Oct 7 08:11:11 2010
@@ -23,9 +23,8 @@ package org.apache.directory.studio.acii
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import javax.naming.InvalidNameException;
-
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.studio.aciitemeditor.Activator;
import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
@@ -59,7 +58,7 @@ class ExclusionDialog extends Dialog
private IBrowserConnection connection;
/** The base. */
- private LdapDN base;
+ private DN base;
/** The initial type. */
private String initialType;
@@ -91,7 +90,7 @@ class ExclusionDialog extends Dialog
* @param base the base DN
* @param exclusion the exclusion string
*/
- protected ExclusionDialog( Shell parentShell, IBrowserConnection connection, LdapDN base, String exclusion )
+ protected ExclusionDialog( Shell parentShell, IBrowserConnection connection, DN base, String exclusion )
{
super( parentShell );
this.connection = connection;
@@ -173,10 +172,10 @@ class ExclusionDialog extends Dialog
entryWidget.createWidget( composite );
try
{
- LdapDN dn = new LdapDN( initalDN );
+ DN dn = new DN( initalDN );
entryWidget.setInput( connection, dn, base, true );
}
- catch ( InvalidNameException e )
+ catch ( LdapInvalidDnException e )
{
}
entryWidget.addWidgetModifyListener( new WidgetModifyListener()
Modified: directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java?rev=1005358&r1=1005357&r2=1005358&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java Thu Oct 7 08:11:11 2010
@@ -26,7 +26,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.shared.ldap.subtree.BaseSubtreeSpecification;
import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
import org.apache.directory.shared.ldap.subtree.SubtreeSpecificationParser;
@@ -80,7 +80,7 @@ class SubtreeSpecificationDialog extends
private IBrowserConnection connection;
/** The subentry's DN */
- private LdapDN subentryDN;
+ private DN subentryDN;
/** Flag indicating if the refinement or filter widget should be visible */
private boolean refinementOrFilterVisible;
@@ -127,7 +127,7 @@ class SubtreeSpecificationDialog extends
* @param useLocalName
* true to use local name for the base
*/
- SubtreeSpecificationDialog( Shell shell, IBrowserConnection connection, LdapDN subentryDN,
+ SubtreeSpecificationDialog( Shell shell, IBrowserConnection connection, DN subentryDN,
String initialSubtreeSpecification, boolean refinementOrFilterVisible, boolean useLocalName )
{
super( shell );
@@ -153,16 +153,16 @@ class SubtreeSpecificationDialog extends
}
exclusions = new ArrayList<String>();
- Set<LdapDN> chopBeforeExclusions = subtreeSpecification.getChopBeforeExclusions();
- for ( LdapDN dn : chopBeforeExclusions )
+ Set<DN> chopBeforeExclusions = subtreeSpecification.getChopBeforeExclusions();
+ for ( DN dn : chopBeforeExclusions )
{
- exclusions.add( "chopBefore: \"" + dn.toNormName() + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
+ exclusions.add( "chopBefore: \"" + dn.getNormName() + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
}
- Set<LdapDN> chopAfterExclusions = subtreeSpecification.getChopAfterExclusions();
- for ( LdapDN dn : chopAfterExclusions )
+ Set<DN> chopAfterExclusions = subtreeSpecification.getChopAfterExclusions();
+ for ( DN dn : chopAfterExclusions )
{
- exclusions.add( "chopAfter: \"" + dn.toNormName() + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
+ exclusions.add( "chopAfter: \"" + dn.getNormName() + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
}
returnValue = null;
@@ -188,7 +188,7 @@ class SubtreeSpecificationDialog extends
// set return value
//returnValue = buildSubreeSpecification();
StringBuilder sb = new StringBuilder();
- subtreeSpecification.printToBuffer( sb );
+ subtreeSpecification.toString( sb );
returnValue = sb.toString();
// save filter and dn history
@@ -216,8 +216,8 @@ class SubtreeSpecificationDialog extends
BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.base" ), 1 ); //$NON-NLS-1$
- LdapDN base = subtreeSpecification.getBase();
- LdapDN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
+ DN base = subtreeSpecification.getBase();
+ DN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
entryWidget = new EntryWidget( connection, base, suffix, useLocalName );
entryWidget.createWidget( composite );
entryWidget.addWidgetModifyListener( new WidgetModifyListener()
@@ -495,7 +495,7 @@ class SubtreeSpecificationDialog extends
{
boolean valid = true;
- LdapDN base = entryWidget.getDn();
+ DN base = entryWidget.getDn();
valid &= base != null;
String ss = buildSubreeSpecification();
@@ -530,7 +530,7 @@ class SubtreeSpecificationDialog extends
sb.append( "{" ); //$NON-NLS-1$
// Adding base
- LdapDN base = entryWidget.getDn();
+ DN base = entryWidget.getDn();
if ( base != null && !SubtreeValueEditor.EMPTY.equals( base.toString() ) )
{
sb.append( " base \"" + base.toString() + "\"," ); //$NON-NLS-1$ //$NON-NLS-2$
@@ -652,10 +652,10 @@ class SubtreeSpecificationDialog extends
*/
private void addValueExclusionsTable()
{
- LdapDN chopBase = subtreeSpecification.getBase();
+ DN chopBase = subtreeSpecification.getBase();
if ( useLocalName && subentryDN != null && DnUtils.getParent( subentryDN ) != null )
{
- LdapDN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
+ DN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
chopBase = DnUtils.composeDn( chopBase, suffix );
}
@@ -680,10 +680,10 @@ class SubtreeSpecificationDialog extends
String oldValue = getSelectedValueExclusionsTable();
if ( oldValue != null )
{
- LdapDN chopBase = subtreeSpecification.getBase();
+ DN chopBase = subtreeSpecification.getBase();
if ( useLocalName && subentryDN != null && DnUtils.getParent( subentryDN ) != null )
{
- LdapDN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
+ DN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
chopBase = DnUtils.composeDn( chopBase, suffix );
}
Modified: directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java?rev=1005358&r1=1005357&r2=1005358&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java Thu Oct 7 08:11:11 2010
@@ -20,7 +20,7 @@
package org.apache.directory.studio.aciitemeditor.valueeditors;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
import org.apache.directory.studio.ldapbrowser.core.model.IValue;
@@ -97,7 +97,7 @@ public class SubtreeValueEditor extends
if ( o != null && o instanceof String )
{
IBrowserConnection connection = value.getAttribute().getEntry().getBrowserConnection();
- LdapDN dn = value.getAttribute().getEntry().getDn();
+ DN dn = value.getAttribute().getEntry().getDn();
return new SubtreeSpecificationValueWrapper( connection, dn, value.getStringValue() );
}
@@ -116,7 +116,7 @@ public class SubtreeValueEditor extends
private IBrowserConnection connection;
/** The subentry's DN */
- private LdapDN subentryDN;
+ private DN subentryDN;
/** The subtreeSpecification */
private String subtreeSpecification;
@@ -132,7 +132,7 @@ public class SubtreeValueEditor extends
* @param subtreeSpecification
* the subtreeSpecification
*/
- private SubtreeSpecificationValueWrapper( IBrowserConnection connection, LdapDN subentryDN,
+ private SubtreeSpecificationValueWrapper( IBrowserConnection connection, DN subentryDN,
String subtreeSpecification )
{
this.connection = connection;