Package org.apache.directory.shared.ldap.name

Examples of org.apache.directory.shared.ldap.name.LdapDN


        // add description
        List<Modification> modifications = new ArrayList<Modification>();
        modifications.add( new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE, new DefaultClientAttribute(
            "description", "The 1st description." ) ) );
        ldapServer.getDirectoryService().getAdminSession().modify( new LdapDN( "uid=admin,ou=system" ), modifications );

        // refresh the search, using the toolbar icon
        srEditorBot.refresh();
        SWTUtils.sleep( 1000 );
View Full Code Here


    {
        Object o = super.getRawValue( value );
        if ( o != null && o instanceof String )
        {
            IBrowserConnection connection = value.getAttribute().getEntry().getBrowserConnection();
            LdapDN dn = value.getAttribute().getEntry().getDn();
            return new SubtreeSpecificationValueWrapper( connection, dn, value.getStringValue() );
        }

        return null;
    }
View Full Code Here

        BaseWidgetUtils.createLabel( composite, Messages.getString( "ExclusionValueEditor.label.rdn" ), 1 ); //$NON-NLS-1$
        entryWidget = new EntryWidget( connection, null, base, true );
        entryWidget.createWidget( composite );
        try
        {
            LdapDN dn = new LdapDN( initalDN );
            entryWidget.setInput( connection, dn, base, true );
        }
        catch ( InvalidNameException e )
        {
        }
View Full Code Here

                        if ( readIn.available() > 1 && connection != null )
                        {
                            int size = readIn.readInt();
                            byte[] dn = new byte[size];
                            readIn.read( dn );
                            entry = connection.getEntryFromCache( new LdapDN( new String( dn, "UTF-8" ) ) ); //$NON-NLS-1$
                        }
                        else
                        {
                            return null;
                        }
View Full Code Here

                        if ( readIn.available() > 1 && connection != null )
                        {
                            int size = readIn.readInt();
                            byte[] dn = new byte[size];
                            readIn.read( dn );
                            entry = connection.getEntryFromCache( new LdapDN( new String( dn, "UTF-8" ) ) ); //$NON-NLS-1$
                        }
                        else
                        {
                            return null;
                        }
View Full Code Here

        Composite composite = BaseWidgetUtils.createColumnContainer( outer, 3, 1 );

        BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.base" ), 1 ); //$NON-NLS-1$

        LdapDN base = subtreeSpecification.getBase();
        LdapDN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
        entryWidget = new EntryWidget( connection, base, suffix, useLocalName );
        entryWidget.createWidget( composite );
        entryWidget.addWidgetModifyListener( new WidgetModifyListener()
        {
            public void widgetModified( WidgetModifyEvent event )
View Full Code Here

     */
    private void validate()
    {
        boolean valid = true;

        LdapDN base = entryWidget.getDn();
        valid &= base != null;

        String ss = buildSubreeSpecification();

        try
View Full Code Here

        else
        {
            Collection<AttributeTypeDescription> atds = SchemaUtils.getAllAttributeTypeDescriptions( newEntry );
            String[] attributeNames = SchemaUtils.getNames( atds ).toArray( ArrayUtils.EMPTY_STRING_ARRAY );

            LdapDN parentDn = null;
            if ( wizard.getSelectedEntry() != null && newEntry.getDn().equals( wizard.getSelectedEntry().getDn() )
                && DnUtils.getParent( newEntry.getDn() ) != null )
            {
                parentDn = DnUtils.getParent( newEntry.getDn() );
            }
View Full Code Here

        // build subtree specification tree
        StringBuffer sb = new StringBuffer();
        sb.append( "{" ); //$NON-NLS-1$

        // Adding base
        LdapDN base = entryWidget.getDn();
        if ( base != null && !SubtreeValueEditor.EMPTY.equals( base.toString() ) )
        {
            sb.append( " base \"" + base.toString() + "\"," ); //$NON-NLS-1$ //$NON-NLS-2$
        }

        // Adding Minimum
        int minimum = minimumSpinner.getSelection();
        if ( minimum != 0 )
View Full Code Here

                    }
                }
            }

            // set new DN
            LdapDN dn;
            if ( wizard.isNewContextEntry() )
            {
                try
                {
                    dn = new LdapDN( contextEntryDnCombo.getText() );
                }
                catch ( InvalidNameException e )
                {
                    dn = LdapDN.EMPTY_LDAPDN;
                }
            }
            else
            {
                dn = DnUtils.composeDn( dnBuilderWidget.getRdn(), dnBuilderWidget.getParentDn() );
            }
            newEntry.setDn( dn );

            // add new RDN
            if ( dn.getRdn().size() > 0 )
            {
                Iterator<AttributeTypeAndValue> atavIterator = dn.getRdn().iterator();
                while ( atavIterator.hasNext() )
                {
                    AttributeTypeAndValue atav = atavIterator.next();
                    IAttribute rdnAttribute = newEntry.getAttribute( atav.getUpType() );
                    if ( rdnAttribute == null )
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.name.LdapDN

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.