Source Code Cross Referenced for WikiPageProvider.java in  » Wiki-Engine » JSPWiki » com » ecyrd » jspwiki » providers » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Wiki Engine » JSPWiki » com.ecyrd.jspwiki.providers 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* 
002:            JSPWiki - a JSP-based WikiWiki clone.
003:
004:            Copyright (C) 2001-2002 Janne Jalkanen (Janne.Jalkanen@iki.fi)
005:
006:            This program is free software; you can redistribute it and/or modify
007:            it under the terms of the GNU Lesser General Public License as published by
008:            the Free Software Foundation; either version 2.1 of the License, or
009:            (at your option) any later version.
010:
011:            This program is distributed in the hope that it will be useful,
012:            but WITHOUT ANY WARRANTY; without even the implied warranty of
013:            MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014:            GNU Lesser General Public License for more details.
015:
016:            You should have received a copy of the GNU Lesser General Public License
017:            along with this program; if not, write to the Free Software
018:            Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
019:         */
020:        package com.ecyrd.jspwiki.providers;
021:
022:        import java.util.List;
023:        import java.util.Collection;
024:        import java.util.Date;
025:
026:        import com.ecyrd.jspwiki.*;
027:
028:        /**
029:         *  Each Wiki page provider should implement this interface.
030:         *  <P>
031:         *  You can build whatever page providers based on this, just
032:         *  leave the unused methods do something useful.
033:         *  <P>
034:         *  WikiPageProvider uses Strings and ints to refer to pages.  This may
035:         *  be a bit odd, since WikiAttachmentProviders all use Attachment
036:         *  instead of name/version.  We will perhaps modify these in the
037:         *  future.  In the mean time, name/version is quite sufficient.
038:         *  <P>
039:         *  FIXME: In reality we should have an AbstractWikiPageProvider,
040:         *  which would provide intelligent backups for subclasses.
041:         *
042:         *  @author Janne Jalkanen
043:         */
044:        public interface WikiPageProvider extends WikiProvider {
045:            /**
046:             *  Attempts to save the page text for page "page".
047:             */
048:            public void putPageText(WikiPage page, String text)
049:                    throws ProviderException;
050:
051:            /**
052:             *  Return true, if page exists.
053:             */
054:
055:            public boolean pageExists(String page);
056:
057:            /**
058:             *  Finds pages based on the query.
059:             */
060:            public Collection findPages(QueryItem[] query);
061:
062:            /**
063:             *  Returns info about the page.
064:             */
065:            public WikiPage getPageInfo(String page, int version)
066:                    throws ProviderException;
067:
068:            /**
069:             *  Returns all pages.  Each element in the returned
070:             *  Collection should be a WikiPage.
071:             */
072:
073:            public Collection getAllPages() throws ProviderException;
074:
075:            /**
076:             *  Gets a list of recent changes.
077:             *  @since 1.6.4
078:             */
079:
080:            public Collection getAllChangedSince(Date date);
081:
082:            /**
083:             *  Gets the number of pages.
084:             *  @since 1.6.4
085:             */
086:
087:            public int getPageCount() throws ProviderException;
088:
089:            /**
090:             *  Returns version history.  Each element should be
091:             *  a WikiPage.
092:             *
093:             *  @return A collection of wiki pages.
094:             */
095:
096:            public List getVersionHistory(String page) throws ProviderException;
097:
098:            /**
099:             *  Gets a specific version out of the repository.
100:             *
101:             *  @param page Name of the page to fetch.
102:             *  @param version Version of the page to fetch.
103:             *
104:             *  @return The content of the page, or null, if the page does not exist.
105:             */
106:
107:            public String getPageText(String page, int version)
108:                    throws ProviderException;
109:
110:            /**
111:             *  Removes a specific version from the repository.  The implementations
112:             *  should really do no more security checks, since that is the domain
113:             *  of the PageManager.  Just delete it as efficiently as you can.
114:             *
115:             *  @since 2.0.17.
116:             *
117:             *  @param pageName Name of the page to be removed.
118:             *  @param version  Version of the page to be removed.  May be LATEST_VERSION.
119:             *
120:             *  @throws ProviderException If the page cannot be removed for some reason.
121:             */
122:
123:            public void deleteVersion(String pageName, int version)
124:                    throws ProviderException;
125:
126:            /**
127:             *  Removes an entire page from the repository.  The implementations
128:             *  should really do no more security checks, since that is the domain
129:             *  of the PageManager.  Just delete it as efficiently as you can.  You should also
130:             *  delete any auxiliary files that belong to this page, IF they were created
131:             *  by this provider.
132:             *
133:             *  <P>The reason why this is named differently from
134:             *  deleteVersion() (logically, this method should be an
135:             *  overloaded version) is that I want to be absolutely sure I
136:             *  don't accidentally use the wrong method.  With overloading
137:             *  something like that happens sometimes...
138:             *
139:             *  @since 2.0.17.
140:             *
141:             *  @param pageName Name of the page to be removed completely.
142:             *
143:             *  @throws ProviderException If the page could not be removed for some reason.
144:             */
145:            public void deletePage(String pageName) throws ProviderException;
146:
147:            /**
148:             * Move a page
149:             *
150:             * @param from  Name of the page to move.
151:             * @param to    New name of the page.
152:             *
153:             * @throws ProviderException If the page could not be moved for some reason.
154:             */
155:            public void movePage(String from, String to)
156:                    throws ProviderException;
157:
158:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.