Exemple #1
0
 /**
  * This method is called by WrapperSendResponse for each wrapper setting sent back by the CVS
  * server
  *
  * @param pattern A StringPattern indicating the pattern for which the wrapper applies
  * @param option A KeywordSubstituionOption corresponding to the setting
  */
 public void addWrapper(StringPattern pattern, KeywordSubstitutionOptions option) {
   if (wrappersMap == null) {
     throw new IllegalArgumentException(
         "This method should be called " + "by WrapperSendResponse only.");
   }
   wrappersMap.put(pattern, option);
 }
Exemple #2
0
  /**
   * This method is called when a response for the ValidRequests request is received.
   *
   * @param requests A List of requests that is valid for this CVS server separated by spaces.
   */
  public void setValidRequests(String requests) {
    // We need to tokenize the requests and add it to our map

    StringTokenizer tokenizer = new StringTokenizer(requests);
    String token;
    while (tokenizer.hasMoreTokens()) {
      token = tokenizer.nextToken();
      // we just add an object with the corresponding request
      // as the key.
      validRequests.put(token, this);
    }
  }