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/06 19:33:41 UTC
svn commit: r1005180 [2/2] - in
/directory/studio/branches/shared-trunk-merge/plugins:
connection.core/src/main/java/org/apache/directory/studio/connection/core/
ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/
l...
Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java?rev=1005180&r1=1005179&r2=1005180&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java Wed Oct 6 17:33:40 2010
@@ -21,9 +21,8 @@
package org.apache.directory.studio.ldapbrowser.common.widgets.search;
-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.common.ui.widgets.BaseWidgetUtils;
import org.apache.directory.studio.connection.core.DnUtils;
import org.apache.directory.studio.connection.ui.RunnableContextRunner;
@@ -74,10 +73,10 @@ public class EntryWidget extends Browser
private IBrowserConnection browserConnection;
/** The selected DN. */
- private LdapDN dn;
+ private DN dn;
/** The suffix. */
- private LdapDN suffix;
+ private DN suffix;
/** Flag indicating if using local name for the dn */
boolean useLocalName;
@@ -99,7 +98,7 @@ public class EntryWidget extends Browser
* @param browserConnection the connection
* @param dn the initial DN
*/
- public EntryWidget( IBrowserConnection browserConnection, LdapDN dn )
+ public EntryWidget( IBrowserConnection browserConnection, DN dn )
{
this( browserConnection, dn, null, false );
}
@@ -113,7 +112,7 @@ public class EntryWidget extends Browser
* @param suffix the suffix
* @param useLocalName true to use local name for the DN
*/
- public EntryWidget( IBrowserConnection browserConnection, LdapDN dn, LdapDN suffix, boolean useLocalName )
+ public EntryWidget( IBrowserConnection browserConnection, DN dn, DN suffix, boolean useLocalName )
{
this.browserConnection = browserConnection;
this.dn = dn;
@@ -147,9 +146,9 @@ public class EntryWidget extends Browser
{
try
{
- dn = new LdapDN( dnCombo.getText() );
+ dn = new DN( dnCombo.getText() );
}
- catch ( InvalidNameException e1 )
+ catch ( LdapInvalidDnException e1 )
{
dn = null;
}
@@ -200,7 +199,7 @@ public class EntryWidget extends Browser
}
// calculate initial DN
- LdapDN initialDN = dn;
+ DN initialDN = dn;
if ( useLocalName && suffix != null && suffix.size() > 0 )
{
if ( initialDN != null && initialDN.size() > 0 )
@@ -256,7 +255,7 @@ public class EntryWidget extends Browser
{
if ( dnCombo != null && entryBrowseButton != null )
{
- dnCombo.setText( dn != null ? dn.getUpName() : "" ); //$NON-NLS-1$
+ dnCombo.setText( dn != null ? dn.getName() : "" ); //$NON-NLS-1$
}
}
@@ -303,7 +302,7 @@ public class EntryWidget extends Browser
*
* @return the suffix DN or <code>null</code> if not set
*/
- public LdapDN getSuffix()
+ public DN getSuffix()
{
return suffix;
}
@@ -314,7 +313,7 @@ public class EntryWidget extends Browser
*
* @return the DN or <code>null</code> if the DN isn't valid
*/
- public LdapDN getDn()
+ public DN getDn()
{
return dn;
}
@@ -337,7 +336,7 @@ public class EntryWidget extends Browser
* @param dn the DN
* @param browserConnection the connection
*/
- public void setInput( IBrowserConnection browserConnection, LdapDN dn )
+ public void setInput( IBrowserConnection browserConnection, DN dn )
{
setInput( browserConnection, dn, null, false );
}
@@ -351,7 +350,7 @@ public class EntryWidget extends Browser
* @param suffix the suffix
* @param useLocalName true to use local name for the DN
*/
- public void setInput( IBrowserConnection browserConnection, LdapDN dn, LdapDN suffix, boolean useLocalName )
+ public void setInput( IBrowserConnection browserConnection, DN dn, DN suffix, boolean useLocalName )
{
if ( this.browserConnection != browserConnection || this.dn != dn || this.suffix != suffix )
{
Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java?rev=1005180&r1=1005179&r2=1005180&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java Wed Oct 6 17:33:40 2010
@@ -29,8 +29,8 @@ import java.util.List;
import java.util.Set;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
import org.apache.directory.studio.connection.core.Connection;
import org.apache.directory.studio.connection.core.StudioControl;
@@ -662,7 +662,7 @@ public class SearchPageWrapper extends B
if ( search.getBrowserConnection() != null )
{
IBrowserConnection browserConnection = search.getBrowserConnection();
- LdapDN searchBase = search.getSearchBase();
+ DN searchBase = search.getSearchBase();
if ( browserConnectionWidget != null )
{
@@ -799,7 +799,7 @@ public class SearchPageWrapper extends B
{
if ( returnOperationalAttributesButton.getSelection() )
{
- Collection<AttributeTypeDescription> opAtds = SchemaUtils
+ Collection<AttributeType> opAtds = SchemaUtils
.getOperationalAttributeDescriptions( browserConnectionWidget.getBrowserConnection()
.getSchema() );
Collection<String> opAtdNames = SchemaUtils.getNames( opAtds );
Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java?rev=1005180&r1=1005179&r2=1005180&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java Wed Oct 6 17:33:40 2010
@@ -26,7 +26,7 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
import org.apache.directory.studio.connection.ui.widgets.ExtendedContentAssistCommandAdapter;
import org.apache.directory.studio.ldapbrowser.common.widgets.ListContentProposalProvider;
@@ -115,13 +115,13 @@ public class AttributeTypeWizardPage ext
this.initialShowSubschemaAttributesOnly = initialShowSubschemaAttributesOnly;
this.initialHideExistingAttributes = initialHideExistingAttributes;
- Collection<AttributeTypeDescription> atds = initialEntry.getBrowserConnection().getSchema()
+ Collection<AttributeType> atds = initialEntry.getBrowserConnection().getSchema()
.getAttributeTypeDescriptions();
Collection<String> atdNames = SchemaUtils.getNames( atds );
possibleAttributeTypes = atdNames.toArray( new String[atdNames.size()] );
Arrays.sort( possibleAttributeTypes );
- Collection<AttributeTypeDescription> allAtds = SchemaUtils.getAllAttributeTypeDescriptions( initialEntry );
+ Collection<AttributeType> allAtds = SchemaUtils.getAllAttributeTypeDescriptions( initialEntry );
Collection<String> names = SchemaUtils.getNames( allAtds );
possibleAttributeTypesSubschemaOnly = names.toArray( new String[0] );
Arrays.sort( possibleAttributeTypesSubschemaOnly );
Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryAttributesWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryAttributesWizardPage.java?rev=1005180&r1=1005179&r2=1005180&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryAttributesWizardPage.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryAttributesWizardPage.java Wed Oct 6 17:33:40 2010
@@ -23,7 +23,7 @@ package org.apache.directory.studio.ldap
import java.util.Collection;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
import org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.EntryEditorWidget;
@@ -185,10 +185,10 @@ public class NewEntryAttributesWizardPag
// remove empty must attributes
// necessary when navigating back, modifying object classes
// and DN and navigation forward again.
- Collection<AttributeTypeDescription> oldMusts = SchemaUtils.getMustAttributeTypeDescriptions( newEntry );
- for ( AttributeTypeDescription oldMust : oldMusts )
+ Collection<AttributeType> oldMusts = SchemaUtils.getMustAttributeTypeDescriptions( newEntry );
+ for ( AttributeType oldMust : oldMusts )
{
- IAttribute attribute = newEntry.getAttribute( oldMust.getNumericOid() );
+ IAttribute attribute = newEntry.getAttribute( oldMust.getOid() );
if ( attribute != null )
{
IValue[] values = attribute.getValues();
@@ -207,10 +207,10 @@ public class NewEntryAttributesWizardPag
}
// add must attributes
- Collection<AttributeTypeDescription> newMusts = SchemaUtils.getMustAttributeTypeDescriptions( newEntry );
- for ( AttributeTypeDescription newMust : newMusts )
+ Collection<AttributeType> newMusts = SchemaUtils.getMustAttributeTypeDescriptions( newEntry );
+ for ( AttributeType newMust : newMusts )
{
- if ( newEntry.getAttributeWithSubtypes( newMust.getNumericOid() ) == null )
+ if ( newEntry.getAttributeWithSubtypes( newMust.getOid() ) == null )
{
String friendlyIdentifier = SchemaUtils.getFriendlyIdentifier( newMust );
IAttribute att = new Attribute( newEntry, friendlyIdentifier );
Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java?rev=1005180&r1=1005179&r2=1005180&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryDnWizardPage.java Wed Oct 6 17:33:40 2010
@@ -25,14 +25,13 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
-import javax.naming.InvalidNameException;
-
import org.apache.commons.lang.ArrayUtils;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.name.Rdn;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.name.AVA;
+import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
import org.apache.directory.studio.connection.core.DnUtils;
import org.apache.directory.studio.connection.ui.RunnableContextRunner;
@@ -132,7 +131,7 @@ public class NewEntryDnWizardPage extend
private void validate()
{
if ( wizard.isNewContextEntry() && !"".equals( contextEntryDnCombo.getText() ) //$NON-NLS-1$
- && LdapDN.isValid( contextEntryDnCombo.getText() ) )
+ && DN.isValid( contextEntryDnCombo.getText() ) )
{
setPageComplete( true );
saveState();
@@ -173,18 +172,18 @@ public class NewEntryDnWizardPage extend
contextEntryDnCombo.setItems( values );
// preset combo text
- if ( Arrays.asList( values ).contains( newEntry.getDn().getUpName() ) )
+ if ( Arrays.asList( values ).contains( newEntry.getDn().getName() ) )
{
- contextEntryDnCombo.setText( newEntry.getDn().getUpName() );
+ contextEntryDnCombo.setText( newEntry.getDn().getName() );
}
}
}
else
{
- Collection<AttributeTypeDescription> atds = SchemaUtils.getAllAttributeTypeDescriptions( newEntry );
+ Collection<AttributeType> atds = SchemaUtils.getAllAttributeTypeDescriptions( newEntry );
String[] attributeNames = SchemaUtils.getNames( atds ).toArray( ArrayUtils.EMPTY_STRING_ARRAY );
- LdapDN parentDn = null;
+ DN parentDn = null;
if ( wizard.getSelectedEntry() != null && newEntry.getDn().equals( wizard.getSelectedEntry().getDn() )
&& DnUtils.getParent( newEntry.getDn() ) != null )
{
@@ -199,7 +198,7 @@ public class NewEntryDnWizardPage extend
parentDn = DnUtils.getParent( newEntry.getDn() );
}
- Rdn rdn = newEntry.getRdn();
+ RDN rdn = newEntry.getRdn();
dnBuilderWidget.setInput( wizard.getSelectedConnection(), attributeNames, rdn, parentDn );
}
@@ -220,10 +219,10 @@ public class NewEntryDnWizardPage extend
// remove old RDN
if ( newEntry.getRdn().size() > 0 )
{
- Iterator<AttributeTypeAndValue> atavIterator = newEntry.getRdn().iterator();
+ Iterator<AVA> atavIterator = newEntry.getRdn().iterator();
while ( atavIterator.hasNext() )
{
- AttributeTypeAndValue atav = atavIterator.next();
+ AVA atav = atavIterator.next();
IAttribute attribute = newEntry.getAttribute( atav.getUpType() );
if ( attribute != null )
{
@@ -249,16 +248,16 @@ public class NewEntryDnWizardPage extend
}
// set new DN
- LdapDN dn;
+ DN dn;
if ( wizard.isNewContextEntry() )
{
try
{
- dn = new LdapDN( contextEntryDnCombo.getText() );
+ dn = new DN( contextEntryDnCombo.getText() );
}
- catch ( InvalidNameException e )
+ catch ( LdapInvalidDnException e )
{
- dn = LdapDN.EMPTY_LDAPDN;
+ dn = DN.EMPTY_DN;
}
}
else
@@ -270,10 +269,10 @@ public class NewEntryDnWizardPage extend
// add new RDN
if ( dn.getRdn().size() > 0 )
{
- Iterator<AttributeTypeAndValue> atavIterator = dn.getRdn().iterator();
+ Iterator<AVA> atavIterator = dn.getRdn().iterator();
while ( atavIterator.hasNext() )
{
- AttributeTypeAndValue atav = atavIterator.next();
+ AVA atav = atavIterator.next();
IAttribute rdnAttribute = newEntry.getAttribute( atav.getUpType() );
if ( rdnAttribute == null )
{
@@ -345,9 +344,9 @@ public class NewEntryDnWizardPage extend
{
dnBuilderWidget.validate();
- Rdn rdn = dnBuilderWidget.getRdn();
- LdapDN parentDn = dnBuilderWidget.getParentDn();
- final LdapDN dn = DnUtils.composeDn( rdn, parentDn );
+ RDN rdn = dnBuilderWidget.getRdn();
+ DN parentDn = dnBuilderWidget.getParentDn();
+ final DN dn = DnUtils.composeDn( rdn, parentDn );
// check if parent exists
ReadEntryRunnable readEntryRunnable1 = new ReadEntryRunnable( wizard.getSelectedConnection(), parentDn );
@@ -393,7 +392,7 @@ public class NewEntryDnWizardPage extend
{
try
{
- final LdapDN dn = new LdapDN( contextEntryDnCombo.getText() );
+ final DN dn = new DN( contextEntryDnCombo.getText() );
// check that new entry does not exists yet
ReadEntryRunnable readEntryRunnable2 = new ReadEntryRunnable( wizard.getSelectedConnection(), dn );
@@ -414,7 +413,7 @@ public class NewEntryDnWizardPage extend
return null;
}
}
- catch ( InvalidNameException e )
+ catch ( LdapInvalidDnException e )
{
return null;
}
Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java?rev=1005180&r1=1005179&r2=1005180&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryObjectclassWizardPage.java Wed Oct 6 17:33:40 2010
@@ -27,8 +27,8 @@ import java.util.Iterator;
import java.util.List;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
import org.apache.directory.studio.connection.ui.RunnableContextRunner;
import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
@@ -91,7 +91,7 @@ public class NewEntryObjectclassWizardPa
private NewEntryWizard wizard;
/** The available object classes. */
- private List<ObjectClassDescription> availableObjectClasses;
+ private List<ObjectClass> availableObjectClasses;
/** The available object classes instant search. */
private Text availableObjectClassesInstantSearch;
@@ -100,7 +100,7 @@ public class NewEntryObjectclassWizardPa
private TableViewer availableObjectClassesViewer;
/** The selected object classes. */
- private List<ObjectClassDescription> selectedObjectClasses;
+ private List<ObjectClass> selectedObjectClasses;
/** The selected object classes viewer. */
private TableViewer selectedObjectClassesViewer;
@@ -118,9 +118,9 @@ public class NewEntryObjectclassWizardPa
*/
public String getText( Object element )
{
- if ( element instanceof ObjectClassDescription )
+ if ( element instanceof ObjectClass )
{
- ObjectClassDescription ocd = ( ObjectClassDescription ) element;
+ ObjectClass ocd = ( ObjectClass ) element;
return SchemaUtils.toString( ocd );
}
@@ -134,10 +134,10 @@ public class NewEntryObjectclassWizardPa
*/
public Image getImage( Object element )
{
- if ( element instanceof ObjectClassDescription )
+ if ( element instanceof ObjectClass )
{
- ObjectClassDescription ocd = ( ObjectClassDescription ) element;
- switch ( ocd.getKind() )
+ ObjectClass ocd = ( ObjectClass ) element;
+ switch ( ocd.getType() )
{
case STRUCTURAL:
return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_OCD_STRUCTURAL );
@@ -172,8 +172,8 @@ public class NewEntryObjectclassWizardPa
setPageComplete( false );
this.wizard = wizard;
- this.availableObjectClasses = new ArrayList<ObjectClassDescription>();
- this.selectedObjectClasses = new ArrayList<ObjectClassDescription>();
+ this.availableObjectClasses = new ArrayList<ObjectClass>();
+ this.selectedObjectClasses = new ArrayList<ObjectClass>();
}
@@ -185,9 +185,9 @@ public class NewEntryObjectclassWizardPa
if ( !selectedObjectClasses.isEmpty() )
{
boolean hasOneStructuralOC = false;
- for ( ObjectClassDescription ocd : selectedObjectClasses )
+ for ( ObjectClass ocd : selectedObjectClasses )
{
- if ( ocd.getKind() == ObjectClassTypeEnum.STRUCTURAL )
+ if ( ocd.getType() == ObjectClassTypeEnum.STRUCTURAL )
{
hasOneStructuralOC = true;
break;
@@ -235,7 +235,7 @@ public class NewEntryObjectclassWizardPa
{
if ( !ocValue.isEmpty() )
{
- ObjectClassDescription ocd = wizard.getSelectedConnection().getSchema()
+ ObjectClass ocd = wizard.getSelectedConnection().getSchema()
.getObjectClassDescription( ocValue.getStringValue() );
availableObjectClasses.remove( ocd );
selectedObjectClasses.add( ocd );
@@ -272,7 +272,7 @@ public class NewEntryObjectclassWizardPa
{
ocAttribute.deleteValue( value );
}
- for ( ObjectClassDescription ocd : selectedObjectClasses )
+ for ( ObjectClass ocd : selectedObjectClasses )
{
ocAttribute.addValue( new Value( ocAttribute, ocd.getNames().get( 0 ) ) );
}
@@ -479,14 +479,14 @@ public class NewEntryObjectclassWizardPa
Iterator<?> it = selection.iterator();
while ( it.hasNext() )
{
- ObjectClassDescription ocd = ( ObjectClassDescription ) it.next();
+ ObjectClass ocd = ( ObjectClass ) it.next();
if ( availableObjectClasses.contains( ocd ) && !selectedObjectClasses.contains( ocd ) )
{
availableObjectClasses.remove( ocd );
selectedObjectClasses.add( ocd );
// recursively add superior object classes
- List<ObjectClassDescription> superiorObjectClassDescriptions = SchemaUtils
+ List<ObjectClass> superiorObjectClassDescriptions = SchemaUtils
.getSuperiorObjectClassDescriptions( ocd, schema );
if ( !superiorObjectClassDescriptions.isEmpty() )
{
@@ -520,14 +520,14 @@ public class NewEntryObjectclassWizardPa
Iterator<?> it = selection.iterator();
while ( it.hasNext() )
{
- ObjectClassDescription ocd = ( ObjectClassDescription ) it.next();
+ ObjectClass ocd = ( ObjectClass ) it.next();
if ( !availableObjectClasses.contains( ocd ) && selectedObjectClasses.contains( ocd ) )
{
selectedObjectClasses.remove( ocd );
availableObjectClasses.add( ocd );
// recursively remove sub object classes
- List<ObjectClassDescription> subObjectClassDescriptions = SchemaUtils
+ List<ObjectClass> subObjectClassDescriptions = SchemaUtils
.getSuperiorObjectClassDescriptions( ocd, schema );
if ( !subObjectClassDescriptions.isEmpty() )
{
@@ -537,10 +537,10 @@ public class NewEntryObjectclassWizardPa
}
// re-add superior object classes of remaining object classes
- List<ObjectClassDescription> copy = new ArrayList<ObjectClassDescription>( selectedObjectClasses );
- for ( ObjectClassDescription ocd : copy )
+ List<ObjectClass> copy = new ArrayList<ObjectClass>( selectedObjectClasses );
+ for ( ObjectClass ocd : copy )
{
- List<ObjectClassDescription> superiorObjectClassDescriptions = SchemaUtils
+ List<ObjectClass> superiorObjectClassDescriptions = SchemaUtils
.getSuperiorObjectClassDescriptions( ocd, schema );
if ( !superiorObjectClassDescriptions.isEmpty() )
{
@@ -579,9 +579,9 @@ public class NewEntryObjectclassWizardPa
*/
public boolean select( Viewer viewer, Object parentElement, Object element )
{
- if ( element instanceof ObjectClassDescription )
+ if ( element instanceof ObjectClass )
{
- ObjectClassDescription ocd = ( ObjectClassDescription ) element;
+ ObjectClass ocd = ( ObjectClass ) element;
Collection<String> lowerCaseIdentifiers = SchemaUtils.getLowerCaseIdentifiers( ocd );
for ( String s : lowerCaseIdentifiers )
{
Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java?rev=1005180&r1=1005179&r2=1005180&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java Wed Oct 6 17:33:40 2010
@@ -21,7 +21,7 @@
package org.apache.directory.studio.ldapbrowser.common.wizards;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
import org.apache.directory.studio.connection.ui.RunnableContextRunner;
import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
@@ -141,7 +141,7 @@ public class NewEntryTypeWizardPage exte
if ( templateButton.getSelection() )
{
final IBrowserConnection browserConnection = entryWidget.getBrowserConnection();
- final LdapDN dn = entryWidget.getDn();
+ final DN dn = entryWidget.getDn();
IEntry templateEntry = null;
if ( browserConnection == null )
@@ -227,7 +227,7 @@ public class NewEntryTypeWizardPage exte
}
else
{
- wizard.setPrototypeEntry( new DummyEntry( new LdapDN(), wizard.getSelectedConnection() ) );
+ wizard.setPrototypeEntry( new DummyEntry( new DN(), wizard.getSelectedConnection() ) );
}
return super.getNextPage();
Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java?rev=1005180&r1=1005179&r2=1005180&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java Wed Oct 6 17:33:40 2010
@@ -21,7 +21,7 @@
package org.apache.directory.studio.ldapbrowser.common.wizards;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.studio.connection.ui.RunnableContextRunner;
import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
@@ -186,7 +186,7 @@ public class NewEntryWizard extends Wiza
originalReadOnlyFlag = selectedConnection.getConnection().isReadOnly();
selectedConnection.getConnection().setReadOnly( true );
}
- prototypeEntry = new DummyEntry( new LdapDN(), selectedConnection );
+ prototypeEntry = new DummyEntry( new DN(), selectedConnection );
}
}
Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/RenameValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/RenameValueEditor.java?rev=1005180&r1=1005179&r2=1005180&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/RenameValueEditor.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/RenameValueEditor.java Wed Oct 6 17:33:40 2010
@@ -26,7 +26,7 @@ import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
-import org.apache.directory.shared.ldap.name.Rdn;
+import org.apache.directory.shared.ldap.name.RDN;
import org.apache.directory.studio.ldapbrowser.common.dialogs.RenameEntryDialog;
import org.apache.directory.studio.ldapbrowser.common.dialogs.SimulateRenameDialogImpl;
import org.apache.directory.studio.ldapbrowser.core.jobs.RenameEntryRunnable;
@@ -141,7 +141,7 @@ public class RenameValueEditor extends C
RenameEntryDialog renameDialog = new RenameEntryDialog( parent.getShell(), entry );
if ( renameDialog.open() == Dialog.OK )
{
- Rdn newRdn = renameDialog.getRdn();
+ RDN newRdn = renameDialog.getRdn();
if ( newRdn != null && !newRdn.equals( entry.getRdn() ) )
{
IEntry originalEntry = entry.getBrowserConnection().getEntryFromCache( entry.getDn() );
Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java?rev=1005180&r1=1005179&r2=1005180&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java Wed Oct 6 17:33:40 2010
@@ -29,8 +29,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
-import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescription;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.LdapSyntax;
import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy;
@@ -241,13 +241,13 @@ public class ValueEditorManager
return userSelectedValueEditor;
}
- AttributeTypeDescription atd = schema.getAttributeTypeDescription( attributeType );
+ AttributeType atd = schema.getAttributeTypeDescription( attributeType );
// check attribute preferences
Map<String, String> attributeValueEditorMap = BrowserCommonActivator.getDefault().getValueEditorsPreferences()
.getAttributeValueEditorMap();
- if ( atd.getNumericOid() != null && attributeValueEditorMap.containsKey( atd.getNumericOid().toLowerCase() ) )
+ if ( atd.getOid() != null && attributeValueEditorMap.containsKey( atd.getOid().toLowerCase() ) )
{
- return ( IValueEditor ) class2ValueEditors.get( attributeValueEditorMap.get( atd.getNumericOid()
+ return ( IValueEditor ) class2ValueEditors.get( attributeValueEditorMap.get( atd.getOid()
.toLowerCase() ) );
}
List<String> names = atd.getNames();
@@ -269,7 +269,7 @@ public class ValueEditorManager
}
// return default
- LdapSyntaxDescription lsd = schema.getLdapSyntaxDescription( syntaxNumericOid );
+ LdapSyntax lsd = schema.getLdapSyntaxDescription( syntaxNumericOid );
if ( SchemaUtils.isBinary( lsd ) )
{
return defaultBinaryValueEditor;
@@ -420,7 +420,7 @@ public class ValueEditorManager
{
List<IValueEditor> alternativeList = new ArrayList<IValueEditor>();
- AttributeTypeDescription atd = schema.getAttributeTypeDescription( attributeName );
+ AttributeType atd = schema.getAttributeTypeDescription( attributeName );
if ( SchemaUtils.isBinary( atd, schema ) )
{