Package org.kie.workbench.common.services.datamodel.backend.server.builder.util

Examples of org.kie.workbench.common.services.datamodel.backend.server.builder.util.DataEnumLoader


    public KObject toKObject( final Path path ) {
        KObject index = null;

        try {
            final String enumDefinition = ioService.readAllString( path );
            final DataEnumLoader enumLoader = new DataEnumLoader( enumDefinition );
            if ( enumLoader.hasErrors() ) {
                logger.info( "Unable to index '" + path.toUri().toString() + "'. Related errors follow:" );
                for ( String e : enumLoader.getErrors() ) {
                    logger.info( e );
                }
                return index;
            }
View Full Code Here


    }

    private List<ValidationMessage> doValidation( final Path path,
                                                  final String content ) {
        try {
            final DataEnumLoader loader = new DataEnumLoader( content );
            if ( !loader.hasErrors() ) {
                return Collections.emptyList();
            } else {
                final List<ValidationMessage> validationMessages = new ArrayList<ValidationMessage>();
                final List<String> loaderErrors = loader.getErrors();

                for ( final String message : loaderErrors ) {
                    validationMessages.add( makeValidationMessages( path,
                                                                    message ) );
                }
View Full Code Here

                                                  final String content ) {
        try {
            final Project project = projectService.resolveProject( path );
            final KieModule module = builderCache.assertBuilder( project ).getKieModuleIgnoringErrors();
            final ClassLoader classLoader = KieModuleMetaData.Factory.newKieModuleMetaData( module ).getClassLoader();
            final DataEnumLoader loader = new DataEnumLoader( content,
                                                              classLoader );
            if ( !loader.hasErrors() ) {
                return Collections.emptyList();
            } else {
                final List<ValidationMessage> validationMessages = new ArrayList<ValidationMessage>();
                final List<String> loaderErrors = loader.getErrors();

                for ( final String message : loaderErrors ) {
                    validationMessages.add( makeValidationMessages( path,
                                                                    message ) );
                }
View Full Code Here

    public KObject toKObject( final Path path ) {
        KObject index = null;

        try {
            final String enumDefinition = ioService.readAllString( path );
            final DataEnumLoader enumLoader = new DataEnumLoader( enumDefinition );
            if ( enumLoader.hasErrors() ) {
                logger.info( "Unable to index '" + path.toUri().toString() + "'. Related errors follow:" );
                for ( String e : enumLoader.getErrors() ) {
                    logger.info( e );
                }
                return index;
            }
View Full Code Here

                                                  final String content ) {
        try {
            final KieProject project = projectService.resolveProject( path );
            final KieModule module = builderCache.assertBuilder( project ).getKieModuleIgnoringErrors();
            final ClassLoader classLoader = KieModuleMetaData.Factory.newKieModuleMetaData( module ).getClassLoader();
            final DataEnumLoader loader = new DataEnumLoader( content,
                                                              classLoader );
            if ( !loader.hasErrors() ) {
                return Collections.emptyList();
            } else {
                final List<ValidationMessage> validationMessages = new ArrayList<ValidationMessage>();
                final List<String> loaderErrors = loader.getErrors();

                for ( final String message : loaderErrors ) {
                    validationMessages.add( makeValidationMessages( path,
                                                                    message ) );
                }
View Full Code Here

    public KObject toKObject( final Path path ) {
        KObject index = null;

        try {
            final String enumDefinition = ioService.readAllString( path );
            final DataEnumLoader enumLoader = new DataEnumLoader( enumDefinition );
            if ( enumLoader.hasErrors() ) {
                logger.info( "Unable to index '" + path.toUri().toString() + "'. Related errors follow:" );
                for ( String e : enumLoader.getErrors() ) {
                    logger.info( e );
                }
                return index;
            }
View Full Code Here

                                                  final String content ) {
        try {
            final Project project = projectService.resolveProject( path );
            final KieModule module = builderCache.assertBuilder( project ).getKieModuleIgnoringErrors();
            final ClassLoader classLoader = KieModuleMetaData.Factory.newKieModuleMetaData( module ).getClassLoader();
            final DataEnumLoader loader = new DataEnumLoader( content,
                                                              classLoader );
            if ( !loader.hasErrors() ) {
                return Collections.emptyList();
            } else {
                final List<ValidationMessage> validationMessages = new ArrayList<ValidationMessage>();
                final List<String> loaderErrors = loader.getErrors();

                for ( final String message : loaderErrors ) {
                    validationMessages.add( makeValidationMessages( path,
                                                                    message ) );
                }
View Full Code Here

                                                  final String content ) {
        try {
            final KieProject project = projectService.resolveProject( path );
            final KieModule module = builderCache.assertBuilder( project ).getKieModuleIgnoringErrors();
            final ClassLoader classLoader = KieModuleMetaData.Factory.newKieModuleMetaData( module ).getClassLoader();
            final DataEnumLoader loader = new DataEnumLoader( content,
                                                              classLoader );
            if ( !loader.hasErrors() ) {
                return Collections.emptyList();
            } else {
                final List<ValidationMessage> validationMessages = new ArrayList<ValidationMessage>();
                final List<String> loaderErrors = loader.getErrors();

                for ( final String message : loaderErrors ) {
                    validationMessages.add( makeValidationMessages( path,
                                                                    message ) );
                }
View Full Code Here

TOP

Related Classes of org.kie.workbench.common.services.datamodel.backend.server.builder.util.DataEnumLoader

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.