nl.toolforge.karma.core.vc.cvsimpl
Class CVSResponseAdapter

java.lang.Object
  extended bynl.toolforge.karma.core.vc.cvsimpl.CVSResponseAdapter
All Implemented Interfaces:
org.netbeans.lib.cvsclient.event.CVSListener

public final class CVSResponseAdapter
extends java.lang.Object
implements org.netbeans.lib.cvsclient.event.CVSListener

Adapts a response from CVS to Karma specific messages. This class listens to CVS responses as per the Netbeans API. Success messages are sent to the CommandResponse instance (which can optionally be registered with this instance). Errors are thrown as CVSRuntimeExceptions

Version:
$Id: CVSResponseAdapter.java,v 1.3 2004/11/16 22:31:57 asmedes Exp $
Author:
D.A. Smedes

Constructor Summary
CVSResponseAdapter()
           
CVSResponseAdapter(CommandResponse response)
          This class can use a CommandResponseListener to send cvs events to.
 
Method Summary
 void commandTerminated(org.netbeans.lib.cvsclient.event.TerminationEvent event)
          Copied from the Netbeans API documentation : Called when server responses with "ok" or "error", (when the command finishes)
 void fileAdded(org.netbeans.lib.cvsclient.event.FileAddedEvent event)
          Copied from the Netbeans API documentation : Called when a file has been added.
 void fileInfoGenerated(org.netbeans.lib.cvsclient.event.FileInfoEvent event)
          Copied from the Netbeans API documentation : Called when file information has been received.
 void fileRemoved(org.netbeans.lib.cvsclient.event.FileRemovedEvent event)
          Copied from the Netbeans API documentation : Called when a file is removed.
 void fileUpdated(org.netbeans.lib.cvsclient.event.FileUpdatedEvent event)
          Copied from the Netbeans API documentation : Called when a file has been updated.
 java.lang.Object[] getArguments(java.lang.String args)
           
 org.netbeans.lib.cvsclient.command.log.LogInformation getLogInformation()
          Gets the log that is the result of the cvs log command.
 void messageSent(org.netbeans.lib.cvsclient.event.MessageEvent event)
          Copied from the Netbeans API documentation : Called when the server wants to send a message to be displayed to the user.
 void moduleExpanded(org.netbeans.lib.cvsclient.event.ModuleExpansionEvent event)
          Copied from the Netbeans API documentation : Fire a module expansion event.
 void setArguments(java.util.Map arguments)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CVSResponseAdapter

public CVSResponseAdapter()

CVSResponseAdapter

public CVSResponseAdapter(CommandResponse response)
This class can use a CommandResponseListener to send cvs events to. For example, user interfaces can register a listener to receive events from underlying code, thus creating interactivity.

Parameters:
response -
Method Detail

setArguments

public void setArguments(java.util.Map arguments)

getArguments

public java.lang.Object[] getArguments(java.lang.String args)

fileRemoved

public void fileRemoved(org.netbeans.lib.cvsclient.event.FileRemovedEvent event)

Copied from the Netbeans API documentation : Called when a file is removed.

Specified by:
fileRemoved in interface org.netbeans.lib.cvsclient.event.CVSListener
Parameters:
event - The event from CVS.

moduleExpanded

public void moduleExpanded(org.netbeans.lib.cvsclient.event.ModuleExpansionEvent event)

Copied from the Netbeans API documentation : Fire a module expansion event. This is called when the servers has responded to an expand-modules request.

Copied from the Netbeans API documentation : This event is really intended only for the use in the Checkout command. During a checkout command, the client must ask the server to expand modules to determine whether there are aliases defined for a particular module. The client must then use the expansion to determine if a local directory exists and if so, send appropriate Modified requests etc.

Specified by:
moduleExpanded in interface org.netbeans.lib.cvsclient.event.CVSListener
Parameters:
event - The event from CVS.

fileAdded

public void fileAdded(org.netbeans.lib.cvsclient.event.FileAddedEvent event)

Copied from the Netbeans API documentation : Called when a file has been added.

Specified by:
fileAdded in interface org.netbeans.lib.cvsclient.event.CVSListener
Parameters:
event - The event from CVS.

fileInfoGenerated

public void fileInfoGenerated(org.netbeans.lib.cvsclient.event.FileInfoEvent event)

Copied from the Netbeans API documentation : Called when file information has been received.

This method constructs the LogInformation object that contains the log for a specific file as a result of the cvs log command.

Specified by:
fileInfoGenerated in interface org.netbeans.lib.cvsclient.event.CVSListener
Parameters:
event - The event from CVS.

getLogInformation

public org.netbeans.lib.cvsclient.command.log.LogInformation getLogInformation()
Gets the log that is the result of the cvs log command.

Returns:
A LogInformation that can be queried by classes for all information on a (set of) file(s).

commandTerminated

public void commandTerminated(org.netbeans.lib.cvsclient.event.TerminationEvent event)

Copied from the Netbeans API documentation : Called when server responses with "ok" or "error", (when the command finishes)

Specified by:
commandTerminated in interface org.netbeans.lib.cvsclient.event.CVSListener
Parameters:
event - The event from CVS.

fileUpdated

public void fileUpdated(org.netbeans.lib.cvsclient.event.FileUpdatedEvent event)

Copied from the Netbeans API documentation : Called when a file has been updated.

Specified by:
fileUpdated in interface org.netbeans.lib.cvsclient.event.CVSListener
Parameters:
event - The event from CVS.

messageSent

public void messageSent(org.netbeans.lib.cvsclient.event.MessageEvent event)

Copied from the Netbeans API documentation : Called when the server wants to send a message to be displayed to the user. This method is called whenever

Specified by:
messageSent in interface org.netbeans.lib.cvsclient.event.CVSListener
Parameters:
event - The event from CVS.


Copyright © 2002-2004 Toolforge. All Rights Reserved.