Source Code Cross Referenced for Action.java in  » UML » MetaBoss » com » metaboss » enterprise » xi » enhydrabarracuda » 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 » UML » MetaBoss » com.metaboss.enterprise.xi.enhydrabarracuda 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // THIS SOFTWARE IS PROVIDED BY SOFTARIS PTY.LTD. AND OTHER METABOSS
002:        // CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
003:        // BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
004:        // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTARIS PTY.LTD.
005:        // OR OTHER METABOSS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
006:        // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
007:        // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
008:        // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
009:        // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
010:        // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
011:        // EVEN IF SOFTARIS PTY.LTD. OR OTHER METABOSS CONTRIBUTORS ARE ADVISED OF THE
012:        // POSSIBILITY OF SUCH DAMAGE.
013:        //
014:        // Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
015:        package com.metaboss.enterprise.xi.enhydrabarracuda;
016:
017:        import org.apache.commons.logging.Log;
018:        import org.apache.commons.logging.LogFactory;
019:
020:        import com.metaboss.enterprise.ui.UIException;
021:        import com.metaboss.enterprise.ui.UIInputValidationException;
022:        import com.metaboss.enterprise.ui.UIUnexpectedProgramConditionException;
023:
024:        /** This abstract represents the processing which should take place when user actions the form or anchor */
025:        public abstract class Action {
026:            // Static logging instance
027:            private static final Log sLogger = LogFactory.getLog(Action.class);
028:
029:            // Current navigation move
030:            private Application.NavigationMove mNavigationMove;
031:            // The Application which owns this instance
032:            private Application mApplication = null;
033:
034:            /** Package visibility only. This helper processes the action when user actions the form if there is one bound
035:             * or just returns without complaining if action is not bound.
036:             * @return alternative relative URI of the page where application should be redirected. If this equals null - the
037:             * URI present in HTTP request will be used. */
038:            static String processFormAction(String pPageResourceId,
039:                    String pFormResourceId, Application pApplication,
040:                    Application.NavigationMove pNavigationMove)
041:                    throws IllegalAccessException, InstantiationException,
042:                    UIException {
043:                // Find out if we have action associated with this form
044:                Class lFormActionClass = Page.getFormActionClass(
045:                        pPageResourceId, pFormResourceId);
046:                if (lFormActionClass == null) {
047:                    sLogger
048:                            .debug("Form does not have an Action associated with it. PageId: "
049:                                    + pPageResourceId
050:                                    + ". FormId: "
051:                                    + pFormResourceId);
052:                    return null;
053:                }
054:                // Create an instance of the action and execute it
055:                Action lInstance = (Action) lFormActionClass.newInstance();
056:                lInstance.mApplication = pApplication;
057:                lInstance.mNavigationMove = pNavigationMove;
058:                return lInstance.execute();
059:            }
060:
061:            /** Getter for the navigation move */
062:            protected Application.NavigationMove getNavigationMove() {
063:                return mNavigationMove;
064:            }
065:
066:            /** Getter for the application */
067:            protected Application getApplication() {
068:                return mApplication;
069:            }
070:
071:            /** Returns the value of a navigation parameter as a String, or throws exception if the specified parameter does not exist.
072:             * This method should only be used if caller is sure that the parameter value is always a sinlge string.
073:             * For array of strings getMandatoryParameters() method should be used */
074:            protected String getMandatoryParameter(String pParameterName)
075:                    throws UIInputValidationException,
076:                    UIUnexpectedProgramConditionException {
077:                return getNavigationMove()
078:                        .getMandatoryParameter(pParameterName);
079:            }
080:
081:            /** Returns the value of a navigation parameter as a String, or throws exception if the specified parameter does not exist. */
082:            protected String[] getMandatoryParameters(String pParameterName)
083:                    throws UIInputValidationException {
084:                return getNavigationMove().getMandatoryParameters(
085:                        pParameterName);
086:            }
087:
088:            /** Returns the value of a navigation parameter as a String, or specified default value if the parameter does not exist.
089:             * This method should only be used if caller is sure that the parameter value is always a sinlge string.
090:             * For array of strings getMandatoryParameters() method should be used */
091:            protected String getParameter(String pParameterName,
092:                    String pDefaultValue)
093:                    throws UIUnexpectedProgramConditionException {
094:                return getNavigationMove().getParameter(pParameterName,
095:                        pDefaultValue);
096:            }
097:
098:            /** Returns the value of a navigation parameter as a String, or specified default value if the parameter does not exist. */
099:            protected String[] getParameters(String pParameterName,
100:                    String[] pDefaultValue) {
101:                return getNavigationMove().getParameters(pParameterName,
102:                        pDefaultValue);
103:            }
104:
105:            /** Executes action. 
106:             * @return alternative relative URI of the page where application should be redirected. If this equals null - the
107:             * URI present in HTTP request will be used. */
108:            public abstract String execute() throws UIException;
109:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.