Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.netbeans.lib.cvsclient;
  
  import  org.netbeans.lib.cvsclient.admin.IAdminReader;
  import  org.netbeans.lib.cvsclient.admin.IAdminWriter;
  import  org.netbeans.lib.cvsclient.connection.IConnection;
  import  org.netbeans.lib.cvsclient.util.BugLog;
  import  org.netbeans.lib.cvsclient.util.IIgnoreFileFilter;
  
 import java.io.File;

Author(s):
Thomas Singer
 
 public final class ClientEnvironment
     implements IClientEnvironment {
 
   // Fields =================================================================
 
   private final IConnection connection;
   private final CvsRoot cvsRoot;
   private final ICvsFileSystem cvsFileSystem;
   private final ILocalFileReader localFileReader;
   private final ILocalFileWriter localFileWriter;
   private final IAdminReader adminReader;
   private final IAdminWriter adminWriter;
   private final IIgnoreFileFilter ignoreFileFilter;
   private final IFileReadOnlyHandler fileReadOnlyHandler;
   private final String charset;
   private final ICvsRootProvider cvsRootProvider;
 
   // Setup ==================================================================
 
   public ClientEnvironment(IConnection connectionFile localRootDirectoryFile adminRootDirectory, CvsRoot cvsRoot,
                            ILocalFileReader localFileReader, ILocalFileWriter localFileWriter,
                            IAdminReader adminReader, IAdminWriter adminWriter,
                            IIgnoreFileFilter ignoreFileFilter, IFileReadOnlyHandler fileReadOnlyHandler,
                            String charset) {
     this(connectionlocalRootDirectoryadminRootDirectorycvsRoot,localFileReaderlocalFileWriter ,adminReaderadminWriter,
         ignoreFileFilterfileReadOnlyHandlercharset, ICvsRootProvider.DUMMY);
   }
 
   public ClientEnvironment(IConnection connectionFile localRootDirectoryFile adminRootDirectory, CvsRoot cvsRoot,
                            ILocalFileReader localFileReader, ILocalFileWriter localFileWriter,
                            IAdminReader adminReader, IAdminWriter adminWriter,
                            IIgnoreFileFilter ignoreFileFilter, IFileReadOnlyHandler fileReadOnlyHandler,
                            String charset, ICvsRootProvider cvsRootProvider) {
     BugLog.getInstance().assertNotNull(connection);
     BugLog.getInstance().assertNotNull(localRootDirectory);
     BugLog.getInstance().assertNotNull(adminRootDirectory);
     BugLog.getInstance().assertNotNull(cvsRoot);
     BugLog.getInstance().assertNotNull(localFileReader);
     BugLog.getInstance().assertNotNull(localFileWriter);
     BugLog.getInstance().assertNotNull(adminReader);
     BugLog.getInstance().assertNotNull(adminWriter);
     BugLog.getInstance().assertNotNull(ignoreFileFilter);
     BugLog.getInstance().assertNotNull(fileReadOnlyHandler);
     BugLog.getInstance().assertNotNull(cvsRootProvider);
 
     this. = connection;
     this. = cvsRoot;
     this. = new CvsFileSystem(localRootDirectoryadminRootDirectoryconnection.getRepository());
     this. = localFileReader;
     this. = localFileWriter;
     this. = adminReader;
     this. = adminWriter;
     this. = ignoreFileFilter;
     this. = fileReadOnlyHandler;
     this. = charset;
     this. = cvsRootProvider;
   }
 
   // Implemented ============================================================
 
   public IConnection getConnection() {
     return ;
   }
 
   public ICvsFileSystem getCvsFileSystem() {
     return ;
   }
 
   public CvsRoot getCvsRoot() {
     return ;
   }
 
   public IAdminReader getAdminReader() {
     return ;
   }
 
   public IAdminWriter getAdminWriter() {
     return ;
   }
 
   public ILocalFileReader getLocalFileReader() {
     return ;
   }
 
   public ILocalFileWriter getLocalFileWriter() {
    return ;
  }
  public IIgnoreFileFilter getIgnoreFileFilter() {
    return ;
  }
  public IFileReadOnlyHandler getFileReadOnlyHandler() {
    return ;
  }
  public String getCharset() {
    return ;
  }
  public IClientEnvironment createEnvironmentForDirectory(DirectoryObject directory) {
      IConnection connection = .getConnection(directory);
      if (connection == nullreturn null;
      CvsRoot cvsRoot = .getCvsRoot(directory);
      if (cvsRoot == nullreturn null;
      return new ClientEnvironment(connection.getLocalFileSystem().getFile(directory),
          .getAdminFileSystem().getFile(directory),
          cvsRoot
  }
New to GrepCode? Check out our FAQ X