| NodeFilter.java |
1 /**
2 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3 *
4 * This library is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 2.1 of the License, or (at your option)
7 * any later version.
8 *
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 * details.
13 */
14
15 package com.liferay.portlet.wiki.engines.friki;
16
17 import com.efsol.friki.ClassicToHTMLFilter;
18
19 import java.util.Map;
20
21 import javax.portlet.PortletURL;
22
23 import org.stringtree.factory.Fetcher;
24 import org.stringtree.factory.TractFetcher;
25
26 /**
27 * <a href="NodeFilter.java.html"><b><i>View Source</i></b></a>
28 *
29 * @author Brian Wing Shun Chan
30 */
31 public class NodeFilter extends ClassicToHTMLFilter {
32
33 public NodeFilter(
34 Fetcher context, TractFetcher pages, Map<String, String> remoteNames,
35 String spec, NodeRepository nodeRepository, PortletURL portletURL,
36 long nodeId) {
37
38 super(context, pages, remoteNames, spec);
39
40 _nodeRepository = nodeRepository;
41 _portletURL = portletURL;
42 _nodeId = nodeId;
43 }
44
45 public Map<String, Boolean> getTitles() {
46 return _nodeRepository.getTitles();
47 }
48
49 public PortletURL getPortletURL() {
50 return _portletURL;
51 }
52
53 public long getNodeId() {
54 return _nodeId;
55 }
56
57 private NodeRepository _nodeRepository;
58 private PortletURL _portletURL;
59 private long _nodeId;
60
61 }