Source Code Cross Referenced for ServletDefinitionImpl.java in  » Portal » uPortal_rel-2-6-1-GA » org » jasig » portal » container » om » servlet » 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 » uPortal_rel 2 6 1 GA » org.jasig.portal.container.om.servlet 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright 2004 The JA-SIG Collaborative.  All rights reserved.
002:         *  See license distributed with this file and
003:         *  available online at http://www.uportal.org/license.html
004:         */
005:
006:        package org.jasig.portal.container.om.servlet;
007:
008:        import java.io.Serializable;
009:        import java.util.Locale;
010:
011:        import javax.servlet.RequestDispatcher;
012:        import javax.servlet.ServletContext;
013:
014:        import org.apache.pluto.om.common.Description;
015:        import org.apache.pluto.om.common.DescriptionSet;
016:        import org.apache.pluto.om.common.DisplayName;
017:        import org.apache.pluto.om.common.DisplayNameSet;
018:        import org.apache.pluto.om.common.ObjectID;
019:        import org.apache.pluto.om.common.ParameterSet;
020:        import org.apache.pluto.om.common.SecurityRoleRefSet;
021:        import org.apache.pluto.om.servlet.ServletDefinition;
022:        import org.apache.pluto.om.servlet.ServletDefinitionCtrl;
023:        import org.apache.pluto.om.servlet.WebApplicationDefinition;
024:        import org.jasig.portal.container.om.common.DescriptionSetImpl;
025:        import org.jasig.portal.container.om.common.DisplayNameSetImpl;
026:        import org.jasig.portal.container.om.common.ObjectIDImpl;
027:        import org.jasig.portal.container.om.common.ParameterSetImpl;
028:        import org.jasig.portal.container.om.common.SecurityRoleRefSetImpl;
029:
030:        /**
031:         * Implementation of Apache Pluto object model.
032:         * @author Ken Weiner, kweiner@unicon.net
033:         * @version $Revision: 34757 $
034:         */
035:        public class ServletDefinitionImpl implements  ServletDefinition,
036:                ServletDefinitionCtrl, Serializable {
037:
038:            private ObjectID objectId = null;
039:            private String servletName = null;
040:            private IconImpl icon = null;
041:            private DisplayNameSet displayNames = null;
042:            private DescriptionSet descriptions = null;
043:            private String servletClass = null;
044:            private String jspFile = null;
045:            private ParameterSet parameters = null;
046:            private String loadOnStartup = null;
047:            private RunAsImpl runAs = null;
048:            private SecurityRoleRefSet initSecurityRoleRefs = null;
049:            private WebApplicationDefinition webApplicationDefinition = null;
050:            private long available = 0;
051:
052:            private ServletMappingImpl servletMapping = null;
053:
054:            public ServletDefinitionImpl() {
055:                displayNames = new DisplayNameSetImpl();
056:                descriptions = new DescriptionSetImpl();
057:                parameters = new ParameterSetImpl();
058:                initSecurityRoleRefs = new SecurityRoleRefSetImpl();
059:            }
060:
061:            public ServletDefinitionImpl(String servletName, String servletClass) {
062:                this ();
063:                setServletName(servletName);
064:                setServletClass(servletClass);
065:            }
066:
067:            // ServletDefinition methods
068:
069:            public ObjectID getId() {
070:                return objectId;
071:            }
072:
073:            public String getServletName() {
074:                return servletName;
075:            }
076:
077:            public DisplayName getDisplayName(Locale locale) {
078:                return displayNames.get(locale);
079:            }
080:
081:            public Description getDescription(Locale locale) {
082:                return descriptions.get(locale);
083:            }
084:
085:            public String getServletClass() {
086:                return servletClass;
087:            }
088:
089:            public ParameterSet getInitParameterSet() {
090:                return parameters;
091:            }
092:
093:            public WebApplicationDefinition getWebApplicationDefinition() {
094:                return webApplicationDefinition;
095:            }
096:
097:            public RequestDispatcher getRequestDispatcher(
098:                    ServletContext servletContext) {
099:                RequestDispatcher requestDispatcher = null;
100:                ServletContext newContext = webApplicationDefinition
101:                        .getServletContext(servletContext);
102:                if (newContext != null) {
103:                    requestDispatcher = newContext
104:                            .getRequestDispatcher(servletMapping
105:                                    .getUrlPattern());
106:                }
107:                return requestDispatcher;
108:            }
109:
110:            public long getAvailable() {
111:                return available;
112:            }
113:
114:            public boolean isUnavailable() {
115:                boolean unavailable = true;
116:                if (available == 0) {
117:                    unavailable = false;
118:                } else if (available <= System.currentTimeMillis()) {
119:                    available = 0;
120:                    unavailable = false;
121:                }
122:                return unavailable;
123:            }
124:
125:            // ServletDefinitionCtrl methods
126:
127:            public void setId(String id) {
128:                this .objectId = ObjectIDImpl.createFromString(id);
129:            }
130:
131:            public void setServletName(String name) {
132:                this .servletName = name;
133:            }
134:
135:            public void setDisplayNames(DisplayNameSet displayNames) {
136:                this .displayNames = displayNames;
137:            }
138:
139:            public void setDescriptions(DescriptionSet descriptions) {
140:                this .descriptions = descriptions;
141:            }
142:
143:            public void setServletClass(String servletClass) {
144:                this .servletClass = servletClass;
145:            }
146:
147:            public void setInitParameters(ParameterSet parameters) {
148:                this .parameters = parameters;
149:            }
150:
151:            public void setWebApplicationDefinition(
152:                    WebApplicationDefinition webApplicationDefinition) {
153:                this .webApplicationDefinition = webApplicationDefinition;
154:            }
155:
156:            public void setAvailable(long available) {
157:                this .available = available;
158:            }
159:
160:            // Additional methods
161:
162:            public IconImpl getIcon() {
163:                return this .icon;
164:            }
165:
166:            public void setIcon(IconImpl icon) {
167:                this .icon = icon;
168:            }
169:
170:            public DisplayNameSet getDisplayNames() {
171:                return this .displayNames;
172:            }
173:
174:            public DescriptionSet getDescriptions() {
175:                return this .descriptions;
176:            }
177:
178:            public String getLoadOnStartup() {
179:                return this .loadOnStartup;
180:            }
181:
182:            public void setLoadOnStartup(String loadOnStartup) {
183:                this .loadOnStartup = loadOnStartup;
184:            }
185:
186:            public RunAsImpl getRunAs() {
187:                return this .runAs;
188:            }
189:
190:            public void setRunAs(RunAsImpl runAs) {
191:                this .runAs = runAs;
192:            }
193:
194:            public String getJspFile() {
195:                return this .jspFile;
196:            }
197:
198:            public void setJspFile(String jspFile) {
199:                this .jspFile = jspFile;
200:            }
201:
202:            public SecurityRoleRefSet getSecurityRoleRefs() {
203:                return this .initSecurityRoleRefs;
204:            }
205:
206:            public void setSecurityRoleRefs(
207:                    SecurityRoleRefSet initSecurityRoleRefs) {
208:                this .initSecurityRoleRefs = initSecurityRoleRefs;
209:            }
210:
211:            public ServletMappingImpl getServletMapping() {
212:                return this .servletMapping;
213:            }
214:
215:            public void setServletMapping(String servletName, String urlPattern) {
216:                this .servletMapping = new ServletMappingImpl(servletName,
217:                        urlPattern);
218:            }
219:
220:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.