Source Code Cross Referenced for VerySimpleProvider.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:        package com.ecyrd.jspwiki.providers;
002:
003:        import java.util.*;
004:        import com.ecyrd.jspwiki.*;
005:
006:        /**
007:         *  This is a simple provider that is used by some of the tests.  It has some
008:         *  specific behaviours, like it always contains a single page.
009:         */
010:        public class VerySimpleProvider implements  WikiPageProvider {
011:            /** The last request is stored here. */
012:            public String m_latestReq = null;
013:            /** The version number of the last request is stored here. */
014:            public int m_latestVers = -123989;
015:
016:            /**
017:             *  This provider has only a single page, when you ask 
018:             *  a list of all pages.
019:             */
020:            public static final String PAGENAME = "foo";
021:
022:            /**
023:             *  The name of the page list.
024:             */
025:            public static final String AUTHOR = "default-author";
026:
027:            private WikiEngine m_engine;
028:
029:            public void initialize(WikiEngine engine, Properties props) {
030:                m_engine = engine;
031:            }
032:
033:            public String getProviderInfo() {
034:                return "Very Simple Provider.";
035:            }
036:
037:            public void putPageText(WikiPage page, String text)
038:                    throws ProviderException {
039:            }
040:
041:            /**
042:             *  Always returns true.
043:             */
044:            public boolean pageExists(String page) {
045:                return true;
046:            }
047:
048:            /**
049:             *  Always returns null.
050:             */
051:            public Collection findPages(QueryItem[] query) {
052:                return null;
053:            }
054:
055:            /**
056:             *  Returns always a valid WikiPage.
057:             */
058:            public WikiPage getPageInfo(String page, int version) {
059:                m_latestReq = page;
060:                m_latestVers = version;
061:
062:                WikiPage p = new WikiPage(m_engine, page);
063:                p.setVersion(5);
064:                p.setAuthor(AUTHOR);
065:                p.setLastModified(new Date(0L));
066:                return p;
067:            }
068:
069:            /**
070:             *  Returns a single page.
071:             */
072:            public Collection getAllPages() {
073:                Vector v = new Vector();
074:                v.add(getPageInfo(PAGENAME, 5));
075:                return v;
076:            }
077:
078:            /**
079:             *  Returns the same as getAllPages().
080:             */
081:            public Collection getAllChangedSince(Date date) {
082:                return getAllPages();
083:            }
084:
085:            /**
086:             *  Always returns 1.
087:             */
088:            public int getPageCount() {
089:                return 1;
090:            }
091:
092:            /**
093:             *  Always returns an empty list.
094:             */
095:            public List getVersionHistory(String page) {
096:                return new Vector();
097:            }
098:
099:            /**
100:             *  Stores the page and version into public fields of this class,
101:             *  then returns an empty string.
102:             */
103:            public String getPageText(String page, int version) {
104:                m_latestReq = page;
105:                m_latestVers = version;
106:
107:                return "";
108:            }
109:
110:            public void deleteVersion(String page, int version) {
111:            }
112:
113:            public void deletePage(String page) {
114:            }
115:
116:            /* (non-Javadoc)
117:             * @see com.ecyrd.jspwiki.providers.WikiPageProvider#movePage(java.lang.String, java.lang.String)
118:             */
119:            public void movePage(String from, String to)
120:                    throws ProviderException {
121:                // TODO Auto-generated method stub
122:
123:            }
124:
125:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.