Source Code Cross Referenced for ActionURLTag.java in  » Portal » liferay-portal-4.4.2 » com » liferay » taglib » portlet » 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 » Portal » liferay portal 4.4.2 » com.liferay.taglib.portlet 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003:         *
004:         * Permission is hereby granted, free of charge, to any person obtaining a copy
005:         * of this software and associated documentation files (the "Software"), to deal
006:         * in the Software without restriction, including without limitation the rights
007:         * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008:         * copies of the Software, and to permit persons to whom the Software is
009:         * furnished to do so, subject to the following conditions:
010:         *
011:         * The above copyright notice and this permission notice shall be included in
012:         * all copies or substantial portions of the Software.
013:         *
014:         * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015:         * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016:         * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017:         * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018:         * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019:         * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020:         * SOFTWARE.
021:         */package com.liferay.taglib.portlet;
022:
023:        import com.liferay.portal.kernel.util.BooleanWrapper;
024:        import com.liferay.portal.kernel.util.LongWrapper;
025:        import com.liferay.portal.kernel.util.MethodInvoker;
026:        import com.liferay.portal.kernel.util.MethodWrapper;
027:        import com.liferay.portal.kernel.util.NullWrapper;
028:        import com.liferay.portal.kernel.util.PortalClassLoaderUtil;
029:        import com.liferay.portal.kernel.util.StringPool;
030:        import com.liferay.taglib.util.ParamAncestorTagImpl;
031:
032:        import java.util.Map;
033:
034:        import javax.servlet.jsp.JspException;
035:        import javax.servlet.jsp.PageContext;
036:
037:        import org.apache.commons.logging.Log;
038:        import org.apache.commons.logging.LogFactory;
039:
040:        /**
041:         * <a href="ActionURLTag.java.html"><b><i>View Source</i></b></a>
042:         *
043:         * @author Brian Wing Shun Chan
044:         *
045:         */
046:        public class ActionURLTag extends ParamAncestorTagImpl {
047:
048:            public static String doTag(boolean action, String windowState,
049:                    String portletMode, String var, String varImpl,
050:                    Boolean secure, String portletName, Boolean anchor,
051:                    Boolean encrypt, long doAsUserId,
052:                    Boolean portletConfiguration, Map params,
053:                    boolean writeOutput, PageContext pageContext)
054:                    throws Exception {
055:
056:                Object returnObj = null;
057:
058:                ClassLoader contextClassLoader = Thread.currentThread()
059:                        .getContextClassLoader();
060:
061:                try {
062:                    Thread.currentThread().setContextClassLoader(
063:                            PortalClassLoaderUtil.getClassLoader());
064:
065:                    Object windowStateWrapper = windowState;
066:
067:                    if (windowStateWrapper == null) {
068:                        windowStateWrapper = new NullWrapper(String.class
069:                                .getName());
070:                    }
071:
072:                    Object portletModeWrapper = portletMode;
073:
074:                    if (portletModeWrapper == null) {
075:                        portletModeWrapper = new NullWrapper(String.class
076:                                .getName());
077:                    }
078:
079:                    Object varWrapper = var;
080:
081:                    if (varWrapper == null) {
082:                        varWrapper = new NullWrapper(String.class.getName());
083:                    }
084:
085:                    Object varImplWrapper = varImpl;
086:
087:                    if (varImplWrapper == null) {
088:                        varImplWrapper = new NullWrapper(String.class.getName());
089:                    }
090:
091:                    Object secureWrapper = secure;
092:
093:                    if (secureWrapper == null) {
094:                        secureWrapper = new NullWrapper(Boolean.class.getName());
095:                    }
096:
097:                    Object portletNameWrapper = portletName;
098:
099:                    if (portletNameWrapper == null) {
100:                        portletNameWrapper = new NullWrapper(String.class
101:                                .getName());
102:                    }
103:
104:                    Object anchorWrapper = anchor;
105:
106:                    if (anchorWrapper == null) {
107:                        anchorWrapper = new NullWrapper(Boolean.class.getName());
108:                    }
109:
110:                    Object encryptWrapper = encrypt;
111:
112:                    if (encryptWrapper == null) {
113:                        encryptWrapper = new NullWrapper(Boolean.class
114:                                .getName());
115:                    }
116:
117:                    Object portletConfigurationWrapper = portletConfiguration;
118:
119:                    if (portletConfigurationWrapper == null) {
120:                        portletConfigurationWrapper = new NullWrapper(
121:                                Boolean.class.getName());
122:                    }
123:
124:                    Object paramsWrapper = params;
125:
126:                    if (paramsWrapper == null) {
127:                        paramsWrapper = new NullWrapper(Map.class.getName());
128:                    }
129:
130:                    MethodWrapper methodWrapper = new MethodWrapper(_TAG_CLASS,
131:                            _TAG_DO_END_METHOD, new Object[] {
132:                                    new BooleanWrapper(action),
133:                                    windowStateWrapper, portletModeWrapper,
134:                                    varWrapper, varImplWrapper, secureWrapper,
135:                                    portletNameWrapper, anchorWrapper,
136:                                    encryptWrapper,
137:                                    new LongWrapper(doAsUserId),
138:                                    portletConfigurationWrapper, paramsWrapper,
139:                                    new BooleanWrapper(writeOutput),
140:                                    pageContext });
141:
142:                    returnObj = MethodInvoker.invoke(methodWrapper);
143:                } catch (Exception e) {
144:                    _log.error(e, e);
145:
146:                    throw e;
147:                } finally {
148:                    Thread.currentThread().setContextClassLoader(
149:                            contextClassLoader);
150:                }
151:
152:                if (returnObj != null) {
153:                    return returnObj.toString();
154:                } else {
155:                    return StringPool.BLANK;
156:                }
157:            }
158:
159:            public int doEndTag() throws JspException {
160:                try {
161:                    doTag(isAction(), _windowState, _portletMode, _var,
162:                            _varImpl, _secure, _portletName, _anchor, _encrypt,
163:                            _doAsUserId, _portletConfiguration, getParams(),
164:                            true, pageContext);
165:                } catch (Exception e) {
166:                    if (e instanceof  JspException) {
167:                        throw (JspException) e;
168:                    } else {
169:                        throw new JspException(e);
170:                    }
171:                } finally {
172:                    clearParams();
173:                }
174:
175:                return EVAL_PAGE;
176:            }
177:
178:            public boolean isAction() {
179:                return _ACTION;
180:            }
181:
182:            public void setWindowState(String windowState) {
183:                _windowState = windowState;
184:            }
185:
186:            public void setPortletMode(String portletMode) {
187:                _portletMode = portletMode;
188:            }
189:
190:            public void setVar(String var) {
191:                _var = var;
192:            }
193:
194:            public void setVarImpl(String varImpl) {
195:                _varImpl = varImpl;
196:            }
197:
198:            public void setSecure(boolean secure) {
199:                _secure = Boolean.valueOf(secure);
200:            }
201:
202:            public void setPortletName(String portletName) {
203:                _portletName = portletName;
204:            }
205:
206:            public void setAnchor(boolean anchor) {
207:                _anchor = Boolean.valueOf(anchor);
208:            }
209:
210:            public void setEncrypt(boolean encrypt) {
211:                _encrypt = Boolean.valueOf(encrypt);
212:            }
213:
214:            public void setDoAsUserId(long doAsUserId) {
215:                _doAsUserId = doAsUserId;
216:            }
217:
218:            public void setPortletConfiguration(boolean portletConfiguration) {
219:                _portletConfiguration = Boolean.valueOf(portletConfiguration);
220:            }
221:
222:            private static final String _TAG_CLASS = "com.liferay.portal.servlet.taglib.portlet.ActionURLTagUtil";
223:
224:            private static final String _TAG_DO_END_METHOD = "doEndTag";
225:
226:            private static final boolean _ACTION = true;
227:
228:            private static Log _log = LogFactory.getLog(ActionURLTag.class);
229:
230:            private String _windowState;
231:            private String _portletMode;
232:            private String _var;
233:            private String _varImpl;
234:            private Boolean _secure;
235:            private String _portletName;
236:            private Boolean _anchor;
237:            private Boolean _encrypt;
238:            private long _doAsUserId;
239:            private Boolean _portletConfiguration;
240:
241:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.