Examples of LdifCommentLine


Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.lines.LdifCommentLine

    {
        LdifToken commentToken = this.scanner.matchComment();
        if ( commentToken != null )
        {
            LdifToken sepToken = this.scanner.matchSep();
            record.addComment( new LdifCommentLine( commentToken.getOffset(), getValueOrNull( commentToken ),
                getValueOrNull( sepToken ) ) );
            return true;
        }
        else
        {
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.lines.LdifCommentLine

                {
                    LdifCommentContainer commentContainer = null;
                    while ( commentToken != null )
                    {
                        LdifToken commentSepToken = this.scanner.matchSep();
                        LdifCommentLine commentLine = new LdifCommentLine( commentToken.getOffset(),
                            getValueOrNull( commentToken ), getValueOrNull( commentSepToken ) );

                        if ( commentContainer == null )
                        {
                            commentContainer = new LdifCommentContainer( commentLine );
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.lines.LdifCommentLine

        LdifToken commentToken = this.scanner.matchComment();
        while ( commentToken != null )
        {
            LdifToken sepToken = this.scanner.matchSep();
            list
                .add( new LdifCommentLine( commentToken.getOffset(), commentToken.getValue(), getValueOrNull( sepToken ) ) );

            commentToken = this.scanner.matchComment();
        }
        return ( LdifCommentLine[] ) list.toArray( new LdifCommentLine[list.size()] );
    }
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.lines.LdifCommentLine

            DateFormat df = new SimpleDateFormat( BrowserCoreConstants.DATEFORMAT );

            String errorComment = "#!ERROR " + e.getMessage(); //$NON-NLS-1$
            errorComment = errorComment.replaceAll( "\r", " " ); //$NON-NLS-1$ //$NON-NLS-2$
            errorComment = errorComment.replaceAll( "\n", " " ); //$NON-NLS-1$ //$NON-NLS-2$
            LdifCommentLine errorCommentLine = LdifCommentLine.create( errorComment );

            logWriter.write( LdifCommentLine.create( "#!RESULT ERROR" ).toFormattedString() ); //$NON-NLS-1$
            logWriter.write( LdifCommentLine.create(
                "#!CONNECTION ldap://" + connection.getHost() + ":" + connection.getPort() ).toFormattedString() ); //$NON-NLS-1$ //$NON-NLS-2$
            logWriter.write( LdifCommentLine.create( "#!DATE " + df.format( new Date() ) ).toFormattedString() ); //$NON-NLS-1$
            logWriter.write( errorCommentLine.toFormattedString() );
            logWriter.write( record.toFormattedString() );
        }
        catch ( IOException ioe )
        {
            monitor.reportError( BrowserCoreMessages.model__error_logging_modification, ioe );
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.lines.LdifCommentLine

            DateFormat df = new SimpleDateFormat( BrowserCoreConstants.DATEFORMAT );

            String errorComment = "#!ERROR " + e.getMessage(); //$NON-NLS-1$
            errorComment = errorComment.replaceAll( "\r", " " ); //$NON-NLS-1$ //$NON-NLS-2$
            errorComment = errorComment.replaceAll( "\n", " " ); //$NON-NLS-1$ //$NON-NLS-2$
            LdifCommentLine errorCommentLine = LdifCommentLine.create( errorComment );

            logWriter.write( LdifCommentLine.create( "#!RESULT ERROR" ).toFormattedString() ); //$NON-NLS-1$
            logWriter.write( LdifCommentLine.create(
                "#!CONNECTION ldap://" + connection.getHost() + ":" + connection.getPort() ).toFormattedString() ); //$NON-NLS-1$ //$NON-NLS-2$
            logWriter.write( LdifCommentLine.create( "#!DATE " + df.format( new Date() ) ).toFormattedString() ); //$NON-NLS-1$
            logWriter.write( errorCommentLine.toFormattedString() );
            logWriter.write( record.toFormattedString() );
        }
        catch ( IOException ioe )
        {
            monitor.reportError( BrowserCoreMessages.model__error_logging_modification, ioe );
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifCommentLine

            DateFormat df = new SimpleDateFormat( BrowserCoreConstants.DATEFORMAT );

            String errorComment = "#!ERROR " + e.getMessage(); //$NON-NLS-1$
            errorComment = errorComment.replaceAll( "\r", " " ); //$NON-NLS-1$ //$NON-NLS-2$
            errorComment = errorComment.replaceAll( "\n", " " ); //$NON-NLS-1$ //$NON-NLS-2$
            LdifCommentLine errorCommentLine = LdifCommentLine.create( errorComment );

            logWriter.write( LdifCommentLine.create( "#!RESULT ERROR" ).toFormattedString() ); //$NON-NLS-1$
            logWriter.write( LdifCommentLine.create(
                "#!CONNECTION ldap://" + connection.getHost() + ":" + connection.getPort() ).toFormattedString() ); //$NON-NLS-1$ //$NON-NLS-2$
            logWriter.write( LdifCommentLine.create( "#!DATE " + df.format( new Date() ) ).toFormattedString() ); //$NON-NLS-1$
            logWriter.write( errorCommentLine.toFormattedString() );
            logWriter.write( record.toFormattedString() );
        }
        catch ( IOException ioe )
        {
            monitor.reportError( BrowserCoreMessages.model__error_logging_modification, ioe );
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifCommentLine

    {
        LdifToken commentToken = this.scanner.matchComment();
        if ( commentToken != null )
        {
            LdifToken sepToken = this.scanner.matchSep();
            record.addComment( new LdifCommentLine( commentToken.getOffset(), getValueOrNull( commentToken ),
                getValueOrNull( sepToken ) ) );
            return true;
        }
        else
        {
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifCommentLine

                {
                    LdifCommentContainer commentContainer = null;
                    while ( commentToken != null )
                    {
                        LdifToken commentSepToken = this.scanner.matchSep();
                        LdifCommentLine commentLine = new LdifCommentLine( commentToken.getOffset(),
                            getValueOrNull( commentToken ), getValueOrNull( commentSepToken ) );

                        if ( commentContainer == null )
                        {
                            commentContainer = new LdifCommentContainer( commentLine );
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifCommentLine

        LdifToken commentToken = this.scanner.matchComment();
        while ( commentToken != null )
        {
            LdifToken sepToken = this.scanner.matchSep();
            list
                .add( new LdifCommentLine( commentToken.getOffset(), commentToken.getValue(), getValueOrNull( sepToken ) ) );

            commentToken = this.scanner.matchComment();
        }
        return ( LdifCommentLine[] ) list.toArray( new LdifCommentLine[list.size()] );
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifCommentLine

            DateFormat df = new SimpleDateFormat( ConnectionCoreConstants.DATEFORMAT );

            String errorComment = "#!ERROR " + exception.getMessage(); //$NON-NLS-1$
            errorComment = errorComment.replaceAll( "\r", " " ); //$NON-NLS-1$ //$NON-NLS-2$
            errorComment = errorComment.replaceAll( "\n", " " ); //$NON-NLS-1$ //$NON-NLS-2$
            LdifCommentLine errorCommentLine = LdifCommentLine.create( errorComment );

            logWriter.write( LdifCommentLine.create( "#!RESULT ERROR" )
                .toFormattedString( LdifFormatParameters.DEFAULT ) ); //$NON-NL LdifFormatParameters.DEFAULTS-1$
            logWriter
                .write( LdifCommentLine
                    .create(
                        "#!CONNECTION ldap://" + browserConnection.getConnection().getHost() + ":" + browserConnection.getConnection().getPort() ).toFormattedString( LdifFormatParameters.DEFAULT ) ); //$NON-NLS-1$ //$NON-NLS-2$
            logWriter.write( LdifCommentLine
                .create( "#!DATE " + df.format( new Date() ) ).toFormattedString( LdifFormatParameters.DEFAULT ) ); //$NON-NLS-1$
            logWriter.write( errorCommentLine.toFormattedString( LdifFormatParameters.DEFAULT ) );
            logWriter.write( record.toFormattedString( ldifFormatParameters ) );
        }
        catch ( IOException ioe )
        {
            monitor.reportError( BrowserCoreMessages.model__error_logging_modification, ioe );
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.