3 * see AUTHORS for the list of contributors
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 package org.sonews.daemon.command;
21 import java.io.IOException;
22 import java.sql.SQLException;
23 import org.sonews.daemon.NNTPConnection;
27 * XPAT header range|<message-id> pat [pat...]
29 * The XPAT command is used to retrieve specific headers from
30 * specific articles, based on pattern matching on the contents of
31 * the header. This command was first available in INN.
33 * The required header parameter is the name of a header line (e.g.
34 * "subject") in a news group article. See RFC-1036 for a list
35 * of valid header lines. The required range argument may be
36 * any of the following:
38 * an article number followed by a dash to indicate
40 * an article number followed by a dash followed by
41 * another article number
43 * The required message-id argument indicates a specific
44 * article. The range and message-id arguments are mutually
45 * exclusive. At least one pattern in wildmat must be specified
46 * as well. If there are additional arguments the are joined
47 * together separated by a single space to form one complete
48 * pattern. Successful responses start with a 221 response
49 * followed by a the headers from all messages in which the
50 * pattern matched the contents of the specified header line. This
51 * includes an empty list. Once the output is complete, a period
52 * is sent on a line by itself. If the optional argument is a
53 * message-id and no such article exists, the 430 error response
54 * is returned. A 502 response will be returned if the client only
55 * has permission to transfer articles.
63 * [Source:"draft-ietf-nntp-imp-02.txt"] [Copyright: 1998 S. Barber]
65 * @author Christian Lins
68 public class XPatCommand extends AbstractCommand
71 public XPatCommand(final NNTPConnection conn)
77 public boolean hasFinished()
83 public void processLine(final String line)
84 throws IOException, SQLException
86 printStatus(500, "not (yet) supported");