View Javadoc

1   /*
2    * This file is part of Domingo
3    * an Open Source Java-API to Lotus Notes/Domino
4    * hosted at http://domingo.sourceforge.net
5    *
6    * Copyright (c) 2003-2007 Beck et al. projects GmbH Munich, Germany (http://www.bea.de)
7    *
8    * This library is free software; you can redistribute it and/or
9    * modify it under the terms of the GNU Lesser General Public
10   * License as published by the Free Software Foundation; either
11   * version 2.1 of the License, or (at your option) any later version.
12   *
13   * This library is distributed in the hope that it will be useful,
14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16   * Lesser General Public License for more details.
17   *
18   * You should have received a copy of the GNU Lesser General Public
19   * License along with this library; if not, write to the Free Software
20   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21   */
22  
23  package de.bea.domingo.http;
24  
25  import java.io.IOException;
26  
27  import org.apache.commons.httpclient.HttpMethod;
28  
29  /***
30   * An Http method to a Lotus Domino server.
31   * This is only a markup interface to prevent from using unsupported methods.
32   *
33   * @author <a href=mailto:kriede@users.sourceforge.net>Kurt Riede</a>
34   */
35  public interface DominoHttpMethod extends HttpMethod {
36  
37      /***
38       * Returns the response body as a string.
39       *
40       * This method respects the encoding of the response body of the content
41       * types <tt>text/html</tt> and <tt>text/xml</tt>:
42       *
43       * <dl>
44       * <dt><tt>text/html</tt></dt><dd>name of charset (encoding) is read from the <tt>Content-Type</tt> header</dd>
45       * <dt><tt>text/xml</tt></dt><dd>name of charset (encoding) is read from the XML tag in the response body</dd>
46       * </dl>
47       *
48       * @return response as String with proper encoding
49       * @throws IOException if the response cannot be read
50       */
51      String getResponseBodyString() throws IOException;
52  }