Examples of LdifContentRecord


Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

            model.addContainer( record );
        }
        else
        {
            // match attr-val-record
            LdifContentRecord record = new LdifContentRecord( dnLine );
            if ( dnErrorToken != null )
            {
                record.addInvalid( new LdifInvalidPart( dnErrorToken.getOffset(), dnErrorToken.getValue() ) );
            }
            for ( int i = 0; i < commentLines.length; i++ )
            {
                record.addComment( commentLines[i] );
            }
            parseAttrValRecord( record );
            model.addContainer( record );
        }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

                        SchemaConstants.MODIFY_TIMESTAMP_AT } );

                LdifEnumeration le = ExportLdifJob.search( browserConnection, sp, monitor );
                if ( le.hasNext() )
                {
                    LdifContentRecord schemaRecord = ( LdifContentRecord ) le.next();
                    schema = new Schema();
                    schema.loadFromRecord( schemaRecord );
                    browserConnection.setSchema( schema );
                }
                else
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

            {
                LdifContainer container = enumeration.next();

                if ( container instanceof LdifContentRecord )
                {
                    LdifContentRecord record = ( LdifContentRecord ) container;
                    recordToHSSFRow( browserConnection, record, sheet, headerRow, attributeNameMap, valueDelimiter,
                        binaryEncoding, exportDn );

                    count++;
                    monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__export_progress,
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

        }

        // update shared working copy
        try
        {
            LdifContentRecord modifiedRecord = ( LdifContentRecord ) records[0];
            IBrowserConnection browserConnection = input.getSharedWorkingCopy( editor ).getBrowserConnection();
            DummyEntry modifiedEntry = ModelConverter.ldifContentRecordToEntry( modifiedRecord, browserConnection );
            ( ( DummyEntry ) input.getSharedWorkingCopy( editor ) ).setDn( modifiedEntry.getDn() );
            new CompoundModification().replaceAttributes( modifiedEntry, input.getSharedWorkingCopy( editor ), this );
        }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

    }


    private void setDocumentInput( IDocument document, IEntry entry )
    {
        LdifContentRecord record = ModelConverter.entryToLdifContentRecord( entry );

        // sort attribute-value lines
        AttributeComparator comparator = new AttributeComparator( entry );
        LdifAttrValLine[] attrValLines = record.getAttrVals();
        Arrays.sort( attrValLines, comparator );
        LdifContentRecord newRecord = new LdifContentRecord( record.getDnLine() );
        for ( LdifAttrValLine attrValLine : attrValLines )
        {
            newRecord.addAttrVal( attrValLine );
        }
        newRecord.finish( record.getSepLine() );

        // format
        String newContent = newRecord.toFormattedString( Utils.getLdifFormatParameters() );

        // set content
        document.set( newContent );
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

            }

            // record --> Array of List of AttrValLine
            else if ( element instanceof LdifContentRecord )
            {
                LdifContentRecord record = ( LdifContentRecord ) element;
                return getUniqueAttrValLineArray( record.getAttrVals() );
            }
            else if ( element instanceof LdifChangeAddRecord )
            {
                LdifChangeAddRecord record = ( LdifChangeAddRecord ) element;
                return getUniqueAttrValLineArray( record.getAttrVals() );
            }
            else if ( element instanceof LdifChangeModifyRecord )
            {
                LdifChangeModifyRecord record = ( LdifChangeModifyRecord ) element;
                return record.getModSpecs();
            }
            else if ( element instanceof LdifChangeModDnRecord )
            {
                return new Object[0];
            }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

        }

        // update shared working copy
        try
        {
            LdifContentRecord modifiedRecord = ( LdifContentRecord ) records[0];
            IBrowserConnection browserConnection = input.getSharedWorkingCopy( editor ).getBrowserConnection();
            DummyEntry modifiedEntry = ModelConverter.ldifContentRecordToEntry( modifiedRecord, browserConnection );
            ( ( DummyEntry ) input.getSharedWorkingCopy( editor ) ).setDn( modifiedEntry.getDn() );
            new CompoundModification().replaceAttributes( modifiedEntry, input.getSharedWorkingCopy( editor ), this );
        }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

    }


    private void setDocumentInput( IDocument document, IEntry entry )
    {
        LdifContentRecord record = ModelConverter.entryToLdifContentRecord( entry );

        // sort attribute-value lines
        AttributeComparator comparator = new AttributeComparator( entry );
        LdifAttrValLine[] attrValLines = record.getAttrVals();
        Arrays.sort( attrValLines, comparator );
        LdifContentRecord newRecord = new LdifContentRecord( record.getDnLine() );
        for ( LdifAttrValLine attrValLine : attrValLines )
        {
            newRecord.addAttrVal( attrValLine );
        }
        newRecord.finish( record.getSepLine() );

        // format
        String newContent = newRecord.toFormattedString( Utils.getLdifFormatParameters() );

        // set content
        document.set( newContent );
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

    {
        try
        {
            EventRegistry.suspendEventFiringInCurrentThread();
            IBrowserConnection browserConnection = entry.getBrowserConnection();
            LdifContentRecord record = ModelConverter.entryToLdifContentRecord( entry );
            IEntry clonedEntry = ModelConverter.ldifContentRecordToEntry( record, browserConnection );
            return clonedEntry;
        }
        catch ( InvalidNameException e )
        {
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

        selectedConnection = entry.getBrowserConnection();

        try
        {
            EventRegistry.suspendEventFiringInCurrentThread();
            LdifContentRecord record = ModelConverter.entryToLdifContentRecord( selectedEntry );
            prototypeEntry = ModelConverter.ldifContentRecordToEntry( record, selectedConnection );
        }
        catch ( Exception e )
        {
            throw new RuntimeException( e );
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.