Source Code Cross Referenced for FramesListAction.java in  » Groupware » ivatagroupware » com » ivata » groupware » mask » struts » 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 » Groupware » ivatagroupware » com.ivata.groupware.mask.struts 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 2001 - 2005 ivata limited.
003:         * All rights reserved.
004:         * -----------------------------------------------------------------------------
005:         * ivata groupware may be redistributed under the GNU General Public
006:         * License as published by the Free Software Foundation;
007:         * version 2 of the License.
008:         *
009:         * These programs are free software; you can redistribute them and/or
010:         * modify them under the terms of the GNU General Public License
011:         * as published by the Free Software Foundation; version 2 of the License.
012:         *
013:         * These programs are distributed in the hope that they will be useful,
014:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
015:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016:         *
017:         * See the GNU General Public License in the file LICENSE.txt for more
018:         * details.
019:         *
020:         * If you would like a copy of the GNU General Public License write to
021:         *
022:         * Free Software Foundation, Inc.
023:         * 59 Temple Place - Suite 330
024:         * Boston, MA 02111-1307, USA.
025:         *
026:         *
027:         * To arrange commercial support and licensing, contact ivata at
028:         *                  http://www.ivata.com/contact.jsp
029:         * -----------------------------------------------------------------------------
030:         * $Log: FramesListAction.java,v $
031:         * Revision 1.4  2005/10/14 14:26:26  colinmacleod
032:         * Removed createListForm - now handled by request processor.
033:         * Changed menu frame URI to the action (not the JSP page).
034:         *
035:         * Revision 1.3  2005/10/03 10:21:14  colinmacleod
036:         * Fixed some style and javadoc issues.
037:         *
038:         * Revision 1.2  2005/10/02 14:08:57  colinmacleod
039:         * Added/improved log4j logging.
040:         *
041:         * Revision 1.1  2005/09/29 14:04:05  colinmacleod
042:         * Generalized frames model of ivata masks - initially for use in ivata cms.
043:         *
044:         */
045:        package com.ivata.groupware.mask.struts;
046:
047:        import javax.servlet.http.HttpServletRequest;
048:        import javax.servlet.http.HttpServletResponse;
049:        import javax.servlet.http.HttpSession;
050:
051:        import org.apache.log4j.Logger;
052:        import org.apache.struts.action.ActionForm;
053:        import org.apache.struts.action.ActionMapping;
054:        import org.sourceforge.clientsession.ClientSession;
055:
056:        import com.ivata.mask.MaskFactory;
057:        import com.ivata.mask.persistence.PersistenceManager;
058:        import com.ivata.mask.util.StringHandling;
059:        import com.ivata.mask.util.SystemException;
060:        import com.ivata.mask.web.struts.ListAction;
061:        import com.ivata.mask.web.struts.MaskAuthenticator;
062:
063:        /**
064:         * Overridden to populate the extra fields of the frames list form.
065:         *
066:         * @since ivata groupware 1.0 (18-Sep-2005)
067:         * @author Colin MacLeod
068:         * <a href='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
069:         * @version $Revision: 1.4 $
070:         */
071:        public class FramesListAction extends ListAction {
072:            /**
073:             * This suffix is appended to the <em>Struts</em> path to get the full path
074:             * to the action. There <em>must</em> be a more generic way! If you know,
075:             * please <a href='mailto:colin.macleod@ivata.com'>tell me</a>.
076:             */
077:            private static final String ACTION_SUFFIX = ".action";
078:            /**
079:             * Ending for dependent value objects - to strip off.
080:             */
081:            private static final String DO_SUFFIX = "DO";
082:
083:            /**
084:             * Logger for this class.
085:             */
086:            private static final Logger logger = Logger
087:                    .getLogger(FramesListAction.class);
088:
089:            /**
090:             * For display - strip the &quot;DO&quot; from the end of the class name.
091:             *
092:             * @param className Class name to be converted.
093:             * @return <code>className</code> minus &quot;DO&quot; ending, if present.
094:             */
095:            public static String getDefaultClassName(final String className) {
096:                if (logger.isDebugEnabled()) {
097:                    logger.debug("getDefaultClassName(String className = "
098:                            + className + ") - start");
099:                }
100:                int dotPos = className.lastIndexOf('.');
101:                int end = className.length();
102:                if (className.endsWith(DO_SUFFIX)) {
103:                    end -= 2;
104:                }
105:                String returnString = className.substring(dotPos + 1, end);
106:                if (logger.isDebugEnabled()) {
107:                    logger
108:                            .debug("getDefaultClassName(String) - end - return value = "
109:                                    + returnString);
110:                }
111:                return returnString;
112:            }
113:
114:            /**
115:             * {@inheritDoc}
116:             *
117:             * @param persistenceManagerParam {@inheritDoc}
118:             * @param maskFactoryParam {@inheritDoc}
119:             * @param authenticatorParam {@inheritDoc}
120:             */
121:            public FramesListAction(
122:                    final PersistenceManager persistenceManagerParam,
123:                    final MaskFactory maskFactoryParam,
124:                    final MaskAuthenticator authenticatorParam) {
125:                super (persistenceManagerParam, maskFactoryParam,
126:                        authenticatorParam);
127:            }
128:
129:            /**
130:             * {@inheritDoc}
131:             *
132:             * @param mappingParam {@inheritDoc}
133:             * @param formParam {@inheritDoc}
134:             * @param requestParam {@inheritDoc}
135:             * @param responseParam {@inheritDoc}
136:             * @param sessionParam {@inheritDoc}
137:             * @param clientSessionParam {@inheritDoc}
138:             * @return {@inheritDoc}
139:             * @throws SystemException {@inheritDoc}
140:             */
141:            public String execute(final ActionMapping mappingParam,
142:                    final ActionForm formParam,
143:                    final HttpServletRequest requestParam,
144:                    final HttpServletResponse responseParam,
145:                    final HttpSession sessionParam,
146:                    final ClientSession clientSessionParam)
147:                    throws SystemException {
148:                if (logger.isDebugEnabled()) {
149:                    logger.debug("execute(ActionMapping mappingParam = "
150:                            + mappingParam + ", ActionForm formParam = "
151:                            + formParam
152:                            + ", HttpServletRequest requestParam = "
153:                            + requestParam
154:                            + ", HttpServletResponse responseParam = "
155:                            + responseParam + ", HttpSession sessionParam = "
156:                            + sessionParam + ", ClientSession clientSession = "
157:                            + clientSessionParam + ") - start");
158:                }
159:
160:                String forward = super .execute(mappingParam, formParam,
161:                        requestParam, responseParam, sessionParam,
162:                        clientSessionParam);
163:                // check the createListForm method is called, or we already have a
164:                // suitable form
165:                assert (formParam instanceof  FramesListForm);
166:                FramesListForm framesListForm = (FramesListForm) formParam;
167:
168:                assert (!StringHandling.isNullOrEmpty(mappingParam.getPath()));
169:                framesListForm.setMenuFrameURI(mappingParam.getPath()
170:                        + ACTION_SUFFIX);
171:
172:                if (logger.isDebugEnabled()) {
173:                    logger.debug("execute - end - return value = " + forward);
174:                }
175:                return forward;
176:            }
177:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.