Package org.uberfire.backend.vfs

Examples of org.uberfire.backend.vfs.Path


        try {
            final String drl = assertPackageName( content,
                                                  context );

            final org.uberfire.java.nio.file.Path nioPath = Paths.convert( context ).resolve( fileName );
            final Path newPath = Paths.convert( nioPath );

            if ( ioService.exists( nioPath ) ) {
                throw new FileAlreadyExistsException( nioPath.toString() );
            }
View Full Code Here


    public void create( final Package pkg,
                        final String baseFileName,
                        final NewResourcePresenter presenter ) {
        busyIndicatorView.showBusyIndicator( ScoreCardXLSEditorConstants.INSTANCE.Uploading() );

        final Path path = pkg.getPackageMainResourcesPath();
        final String fileName = buildFileName( resourceType,
                                               baseFileName );
        final Path newPath = PathFactory.newPath( path.getFileSystem(),
                                                  fileName,
                                                  path.toURI() + "/" + fileName );

        uploadWidget.submit( path,
                             fileName,
View Full Code Here

                        final String fileName,
                        final String content,
                        final String comment ) {
        try {
            final org.uberfire.java.nio.file.Path nioPath = Paths.convert( context ).resolve( fileName );
            final Path newPath = Paths.convert( nioPath );

            if ( ioService.exists( nioPath ) ) {
                throw new FileAlreadyExistsException( nioPath.toString() );
            }
View Full Code Here

            rowIndex++;
        }

        //Save it!
        final String baseFileName = summaryPage.getBaseFileName();
        final Path contextPath = context.getContextPath();
        model.setTableName( baseFileName );
        handler.save( baseFileName,
                      contextPath,
                      model,
                      new Command() {
View Full Code Here

            final Package pkg = projectService.resolvePackage( context );
            final String packageName = ( pkg == null ? null : pkg.getPackageName() );
            content.setPackageName( packageName );

            final org.uberfire.java.nio.file.Path nioPath = Paths.convert( context ).resolve( fileName );
            final Path newPath = Paths.convert( nioPath );

            ioService.createFile( nioPath );
            ioService.write( nioPath,
                             GuidedScoreCardXMLPersistence.getInstance().marshal( content ),
                             makeCommentedOption( comment ) );
View Full Code Here

            final Package pkg = projectService.resolvePackage( context );
            final String packageName = ( pkg == null ? null : pkg.getPackageName() );
            content.setPackageName( packageName );

            final org.kie.commons.java.nio.file.Path nioPath = paths.convert( context ).resolve( fileName );
            final Path newPath = paths.convert( nioPath,
                                                false );

            ioService.createFile( nioPath );
            ioService.write( nioPath,
                             BRDRTXMLPersistence.getInstance().marshal( content ),
View Full Code Here

        //Perform conversion!
        final GuidedDecisionTableGeneratorListener listener = parseAssets( path,
                                                                           result );

        //Root path for new resources is the same folder as the XLS file
        final Path context = Paths.convert( Paths.convert( path ).getParent() );

        //Add Ancillary resources
        createNewImports( context,
                          listener.getImports(),
                          result );
View Full Code Here

        }

        //Load existing PackageImports
        ProjectImports projectImports = new ProjectImports();
        final org.uberfire.java.nio.file.Path nioExternalImportsPath = Paths.convert( context ).resolve( "project.imports" );
        final Path externalImportsPath = Paths.convert( nioExternalImportsPath );
        if ( Files.exists( nioExternalImportsPath ) ) {
            projectImports = importsService.load( externalImportsPath );
        }

        //Make collections of existing Imports so we don't duplicate them when adding the new
View Full Code Here

                          outputStream );
            outputStream.flush();
            outputStream.close();

            //Read Path to ensure attributes have been set
            final Path newPath = Paths.convert( nioPath );

            return newPath;
        } catch ( Exception e ) {
            log.error( e.getMessage(),
                       e );
View Full Code Here

                          outputStream );
            outputStream.flush();
            outputStream.close();

            //Read Path to ensure attributes have been set
            final Path newPath = Paths.convert( nioPath );

            return newPath;

        } catch ( Exception e ) {
            log.error( e.getMessage(),
View Full Code Here

TOP

Related Classes of org.uberfire.backend.vfs.Path

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.