Package org.uberfire.io

Examples of org.uberfire.io.IOService


        }

        BeanManager beanManager = CDIUtils.lookUpBeanManager(commandContext);
        logger.debug("BeanManager " + beanManager);

        IOService ioService = CDIUtils.createBean(IOService.class, beanManager, new NamedLiteral("ioStrategy"));
        logger.debug("IoService " + ioService);

        Path branchPath = ioService.get(URI.create("default://" + branchName + "@" + gitRepo));
        Path branchOriginPath = ioService.get(URI.create("default://" + branchOriginName + "@" + gitRepo));

        ioService.copy(branchOriginPath, branchPath);

        beanManager.fireEvent( new NewBranchEvent( gitRepo, branchName, Paths.convert(branchPath), System.currentTimeMillis() ) );

        ExecutionResults results = new ExecutionResults();
        return results;
View Full Code Here


    logger.debug("BeanManager " + beanManager);
   
    POMService pomService = CDIUtils.createBean(POMService.class, beanManager);   
    logger.debug("POMService " + pomService);
       
    IOService ioService = CDIUtils.createBean(IOService.class, beanManager, new NamedLiteral("ioStrategy"));
    logger.debug("IoService " + ioService);
    if (ioService != null) {

     
      ProjectService projectService = CDIUtils.createBean(ProjectService.class, beanManager);
View Full Code Here

        if (repository == null) {
            throw new IllegalArgumentException("No repository found for alias " + gitRepo);
        }


        IOService ioService = CDIUtils.createBean(IOService.class, beanManager, new NamedLiteral("ioStrategy"));
        logger.debug("IoService " + ioService);
        if (ioService != null) {
            ioService.delete(ioService.get(URI.create("default://" + branchName + "@" + gitRepo)));
        }

        ExecutionResults results = new ExecutionResults();

        return results;
View Full Code Here

        BeanManager beanManager = CDIUtils.lookUpBeanManager(commandContext);
        logger.debug("BeanManager " + beanManager);


        IOService ioService = CDIUtils.createBean(IOService.class, beanManager, new NamedLiteral("ioStrategy"));
        logger.debug("IoService " + ioService);

        Path branchPath = ioService.get(URI.create("git://" + branchName + "@" + gitRepo));

        if (compareToBranchName != null) {
            Path compareToBranchPath = ioService.get(URI.create("git://" + compareToBranchName + "@" + gitRepo));
            VersionAttributeView compareView = ioService.getFileAttributeView( compareToBranchPath, VersionAttributeView.class );
            List<VersionRecord> compareLogs = compareView.readAttributes().history().records();

            for (VersionRecord ccommit : compareLogs) {
                if (startCommitDate != null && startCommitDate.after(ccommit.date())) {
                    break;
                }
                existingCommits.add(ccommit.id());
            }
        }

        VersionAttributeView vinit = ioService.getFileAttributeView( branchPath, VersionAttributeView.class );
        List<VersionRecord> logs = vinit.readAttributes().history().records();

        List<CommitInfo> commits = new ArrayList<CommitInfo>();
        JGitFileSystem fs = (JGitFileSystem)ioService.getFileSystem(branchPath.toUri());
        Collections.reverse(logs);

        for (VersionRecord commit : logs) {

            // check if there are already commits in compare to branch
View Full Code Here

    logger.debug("BeanManager " + beanManager);
   
    BuildService buildService = CDIUtils.createBean(BuildService.class, beanManager);   
    logger.debug("BuildService " + buildService);
       
    IOService ioService = CDIUtils.createBean(IOService.class, beanManager, new NamedLiteral("ioStrategy"));
    logger.debug("IoService " + ioService);
    if (ioService != null) {
      Path projectPath  = ioService.get(URI.create(projectUri));
      logger.debug("Project path is " + projectPath);
     
      ProjectService projectService = CDIUtils.createBean(ProjectService.class, beanManager);
      Project project = projectService.resolveProject(Paths.convert(projectPath));
      if (project == null) {
View Full Code Here

                                                                   luceneSetup,
                                                                   new SimpleFieldFactory() );

        final SearchIndex searchIndex = new LuceneSearchIndex( luceneSetup );

        final IOService service = new IOServiceIndexedImpl( watchService,
                                                            indexEngine,
                                                            DublinCoreView.class,
                                                            VersionAttributeView.class,
                                                            OtherMetaView.class );
View Full Code Here

            @Override
            public FileSystem create( CreationalContext<FileSystem> ctx ) {
                final Bean<IOService> bean = (Bean<IOService>) bm.getBeans( "configIO" ).iterator().next();
                final CreationalContext<IOService> _ctx = bm.createCreationalContext( bean );
                final IOService ioService = (IOService) bm.getReference( bean, IOService.class, _ctx );

                FileSystem systemFS;
                try {
                    systemFS = ioService.newFileSystem( URI.create( "git://system" ),
                                                        new HashMap<String, Object>() {{
                                                            put( "init", Boolean.TRUE );
                                                        }} );
                } catch ( FileSystemAlreadyExistsException e ) {
                    systemFS = ioService.getFileSystem( URI.create( "git://system" ) );
                }

                return systemFS;
            }
View Full Code Here

                final Bean<ClusterServiceFactory> clusterFactoryBean = (Bean<ClusterServiceFactory>) bm.getBeans( "clusterServiceFactory" ).iterator().next();
                final CreationalContext<ClusterServiceFactory> _ctx = bm.createCreationalContext( clusterFactoryBean );
                final ClusterServiceFactory clusterServiceFactory = (ClusterServiceFactory) bm.getReference( clusterFactoryBean, ClusterServiceFactory.class, _ctx );

                final IOService result;

                if ( clusterServiceFactory == null ) {
                    result = new IOServiceNio2WrapperImpl();
                } else {
                    result = new IOServiceClusterImpl( new IOServiceNio2WrapperImpl(), clusterServiceFactory );
View Full Code Here

TOP

Related Classes of org.uberfire.io.IOService

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.