Package org.apache.directory.shared.ldap.entry

Examples of org.apache.directory.shared.ldap.entry.Modification


        EntryAttribute attribute = new DefaultClientAttribute( "userPassword", "replaced" );

        List<Modification> mods = new ArrayList<Modification>();
       
        Modification mod = new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
        mods.add( mod );
     
        DN userDn = new DN( "uid=akarasulu,ou=users,ou=system" );
        userDn.normalize( service.getSchemaManager().getAttributeTypeRegistry().getNormalizerMapping() );
        LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
View Full Code Here


        List<Modification> mods = new ArrayList<Modification>();
        ServerAttribute attrib = new DefaultServerAttribute( SchemaConstants.OU_AT, schemaManager
            .lookupAttributeTypeRegistry( SchemaConstants.OU_AT_OID ) );
        attrib.add( "Engineering" );

        Modification add = new ServerModification( ModificationOperation.ADD_ATTRIBUTE, attrib );

        mods.add( add );

        store.modify( dn, mods );
    }
View Full Code Here

            .lookupAttributeTypeRegistry( SchemaConstants.SURNAME_AT ) );

        String attribVal = "Walker";
        attrib.add( attribVal );

        Modification add = new ServerModification( ModificationOperation.ADD_ATTRIBUTE, attrib );
        mods.add( add );

        ServerEntry lookedup = store.lookup( store.getEntryId( dn.toNormName() ) );

        store.modify( dn, mods );
View Full Code Here

            .lookupAttributeTypeRegistry( SchemaConstants.SN_AT_OID ) );

        String attribVal = "Johnny";
        attrib.add( attribVal );

        Modification add = new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, attrib );
        mods.add( add );

        ServerEntry lookedup = store.lookup( store.getEntryId( dn.toNormName() ) );

        assertEquals( "WAlkeR", lookedup.get( "sn" ).get().getString() ); // before replacing
View Full Code Here

        List<Modification> mods = new ArrayList<Modification>();
        ServerAttribute attrib = new DefaultServerAttribute( SchemaConstants.SN_AT, schemaManager
            .lookupAttributeTypeRegistry( SchemaConstants.SN_AT_OID ) );

        Modification add = new ServerModification( ModificationOperation.REMOVE_ATTRIBUTE, attrib );
        mods.add( add );

        ServerEntry lookedup = store.lookup( store.getEntryId( dn.toNormName() ) );

        assertNotNull( lookedup.get( "sn" ).get() );
View Full Code Here

            .lookupAttributeTypeRegistry( SchemaConstants.OU_AT_OID ) );

        String attribVal = "Marketing";
        attrib.add( attribVal );

        Modification add = new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, attrib );
        mods.add( add );

        ServerEntry lookedup = store.lookup( store.getEntryId( dn.toNormName() ) );

        assertNull( lookedup.get( "ou" ) ); // before replacing
View Full Code Here

        CoreSession session = service.getAdminSession();
       
        try
        {
            ClientAttribute attr = new DefaultClientAttribute( "Description", "this is a test" );
            Modification mod = new ClientModification(
                ModificationOperation.ADD_ATTRIBUTE, attr );
            List<Modification> mods = new ArrayList<Modification>();
           
            mods.add( mod );
           
View Full Code Here

        CoreSession session = service.getAdminSession();
       
        try
        {
            ClientAttribute attr = new DefaultClientAttribute( "Description", "this is a test" );
            Modification mod = new ClientModification(
                ModificationOperation.ADD_ATTRIBUTE, attr );
            List<Modification> mods = new ArrayList<Modification>();
           
            mods.add( mod );
           
View Full Code Here

        CoreSession session = service.getAdminSession();
       
        try
        {
            ClientAttribute attr = new DefaultClientAttribute( "Description", "this is a test" );
            Modification mod = new ClientModification(
                ModificationOperation.ADD_ATTRIBUTE, attr );
            List<Modification> mods = new ArrayList<Modification>();
           
            mods.add( mod );
           
View Full Code Here

    public void testModifyExistingEntryReferralCoreAPIManageDsaIT() throws Exception
    {
        CoreSession session = service.getAdminSession();
       
        ClientAttribute attr = new DefaultClientAttribute( "Description", "This is a description" );
        Modification mod = new ClientModification(
            ModificationOperation.ADD_ATTRIBUTE, attr );
        List<Modification> mods = new ArrayList<Modification>();
       
        mods.add( mod );
       
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.entry.Modification

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.