Package org.uberfire.backend.vfs

Examples of org.uberfire.backend.vfs.Path.toURI()


    @Override
    public String getRepositoryGlobalDir(String uuid) {
        if(uuid != null) {
            Path uuidPath = vfsServices.get(UriUtils.encode(uuid) );
            String pathURI = uuidPath.toURI();

            if(pathURI != "/") {
                String[] pathParts = pathURI.split("/");
                try {
                    String pathProjectName = pathParts[3];
View Full Code Here


        String processId = buildProcessId( location, name );

        String processContent = PROCESS_STUB.replaceAll( "\\$\\{processid\\}", processId.replaceAll("\\s", "") );

        AssetBuilder builder = AssetBuilderFactory.getAssetBuilder( name );
        builder.location( location ).content( processContent ).uniqueId( path.toURI() );
        Asset<String> processAsset = builder.getAsset();

        repository.createAsset( processAsset );
        return path;
    }
View Full Code Here

            }
            for ( KProperty property : kObject.getProperties() ) {
                if ( property.getName().equals( "rule_attribute:ruleflow-group:rule_attribute_value" ) ) {
                    if(ruleFlowGroupNames.containsKey(property.getValue().toString())) {
                        final Path path = Paths.convert(ioService.get(URI.create(kObject.getKey())));
                        ruleFlowGroupNames.get(property.getValue().toString()).add(path.getFileName() + "^^" + path.toURI());
                    } else {
                        final Path path = Paths.convert(ioService.get(URI.create(kObject.getKey())));
                        List<String> pathsList = new ArrayList<String>();
                        pathsList.add(path.getFileName() + "^^" + path.toURI());
                        ruleFlowGroupNames.put(property.getValue().toString(), pathsList);
View Full Code Here

                        final Path path = Paths.convert(ioService.get(URI.create(kObject.getKey())));
                        ruleFlowGroupNames.get(property.getValue().toString()).add(path.getFileName() + "^^" + path.toURI());
                    } else {
                        final Path path = Paths.convert(ioService.get(URI.create(kObject.getKey())));
                        List<String> pathsList = new ArrayList<String>();
                        pathsList.add(path.getFileName() + "^^" + path.toURI());
                        ruleFlowGroupNames.put(property.getValue().toString(), pathsList);
                    }
                }
            }
            return ruleFlowGroupNames;
View Full Code Here

        final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath( rootUrl.toURI() );
        final Path rootPath = paths.convert( nioRootPath );

        //Test a root resolves to the Project's root
        final Project result = projectService.resolveProject( rootPath );
        assertEquals( rootPath.toURI(),
                      result.getRootPath().toURI() );
    }

    @Test
    public void testResolveProjectWithChildPath() throws Exception {
View Full Code Here

        for ( int i = 0; i < THREADS; i++ ) {
            es.execute( new Runnable() {
                @Override
                public void run() {
                    try {
                        System.out.println( "Thread " + Thread.currentThread().getName() + " has started for " + resourcePath.toURI() );
                        buildChangeListener.updateResource( resourcePath );
                        System.out.println( "Thread " + Thread.currentThread().getName() + " has completed for " + resourcePath.toURI() );
                    } catch ( Throwable e ) {
                        result.setFailed( true );
                        result.setMessage( e.getMessage() );
View Full Code Here

                @Override
                public void run() {
                    try {
                        System.out.println( "Thread " + Thread.currentThread().getName() + " has started for " + resourcePath.toURI() );
                        buildChangeListener.updateResource( resourcePath );
                        System.out.println( "Thread " + Thread.currentThread().getName() + " has completed for " + resourcePath.toURI() );
                    } catch ( Throwable e ) {
                        result.setFailed( true );
                        result.setMessage( e.getMessage() );
                        System.out.println( e.getMessage() );
                    }
View Full Code Here

            final Path p = ( i % 5 == 0 ) ? pomPath : resourcePath;
            es.execute( new Runnable() {
                @Override
                public void run() {
                    try {
                        System.out.println( "Thread " + Thread.currentThread().getName() + " has started for " + p.toURI() );
                        buildChangeListener.updateResource( p );
                        System.out.println( "Thread " + Thread.currentThread().getName() + " has completed " + p.toURI() );
                    } catch ( Throwable e ) {
                        result.setFailed( true );
                        result.setMessage( e.getMessage() );
View Full Code Here

                @Override
                public void run() {
                    try {
                        System.out.println( "Thread " + Thread.currentThread().getName() + " has started for " + p.toURI() );
                        buildChangeListener.updateResource( p );
                        System.out.println( "Thread " + Thread.currentThread().getName() + " has completed " + p.toURI() );
                    } catch ( Throwable e ) {
                        result.setFailed( true );
                        result.setMessage( e.getMessage() );
                        System.out.println( e.getMessage() );
                    }
View Full Code Here

        //Perform incremental build
        PortablePreconditions.checkNotNull( "resourceAddedEvent",
                                            resourceAddedEvent );
        final Path resource = resourceAddedEvent.getPath();
        log.info( "Incremental build request received for: " + resource.toURI() + " (added)." );

        //If resource is not within a Package it cannot be used for an incremental build
        final Package pkg = projectService.resolvePackage( resource );
        if ( pkg == null ) {
            return;
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.