alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*
 *                 Sun Public License Notice
 * 
 * The contents of this file are subject to the Sun Public License
 * Version 1.0 (the "License"). You may not use this file except in
 * compliance with the License. A copy of the License is available at
 * http://www.sun.com/
 * 
 * The Original Code is NetBeans. The Initial Developer of the Original
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
 * Microsystems, Inc. All Rights Reserved.
 */

package org.netbeans.modules.javacvs.commands;

import org.netbeans.lib.cvsclient.Client;
import org.netbeans.lib.cvsclient.command.GlobalOptions;
import org.netbeans.lib.cvsclient.util.IgnoreFileFilter;
import org.netbeans.lib.cvsclient.connection.AuthenticationException;
/**
 * Interface that is used by the FileSystemCommands and provides context that they need.
 * 
* The command should net care about opening connection/ looking up password etc. * That is handled by the ClientProvider. * * @author mkleint */ public interface ClientProvider { /** Creates an instance of the Client class. * It shouldn't be called directly by the user. * @return Instance of Client class that is needed by the library command's in order to run. * @param root CVSRoot to be used by the Client. * @throws ClientCreationException In case the creation fails for whatever reason, ClientCreationException is called. */ public Client createClient(String root) throws ClientCreationException; /** Opens a connection to server and performs authentification if nessesary. * * @param client The previously create Client object. * @param root The CVSROOT to use when looking up the password and for opening the connection in general. * @throws AuthenticationException If the client fails to establish the connection, it throws this exception. */ public void openConnection(Client client, String root) throws AuthenticationException; /** Returns an istance of the JavaCvsCommand factory that is/can be used for retrieval of FileSystemCommand instance. *
* can be null in your implementation if you are not using this feature while creating comands. (in filesystem or CommandDisplayerListeners) * @return Instance of JavaCvsCommandFactory */ public JavaCvsCommandFactory getCommandFactory(); /** ClientProvider is responsible for creating a list files that should be ignored. * This method returns this list. (is used in createClient() method and passed to the Client.) * @return List of cvs ignored files. */ public IgnoreFileFilter getIgnoreFilter(); /** Returns the GlobalOptions object. * * @return Instance of GlobalOptions */ public GlobalOptions getGlobalOptions(); /** Returns a CVSROOT string that will be used for opening connection to server. * (equals the cvs golbal option -d) * * @return String (eg. :pserver:mkleint@cvs:/my/cvsroot) */ public String getCvsRootString(); /** * returns the local path of the command. Thus the directory where the command is run. */ public String getLocalPath(); }
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.