Examples of LdapDN


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

                    dummyEntry = ModelConverter.ldifChangeAddRecordToEntry( ( LdifChangeAddRecord ) containers[0],
                        dummyConnection );
                }
                else if ( containers[0] instanceof LdifChangeModifyRecord )
                {
                    dummyEntry = new DummyEntry( new LdapDN(), dummyConnection );
                }

                AttributeWizard wizard = new AttributeWizard( Messages
                    .getString( "EditLdifAttributeAction.EditAttributeDescription" ), true, false, //$NON-NLS-1$
                    attributeDescription, dummyEntry );
View Full Code Here

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

        if ( value != null )
        {
            try
            {
                // some value editors need the real DN (e.g. the password editor)
                DummyEntry dummyEntry = new DummyEntry( LdapDN.isValid( dn ) ? new LdapDN( dn ) : new LdapDN(),
                    connection );
                Attribute dummyAttribute = new Attribute( dummyEntry, description );
                Value dummyValue = new Value( dummyAttribute, value );
                rawValue = valueEditor.getRawValue( dummyValue );
            }
View Full Code Here

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

            ldapServer = new LdapServer();
            ldapServer.setTransports( new TcpTransport( consumerPort ) );
            ldapServer.setDirectoryService( dirService );

            LdapDN suffix = new LdapDN( config.getBaseDn() );
            JdbmPartition partition = new JdbmPartition();
            partition.setSuffix( suffix.getName() );
            partition.setId( "syncrepl" );
            partition.setPartitionDir( new File( workDir, partition.getId() ) );
            partition.setSyncOnWrite( true );
            partition.setSchemaManager( dirService.getSchemaManager() );
           
View Full Code Here

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

                EqualityNode<String> uuidEqNode = new EqualityNode<String>( SchemaConstants.ENTRY_UUID_AT, new ClientStringValue( uuid ) );
                ( ( OrNode ) filter ).addNode( uuidEqNode );
            }
        }

        LdapDN dn = new LdapDN( config.getBaseDn() );
        dn.normalize( schemaManager.getNormalizerMapping() );

        EntryFilteringCursor cursor = session.search( dn, SearchScope.SUBTREE, filter, AliasDerefMode.NEVER_DEREF_ALIASES, new HashSet() );
   
        while( cursor.next() )
        {
View Full Code Here

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

    {

        try
        {
            String cn = "entry-" + System.currentTimeMillis();
            LdapDN dn = new LdapDN( "cn=" + cn + "," + config.getBaseDn() );
            DefaultClientEntry entry = new DefaultClientEntry();
            entry.add( "objectclass", "inetOrgPerson", "organizationalPerson", "person" );
            entry.add( "cn", cn );
            entry.add( "sn", cn );
            entry.setDn( dn );
View Full Code Here

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

        try {
            service.getAdminSession().lookup(partition.getSuffixDn());
        }
        catch (LdapNameNotFoundException e) {
            try {
                LdapDN dn = new LdapDN(root);
                Assert.isTrue(root.startsWith("dc="));
                String dc = root.substring(3,root.indexOf(','));
                ServerEntry entry = service.newEntry(dn);
                entry.add("objectClass", "top", "domain", "extensibleObject");
                entry.add("dc",dc);
View Full Code Here

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

        }

        EntryEditorInput input = getEntryEditorInput( element );
        try
        {
            LdapDN newDN = new LdapDN( records[0].getDnLine().getUnfoldedDn() );
            if ( !newDN.equals( input.getResolvedEntry().getDn() ) )
            {
                throw new CoreException( new Status( IStatus.ERROR, BrowserUIConstants.PLUGIN_ID, NLS.bind( Messages
                    .getString( "LdifEntryEditorDocumentProvider.ModDnNotSupported" ), records[0].getInvalidString() ) ) ); //$NON-NLS-1$
            }
        }
View Full Code Here

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

     *
     */
    private void updateCertificate( String issuerDN, String subjectDN, Date startDate, Date expiryDate )
        throws Exception
    {
        LdapDN dn = new LdapDN( PRINCIPAL );
        List<Modification> modifications = new ArrayList<Modification>();

        // Get old key algorithm
        ClonedServerEntry entry = ldapServer.getDirectoryService().getAdminSession().lookup( dn );
        String keyAlgo = entry.get( KEY_ALGORITHM_AT ).getString();
View Full Code Here

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

            ksFile.delete();
        }
        ksFile = File.createTempFile( "testStore", "ks" );

        CoreSession session = ldapServer.getDirectoryService().getAdminSession();
        ClonedServerEntry entry = session.lookup( new LdapDN( "uid=admin,ou=system" ), new String[]
            { USER_CERTIFICATE_AT } );
        byte[] userCertificate = entry.get( USER_CERTIFICATE_AT ).getBytes();
        assertNotNull( userCertificate );

        ByteArrayInputStream in = new ByteArrayInputStream( userCertificate );
View Full Code Here

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

        connection = connectionsViewBot.createTestConnection( "ReferralDialogTest", ldapServer.getPort() );
        browserViewBot = studioBot.getBrowserView();

        // create referral entry
        ServerEntry entry = new DefaultServerEntry( ldapServer.getDirectoryService().getRegistries() );
        entry.setDn( new LdapDN( "cn=referralDialogTest,ou=system" ) );
        entry.add( "objectClass", "top", "referral", "extensibleObject" );
        entry.add( "cn", "referralDialogTest" );
        entry.add( "ref", "ldap://localhost:" + ldapServer.getPort() + "/ou=users,ou=system" );
        ldapServer.getDirectoryService().getAdminSession().add( entry );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.