package com.codenvy.flux.watcher.server;

import static com.google.common.base.Preconditions.checkNotNull;

import javax.inject.Inject;

import com.codenvy.api.core.notification.EventService;
import com.codenvy.api.project.server.ProjectService;
import com.codenvy.flux.watcher.core.RepositoryEventBus;
import com.codenvy.flux.watcher.core.spi.Project;
import com.codenvy.flux.watcher.core.spi.ProjectFactory;

public class VFSProjectFactory implements ProjectFactory {

    private FluxSyncEventService watchService;
    private ProjectService       projectService;

    @Inject
    public VFSProjectFactory(EventService eventService, RepositoryEventBus repositoryEventBus, ProjectService projectService) {
        this.projectService = projectService;
        watchService = new FluxSyncEventService(eventService, repositoryEventBus, projectService);
    }

    @Override
    public Project newProject(String projectId, String projectPath) {
        checkNotNull(projectId);
        checkNotNull(projectPath);
        
        return new VFSProject(watchService, projectService, projectId, projectPath);
    }
}

@@ -1,8 +1,525 @@
+/*******************************************************************************%0A * Copyright (c) 2014 Codenvy, S.A.%0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the Eclipse Public License v1.0%0A * which accompanies this distribution, and is available at%0A * http://www.eclipse.org/legal/epl-v10.html%0A *%0A * Contributors:%0A *   Codenvy, S.A. - initial API and implementation%0A *******************************************************************************/%0A
 package 

Add missing license header