Package org.apache.directory.shared.ldap.schema

Examples of org.apache.directory.shared.ldap.schema.AttributeType


    public static ServerEntry getTargetEntry( Modification mod, ServerEntry entry, SchemaManager schemaManager ) throws NamingException
    {
        ServerEntry targetEntry = ( ServerEntry ) entry.clone();
        ModificationOperation modOp = mod.getOperation();
        String id = mod.getAttribute().getId();
        AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( id );
       
        switch ( modOp )
        {
            case REPLACE_ATTRIBUTE :
                targetEntry.put( (ServerAttribute)mod.getAttribute() );
View Full Code Here


        {
            List<Modification> modifications = new ArrayList<Modification>( modificationItems.size() );

            for ( ModificationItem modificationItem: modificationItems )
            {
                AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( modificationItem.getAttribute().getID() );
                modifications.add( toServerModification( modificationItem, attributeType ) );
            }
       
            return modifications;
        }
View Full Code Here

                    throw new LdapInvalidAttributeIdentifierException( message );
                }
                else
                {
                    // TODO : handle options
                    AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( id );
                    modificationsList.add( toServerModification( modification, attributeType ) );
                }
            }
       
            return modificationsList;
View Full Code Here

                // END DIRSERVER-646 Fix
                // -------------------------------------------------------------------
               
               
                // TODO : handle options
                AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( id );
                modificationsList.add( toServerModification( (ModificationItem)modification, attributeType ) );
            }
       
            return modificationsList;
        }
View Full Code Here

            Iterator<AttributeType> descendants = schemaManager.getAttributeTypeRegistry().descendants(
                node.getAttribute() );

            while ( descendants.hasNext() )
            {
                AttributeType descendant = descendants.next();

                attr = ( ServerAttribute ) entry.get( descendant );

                //noinspection unchecked
                if ( attr != null && evaluate( ( IndexEntry<Object, ServerEntry, ID> ) indexEntry, attr ) )
View Full Code Here

            Iterator<AttributeType> descendants = schemaManager.getAttributeTypeRegistry().descendants(
                node.getAttribute() );

            while ( descendants.hasNext() )
            {
                AttributeType descendant = descendants.next();

                attr = ( ServerAttribute ) entry.get( descendant );

                if ( attr != null && evaluate( null, attr ) )
                {
View Full Code Here

        Iterator<AttributeType> list = schemaManager.getAttributeTypeRegistry().descendants( "name" );
        Set<String> nameAttrs = new HashSet<String>();
       
        while ( list.hasNext() )
        {
            AttributeType type = list.next();
            nameAttrs.add( type.getName() );
        }
       
        // We should only have 17 AT
        String[] expectedNames = new String[]
        {
View Full Code Here

   
    private Value<?> convertToValue( String oid, Object value ) throws NamingException
    {
        Value<?> val = null;
       
        AttributeType attributeType = directoryService.getSchemaManager().lookupAttributeTypeRegistry( oid );
       
        // make sure we add the request controls to operation
        if ( attributeType.getSyntax().isHumanReadable() )
        {
            if ( value instanceof String )
            {
                val = new ServerStringValue( attributeType, (String)value );
            }
View Full Code Here

       
        EntryAttribute modAttribute = modification.getAttribute();
       
        try
        {
            AttributeType at = null;
           
            if ( modAttribute instanceof ServerAttribute )
            {
                at = ((ServerAttribute)modAttribute).getAttributeType();
            }
View Full Code Here

       
        // Read the attribute OID
        String oid = in.readUTF();
       
        // Lookup for tha associated AttributeType
        AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( oid );
       
        attribute = new DefaultServerAttribute( attributeType );
       
        // Read the attribute
        ((DefaultServerAttribute)attribute).deserialize( in );
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.schema.AttributeType

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.