Package org.apache.directory.server.core.entry

Examples of org.apache.directory.server.core.entry.ServerModification


       
        List<Modification> serverModifications = new ArrayList<Modification>( mods.size() );
       
        for ( Modification mod:mods )
        {
            serverModifications.add( new ServerModification( directoryService.getSchemaManager(), mod ) );
        }
       
        ModifyOperationContext opContext = new ModifyOperationContext( this, dn, serverModifications );

        opContext.setLogChange( log );
View Full Code Here


       
        List<Modification> serverModifications = new ArrayList<Modification>( mods.size() );
       
        for ( Modification mod:mods )
        {
            serverModifications.add( new ServerModification( directoryService.getSchemaManager(), mod ) );
        }

        ModifyOperationContext opContext = new ModifyOperationContext( this, dn, serverModifications );
       
        setReferralHandling( opContext, ignoreReferral );
View Full Code Here

       
        List<Modification> serverModifications = new ArrayList<Modification>( mods.size() );
       
        for ( Modification mod:mods )
        {
            serverModifications.add( new ServerModification( directoryService.getSchemaManager(), mod ) );
        }
       
        ModifyOperationContext opContext = new ModifyOperationContext( this, dn, serverModifications );

        opContext.setLogChange( log );
View Full Code Here

       
        List<Modification> serverModifications = new ArrayList<Modification>( mods.size() );
       
        for ( Modification mod:mods )
        {
            serverModifications.add( new ServerModification( directoryService.getSchemaManager(), mod ) );
        }

        ModifyOperationContext opContext = new ModifyOperationContext( this, dn, serverModifications );
       
        setReferralHandling( opContext, ignoreReferral );
View Full Code Here

        Schema schema = registries.getLoadedSchema( schemaObject.getSchemaName() );
        List<Modification> modifications = new ArrayList<Modification>();
       
        // The m-disabled AT
        EntryAttribute disabledAttr = new DefaultServerAttribute( disabledAT, "FALSE" );
        Modification disabledMod = new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, disabledAttr );
       
        modifications.add( disabledMod );
       
        // The modifiersName AT
        EntryAttribute modifiersNameAttr =
            new DefaultServerAttribute( modifiersNameAT, session.getEffectivePrincipal().getName() );
        Modification modifiersNameMod = new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, modifiersNameAttr );
       
        modifications.add( modifiersNameMod );
       
        // The modifyTimestamp AT
        EntryAttribute modifyTimestampAttr =
            new DefaultServerAttribute( modifyTimestampAT, DateUtils.getGeneralizedTime() );
        Modification modifyTimestampMod = new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, modifyTimestampAttr );
       
        modifications.add( modifyTimestampMod );
       
        // Call the modify operation
        DN dn = buildDn( schemaObject.getObjectType(), schemaObject.getName() );
View Full Code Here

                    continue;
                }
               
                EntryAttribute disable = new DefaultServerAttribute( disabledAT, "TRUE"  );
                Modification modification =
                    new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, disable );
               
                //session.modify( dn, mods, ignoreReferral, log )
            }
        }
    }
View Full Code Here

    {
        List<Modification> items = new ArrayList<Modification>( serverEntry.size() );
       
        for ( EntryAttribute attribute:serverEntry )
        {
            items.add( new ServerModification( modOp, attribute ) );
        }

        return items;
    }
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

TOP

Related Classes of org.apache.directory.server.core.entry.ServerModification

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.