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

Examples of org.apache.directory.server.core.entry.ServerEntry.containsAttribute()


                    LdifEntry ldifEntry = ldifEntries.get( 0 );
                    LOG.debug( "Adding entry {}", ldifEntry );

                    ServerEntry serverEntry = new DefaultServerEntry( schemaManager, ldifEntry.getEntry() );

                    if ( !serverEntry.containsAttribute( SchemaConstants.ENTRY_CSN_AT ) )
                    {
                        serverEntry.put( SchemaConstants.ENTRY_CSN_AT, defaultCSNFactory.newInstance().toString() );
                    }

                    if ( !serverEntry.containsAttribute( SchemaConstants.ENTRY_UUID_AT ) )
View Full Code Here


                    if ( !serverEntry.containsAttribute( SchemaConstants.ENTRY_CSN_AT ) )
                    {
                        serverEntry.put( SchemaConstants.ENTRY_CSN_AT, defaultCSNFactory.newInstance().toString() );
                    }

                    if ( !serverEntry.containsAttribute( SchemaConstants.ENTRY_UUID_AT ) )
                    {
                        serverEntry.put( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() );
                    }

                    // call add on the wrapped partition not on the self
View Full Code Here

                   
                    break;
                   
                case REMOVE_ATTRIBUTE :
                    // First check that the removed attribute exists
                    if ( !tempEntry.containsAttribute( attributeType ) )
                    {
                        String msg = I18n.err( I18n.ERR_55, attributeType );
                        LOG.error( msg );
                        throw new LdapNoSuchAttributeException( msg );
                    }
View Full Code Here

                    break;
               
                case REPLACE_ATTRIBUTE :
                    // The replaced attribute might not exist, it will then be a Add
                    // If there is no value, then the attribute will be removed
                    if ( !tempEntry.containsAttribute( attributeType ) )
                    {
                        if ( attribute.size() == 0 )
                        {
                            // Ignore the modification, as the attributeType does not
                            // exists in the entry
View Full Code Here

        // Check that we don't have an entryUUID AT in the incoming entry, as it's a NO-USER-MODIFICATION AT
        // Of course, we will allow if for replication (see above @TODO)
        boolean isAdmin = opContext.getSession().getAuthenticatedPrincipal().getName().equals(
            ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
       
        if ( entry.containsAttribute( SchemaConstants.ENTRY_UUID_AT ) )
        {
            if ( !isAdmin )
            {
                // Wrong !
                String message = I18n.err( I18n.ERR_30, SchemaConstants.ENTRY_UUID_AT );
View Full Code Here

        else
        {
            entry.put( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() );
        }
           
        if ( entry.containsAttribute( SchemaConstants.ENTRY_CSN_AT ) )
        {
            if ( !isAdmin )
            {
                // Wrong !
                String message =  I18n.err( I18n.ERR_30, SchemaConstants.ENTRY_CSN_AT );
View Full Code Here

                   
                    break;
                   
                case REMOVE_ATTRIBUTE :
                    // First check that the removed attribute exists
                    if ( !tempEntry.containsAttribute( attributeType ) )
                    {
                        String msg = "Trying to remove an non-existant attribute: " + attributeType;
                        LOG.error( msg );
                        throw new LdapNoSuchAttributeException( msg );
                    }
View Full Code Here

                    break;
               
                case REPLACE_ATTRIBUTE :
                    // The replaced attribute might not exist, it will then be a Add
                    // If there is no value, then the attribute will be removed
                    if ( !tempEntry.containsAttribute( attributeType ) )
                    {
                        if ( attribute.size() == 0 )
                        {
                            // Ignore the modification, as the attributeType does not
                            // exists in the 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.