org.netbeans.lib.cvsclient.response
Class CreatedResponse

java.lang.Object
  extended by org.netbeans.lib.cvsclient.response.CreatedResponse
All Implemented Interfaces:
Response

public class CreatedResponse
extends java.lang.Object

Acts just like the Updated response but refuses to overwrite existing files. Server uses either only the Updated response or Created/Update-existing responses, depending on responses supported by client.


Field Summary
protected  java.lang.String localFile
          fullpath to the file being processed.
 
Constructor Summary
CreatedResponse()
           
 
Method Summary
protected  java.text.DateFormat getDateFormatter()
          Returns the DateFormatter instance that parses and formats date Strings.
protected  java.lang.String getEntryConflict(java.util.Date date, boolean hadConflicts)
          Returns the Conflict field for the file's entry.
 boolean isTerminalResponse()
          Is this a terminal response, i.e.
 void process(LoggedDataInputStream dis, ResponseServices services)
          Process the data for the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localFile

protected java.lang.String localFile
fullpath to the file being processed. Is used in Merged response when sending EnhancedMessageEvent

Constructor Detail

CreatedResponse

public CreatedResponse()
Method Detail

process

public void process(LoggedDataInputStream dis,
                    ResponseServices services)
             throws ResponseException
Process the data for the response.

Specified by:
process in interface Response
Parameters:
r - the buffered reader allowing the client to read the server's response. Note that the actual response name has already been read and the reader is positioned just before the first argument, if any.
services - various services that are useful to response handlers
Throws:
ResponseException - if something goes wrong handling this response

getEntryConflict

protected java.lang.String getEntryConflict(java.util.Date date,
                                            boolean hadConflicts)
Returns the Conflict field for the file's entry. Can be overriden by subclasses. (For example the MergedResponse that sets the "result of merge" there.)

Parameters:
date - the date to put in
hadConflicts - if there were conflicts (e.g after merge)
Returns:
the conflict field

getDateFormatter

protected java.text.DateFormat getDateFormatter()
Returns the DateFormatter instance that parses and formats date Strings. The exact format matches the one in Entry.getLastModifiedDateFormatter() method.


isTerminalResponse

public boolean isTerminalResponse()
Is this a terminal response, i.e. should reading of responses stop after this response. This is true for responses such as OK or an error response

Specified by:
isTerminalResponse in interface Response

 

Built on October 26 2010.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.