Java Doc for DefaultURLConstructor.java in  » Wiki-Engine » JSPWiki » com » ecyrd » jspwiki » url » 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.url 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ecyrd.jspwiki.url.DefaultURLConstructor

All known Subclasses:   com.ecyrd.jspwiki.url.ShortURLConstructor,
DefaultURLConstructor
public class DefaultURLConstructor implements URLConstructor(Code)
Implements the default URL constructor using links directly to the JSP pages. This is what JSPWiki by default is using. For example, WikiContext.VIEW points at "Wiki.jsp", etc.
author:
   Janne Jalkanen
since:
   2.2


Field Summary
protected  WikiEnginem_engine
    
protected  Stringm_pathPrefix
     Contains the absolute path of the JSPWiki Web application without the actual servlet (which is the m_urlPrefix).
protected  booleanm_useRelativeURLStyle
    


Method Summary
final protected  StringdoReplacement(String baseptrn, String name, boolean absolute)
     Does replacement of some particular variables.
public  StringgetForwardPage(HttpServletRequest request)
     This method is not needed for the DefaultURLConstructor.
public static  StringgetURLPattern(String context, String name)
     Returns the URL pattern for a supplied wiki request context.
public  voidinitialize(WikiEngine engine, Properties properties)
    
public  StringmakeURL(String context, String name, boolean absolute, String parameters)
     Constructs the URL with a bunch of parameters.
public  StringparsePage(String context, HttpServletRequest request, String encoding)
     Should parse the "page" parameter from the actual request.
public static  StringparsePageFromURL(HttpServletRequest request, String encoding)
     Takes the name of the page from the request URI. The initial slash is also removed.

Field Detail
m_engine
protected WikiEngine m_engine(Code)



m_pathPrefix
protected String m_pathPrefix(Code)
Contains the absolute path of the JSPWiki Web application without the actual servlet (which is the m_urlPrefix).



m_useRelativeURLStyle
protected boolean m_useRelativeURLStyle(Code)
Are URL styles relative or absolute?





Method Detail
doReplacement
final protected String doReplacement(String baseptrn, String name, boolean absolute)(Code)
Does replacement of some particular variables. The variables are:
  • "%u" - inserts either the base URL (when absolute is required), or the base path (which is an absolute path without the host name).
  • "%U" - always inserts the base URL
  • "%p" - always inserts the base path
  • "%n" - inserts the page name

Parameters:
  baseptrn - The pattern to use
Parameters:
  name - The page name
Parameters:
  absolute - If true, %u is always the entire base URL, otherwise it depends onthe setting in jspwiki.properties. A replacement.



getForwardPage
public String getForwardPage(HttpServletRequest request)(Code)
This method is not needed for the DefaultURLConstructor.



getURLPattern
public static String getURLPattern(String context, String name) throws IllegalArgumentException(Code)
Returns the URL pattern for a supplied wiki request context.
Parameters:
  context - the wiki context
Parameters:
  name - the wiki page A pattern for replacement.
throws:
  IllegalArgumentException - if the context cannot be found



initialize
public void initialize(WikiEngine engine, Properties properties)(Code)



makeURL
public String makeURL(String context, String name, boolean absolute, String parameters)(Code)
Constructs the URL with a bunch of parameters.
Parameters:
  parameters - If null or empty, no parameters are added.



parsePage
public String parsePage(String context, HttpServletRequest request, String encoding) throws UnsupportedEncodingException(Code)
Should parse the "page" parameter from the actual request.



parsePageFromURL
public static String parsePageFromURL(HttpServletRequest request, String encoding) throws UnsupportedEncodingException(Code)
Takes the name of the page from the request URI. The initial slash is also removed. If there is no page, returns null.
Parameters:
  request - The request to parse
Parameters:
  encoding - The encoding to use a parsed page name, or null, if it cannot be found
throws:
  UnsupportedEncodingException - If the encoding is not recognized.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.