Package org.dashbuilder.displayer.impl

Examples of org.dashbuilder.displayer.impl.DisplayerSettingsColumnImpl


    private List<DisplayerSettingsColumn> parseColumns( String columns ) {
        if ( columns.length() > 0) {
            String[] sa = columns.split( "," );
            List<DisplayerSettingsColumn> l = new ArrayList<DisplayerSettingsColumn>( sa.length );
            for ( int i = 0; i < sa.length; i++ ) {
                DisplayerSettingsColumnImpl dsci = new DisplayerSettingsColumnImpl();
                String[] idAlias = sa[i].trim().split( ":" );
                if ( idAlias.length == 2 ) {
                    if ( StringUtils.isBlank( idAlias[ 0 ] ) && StringUtils.isBlank( idAlias[1] ) )
                        throw new IllegalArgumentException( "You must specify at least a column alias." );

                    if ( !StringUtils.isBlank( idAlias[1] ) ) {
                        dsci.setDisplayName( idAlias[ 1 ].trim() );
                    } else dsci.setDisplayName( idAlias[0].trim() );

                    if ( !StringUtils.isBlank( idAlias[0] ) ) dsci.setColumnId( idAlias[0].trim() );

                } else {
                    if ( !StringUtils.isBlank( idAlias[0] ) ) dsci.setDisplayName( idAlias[0].trim() );
                    else throw new IllegalArgumentException( "You must specify at least a column alias." );
                }
                l.add( dsci );
            }
            return l;
View Full Code Here


    private List<DisplayerSettingsColumn> parseColumns( String columns ) {
        if ( columns.length() > 0) {
            String[] sa = columns.split( "," );
            List<DisplayerSettingsColumn> l = new ArrayList<DisplayerSettingsColumn>( sa.length );
            for ( int i = 0; i < sa.length; i++ ) {
                DisplayerSettingsColumnImpl dsci = new DisplayerSettingsColumnImpl();
                String[] idAlias = sa[i].trim().split( ":" );
                if ( idAlias.length == 2 ) {
                    if ( StringUtils.isBlank( idAlias[ 0 ] ) && StringUtils.isBlank( idAlias[1] ) )
                        throw new IllegalArgumentException( "You must specify at least a column alias." );

                    if ( !StringUtils.isBlank( idAlias[1] ) ) {
                        dsci.setDisplayName( idAlias[ 1 ].trim() );
                    } else dsci.setDisplayName( idAlias[0].trim() );

                    if ( !StringUtils.isBlank( idAlias[0] ) ) dsci.setColumnId( idAlias[0].trim() );

                } else {
                    if ( !StringUtils.isBlank( idAlias[0] ) ) dsci.setDisplayName( idAlias[0].trim() );
                    else throw new IllegalArgumentException( "You must specify at least a column alias." );
                }
                l.add( dsci );
            }
            return l;
View Full Code Here

TOP

Related Classes of org.dashbuilder.displayer.impl.DisplayerSettingsColumnImpl

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.