01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse.responders;
04:
05: import fitnesse.wiki.*;
06: import java.util.*;
07:
08: public class NameWikiPageResponder extends BasicWikiPageResponder {
09: protected String contentFrom(WikiPage requestedPage)
10: throws Exception {
11: StringBuffer contents = new StringBuffer();
12: for (Iterator iterator = requestedPage.getChildren().iterator(); iterator
13: .hasNext();) {
14: WikiPage child = (WikiPage) iterator.next();
15: contents.append(child.getName() + Character.LINE_SEPARATOR);
16: }
17: return contents.toString();
18: }
19:
20: protected String getContentType() {
21: return "text/plain";
22: }
23: }
|