Source Code Cross Referenced for MountContext.java in  » Web-Framework » aranea-mvc-1.1.1 » org » araneaframework » framework » 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 » Web Framework » aranea mvc 1.1.1 » org.araneaframework.framework 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Copyright 2006 Webmedia Group Ltd.
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *  http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         **/package org.araneaframework.framework;
016:
017:        import java.io.Serializable;
018:        import org.araneaframework.InputData;
019:        import org.araneaframework.Message;
020:        import org.araneaframework.OutputData;
021:        import org.araneaframework.framework.filter.StandardMountPointFilterService;
022:
023:        /**
024:         * This context allows to <i>mount</i> specific pathes, so that when user requests an URI matching this path it would 
025:         * show him predefined use case. The context uses a message factory instead of any concrete component factory, so that
026:         * arbitrary actions could be done on the underlying component hierarchy.
027:         * <p> 
028:         * A typical application of this context would be to generate an URL including the mounted path and pass it to another user. 
029:         * The other user may then access the particular use case by simply copying the URL into his browser. Note that the URL may be longer
030:         * than the mounted path, in that case the suffix will be passed to the message factory and may be used as a parameter.
031:         * <p>
032:         * As an example consider that we want to mount client use case to the path <code>/mount/clients</code>.
033:         * If we now submit an URL <code>http://server/main/mount/clients/3331</code> then 
034:         * the <code>3331</code> will be passed as the suffix to the message factory and may be used to show the particular client. 
035:         * 
036:         * @author Jevgeni Kabanov (ekabanov <i>at</i> araneaframework <i>dot</i> org)
037:         * 
038:         * @see StandardMountPointFilterService
039:         */
040:        public interface MountContext extends Serializable {
041:            public static final String MOUNT_PATH = "/mount/";
042:
043:            /**
044:             * Mounts a message factory to the specified URI prefix. All requests to pathes matching this prefix 
045:             * will cause the {@link MessageFactory} to be called and the built {@link Message} to be sent.
046:             * <p>
047:             * In case several prefixes match the current path the most specific one will be used.
048:             * 
049:             * @param input Input data representing the current HTTP request.
050:             * @param uriPrefix The prefix of the URI that will be matched aginst the current URL.
051:             * @param messageFactory The factory that should produce the message used to 
052:             * 
053:             * @return The assembled full URL pointing to the mounted path prefix.
054:             * 
055:             * @see #getMountURL(InputData, String)
056:             */
057:            public String mount(InputData input, String uriPrefix,
058:                    MessageFactory messageFactory);
059:
060:            /**
061:             * Unmounts the message factory from the specified URI prefix.
062:             * 
063:             * @param uriPrefix Mounted URI prefix.
064:             */
065:            public void unmount(String uriPrefix);
066:
067:            /**
068:             * Returns an assembled full URL pointing to the mounted URI prefix. 
069:             * URL can be further modified by appending the path or query parameters.
070:             * 
071:             * @param input Input data representing the current HTTP request.
072:             * @param uri Mounted URI prefix.
073:             * @return The assembled full URL pointing to the mounted path prefix.
074:             */
075:            public String getMountURL(InputData input, String uri);
076:
077:            /**
078:             * Returns the {@link Message} that applies the mounted action corresponding to the current URL. 
079:             * Used primarily by the {@link StandardMountPointFilterService} or similar services to <i>mount</i> the application state
080:             * correspondimng to the URL.
081:             * 
082:             * @param input Input data representing the current HTTP request.
083:             * @return The {@link Message} corresponding to the current mounted URL or <code>null</code>. 
084:             */
085:            public Message getMountedMessage(InputData input);
086:
087:            public interface MessageFactory extends Serializable {
088:                /**
089:                 * Creates a {@link Message} used to update the current component hierarchy in response to the user accessing this specific URL.
090:                 * A message can for example select a menu item, start a flow or authenticate the user. After the message is applied the framework 
091:                 * will proceed to render the result.
092:                 * 
093:                 * @param url The full URL accessed by the user.
094:                 * @param suffix The suffix after the matched mounted path part.
095:                 * @param input Submitted data.
096:                 * @param output Response data.
097:                 * @return Message that will be applied to the component hierarchy.
098:                 */
099:                public Message buildMessage(String url, String suffix,
100:                        InputData input, OutputData output);
101:            }
102:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.