| 17 |
|
|
| 18 |
import jp.sf.pal.wiki.service.WikiContentService; |
import jp.sf.pal.wiki.service.WikiContentService; |
| 19 |
|
|
| 20 |
|
import org.apache.commons.logging.Log; |
| 21 |
|
import org.apache.commons.logging.LogFactory; |
| 22 |
import org.seasar.framework.container.S2Container; |
import org.seasar.framework.container.S2Container; |
| 23 |
|
|
| 24 |
/** |
/** |
| 26 |
* |
* |
| 27 |
*/ |
*/ |
| 28 |
public class DisplayContentPage { |
public class DisplayContentPage { |
| 29 |
|
/** |
| 30 |
|
* Logger for this class |
| 31 |
|
*/ |
| 32 |
|
private static final Log log = LogFactory.getLog(DisplayContentPage.class); |
| 33 |
|
|
| 34 |
/** |
/** |
| 35 |
* |
* |
| 40 |
|
|
| 41 |
private S2Container container; |
private S2Container container; |
| 42 |
|
|
| 43 |
public DisplayContentPage(S2Container container) { |
private WikiContentService wikiContentService; |
| 44 |
setContainer(container); |
|
| 45 |
|
public DisplayContentPage() { |
| 46 |
} |
} |
| 47 |
|
|
| 48 |
/** |
/** |
| 56 |
* @return |
* @return |
| 57 |
*/ |
*/ |
| 58 |
public String prerender() { |
public String prerender() { |
| 59 |
WikiContentService contentService = (WikiContentService) container |
if (log.isDebugEnabled()) { |
| 60 |
.getComponent(WikiContentService.class); |
log.debug("prerender()"); |
| 61 |
setPageName(contentService.getCurrentPageName()); |
} |
| 62 |
setContent(contentService.getCurrentConvertedContent()); |
|
| 63 |
|
// WikiContentService wikiContentService = (WikiContentService) |
| 64 |
|
// container |
| 65 |
|
// .getComponent(WikiContentService.class); |
| 66 |
|
setPageName(getWikiContentService().getCurrentPageName()); |
| 67 |
|
setContent(getWikiContentService().getCurrentConvertedContent()); |
| 68 |
return null; |
return null; |
| 69 |
} |
} |
| 70 |
|
|
| 113 |
this.pageName = pageName; |
this.pageName = pageName; |
| 114 |
} |
} |
| 115 |
|
|
| 116 |
|
/** |
| 117 |
|
* @return Returns the wikiContentService. |
| 118 |
|
*/ |
| 119 |
|
public WikiContentService getWikiContentService() { |
| 120 |
|
return wikiContentService; |
| 121 |
|
} |
| 122 |
|
|
| 123 |
|
/** |
| 124 |
|
* @param wikiContentService |
| 125 |
|
* The wikiContentService to set. |
| 126 |
|
*/ |
| 127 |
|
public void setWikiContentService(WikiContentService wikiContentService) { |
| 128 |
|
this.wikiContentService = wikiContentService; |
| 129 |
|
} |
| 130 |
|
|
| 131 |
} |
} |