Examples of addAttribute()


Examples of org.apache.directory.api.ldap.codec.decorators.SearchResultEntryDecorator.addAttribute()

        {
            type = Strings.utf8ToString( tlv.getValue().getData() );

            try
            {
                searchResultEntry.addAttribute( type );
            }
            catch ( LdapException ine )
            {
                // This is for the client side. We will never decode LdapResult on the server
                String msg = "The Attribute type " + type + "is invalid : " + ine.getMessage();

Examples of org.apache.directory.api.ldap.model.ldif.LdifEntry.addAttribute()

        ldif.setDn( dnstr );
        ldif.setChangeType( ChangeType.Add );

        Attribute attr = new DefaultAttribute( "objectClass",
            "top", "person", "organizationalPerson", "inetOrgPerson" );
        ldif.addAttribute( attr );

        attr = new DefaultAttribute( "ou", "Engineering", "People" );
        ldif.addAttribute( attr );

        String uid = dn.getRdn().getNormValue().getString();

Examples of org.apache.directory.ldapstudio.browser.core.internal.model.DummyEntry.addAttribute()

            // set new objectClass values
            IAttribute ocAttribute = newEntry.getAttribute( IAttribute.OBJECTCLASS_ATTRIBUTE );
            if ( ocAttribute == null )
            {
                ocAttribute = new Attribute( newEntry, IAttribute.OBJECTCLASS_ATTRIBUTE );
                newEntry.addAttribute( ocAttribute );
            }
            IValue[] values = ocAttribute.getValues();
            for ( int i = 0; i < values.length; i++ )
            {
                ocAttribute.deleteValue( values[i] );

Examples of org.apache.directory.ldapstudio.browser.core.internal.model.Entry.addAttribute()

                    if ( SchemaUtils.isModifyable( attributeToCopy.getAttributeTypeDescription() )
                        || IAttribute.REFERRAL_ATTRIBUTE.equalsIgnoreCase( attributeToCopy.getDescription() ) )
                    {
                        IAttribute newAttribute = new Attribute( newEntry, attributeToCopy.getDescription() );
                        newEntry.addAttribute( newAttribute );
                        IValue[] valuesToCopy = attributeToCopy.getValues();
                        for ( int j = 0; j < valuesToCopy.length; j++ )
                        {
                            IValue valueToCopy = valuesToCopy[j];
                            IValue newValue = new Value( newAttribute, valueToCopy.getRawValue() );

Examples of org.apache.directory.ldapstudio.browser.core.model.IEntry.addAttribute()

                    {
                        IAttribute att = entry.getAttribute( newAttributeDescription );
                        if ( att == null )
                        {
                            att = new Attribute( entry, newAttributeDescription );
                            entry.addAttribute( att ) ;
                        }

                        att.addEmptyValue();
                    }
                    catch ( ModelModificationException mme )

Examples of org.apache.directory.shared.ldap.codec.decorators.SearchResultEntryDecorator.addAttribute()

                    {
                        type = getType(tlv.getValue().getData());

                        try
                        {
                            searchResultEntry.addAttribute( type );
                        }
                        catch ( LdapException ine )
                        {
                            // This is for the client side. We will never decode LdapResult on the server
                            String msg = "The Attribute type " + type + "is invalid : " + ine.getMessage();

Examples of org.apache.directory.shared.ldap.codec.search.SearchRequest.addAttribute()

            // Attributes
            String[] returningAttributes = searchParameter.getReturningAttributes();
            for ( int i = 0; i < returningAttributes.length; i++ )
            {
                searchRequest.addAttribute( returningAttributes[i] );
            }

            // Controls
            List<org.apache.directory.shared.ldap.codec.Control> sharedLdapControls = convertToSharedLdapControls( searchParameter
                .getControls() );

Examples of org.apache.directory.shared.ldap.codec.search.SearchRequestCodec.addAttribute()

        if ( attributes != null )
        {
            for ( String attribute : attributes )
            {
                request.addAttribute( attribute );
            }
        }

        // Add the controls
        setControls( searchRequest.getControls(), request );

Examples of org.apache.directory.shared.ldap.ldif.LdifEntry.addAttribute()

            Set<AttributeType> list = addEntry.getAttributeTypes();
           
            for ( AttributeType attributeType:list )
            {
                ldif.addAttribute( ((ServerAttribute)addEntry.get( attributeType) ).toClientAttribute() );
            }
           
            log( opRevision, ldif );
        }

Examples of org.apache.directory.shared.ldap.model.ldif.LdifEntry.addAttribute()

        Set<AttributeType> list = addEntry.getAttributeTypes();
       
        for ( AttributeType attributeType:list )
        {
            forward.addAttribute( addEntry.get( attributeType).clone() );
        }
       
        LdifEntry reverse = LdifRevertor.reverseAdd( addContext.getDn() );
        addContext.setChangeLogEvent( changeLog.log( getPrincipal(), forward, reverse ) );
    }
TOP
Copyright © 2015 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.