Source Code Cross Referenced for PortletProvisionEvent.java in  » Portal » Open-Portal » com » sun » portal » portlet » service » provision » 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 » Open Portal » com.sun.portal.portlet.service.provision 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * $Id: PortletProvisionEvent.java,v 1.7 2007/01/26 03:48:54 portalbld Exp $
003:         * Copyright 2005 Sun Microsystems, Inc. All
004:         * rights reserved. Use of this product is subject
005:         * to license terms. Federal Acquisitions:
006:         * Commercial Software -- Government Users
007:         * Subject to Standard License Terms and
008:         * Conditions.
009:         *
010:         * Sun, Sun Microsystems, the Sun logo, and Sun ONE
011:         * are trademarks or registered trademarks of Sun Microsystems,
012:         * Inc. in the United States and other countries.
013:         */package com.sun.portal.portlet.service.provision;
014:
015:        import com.iplanet.sso.SSOToken;
016:
017:        import java.util.Map;
018:        import javax.servlet.http.HttpServletRequest;
019:
020:        /**
021:         * Event delivered to a portlet listener. Mainly these events are sent 
022:         * because a community that is using portlet is created, deleted, undeleted,
023:         * disabled, enabled or purged. They can also be sent if a particular service is
024:         * individually being created, deleted, disabled, enabled.
025:         */
026:        public class PortletProvisionEvent {
027:
028:            /**
029:             * Creation or initialization event. It is called whenever a service is asked
030:             * to initialize itself. This happens when a new community is created or 
031:             * an existing community includes this portlet.
032:             */
033:            public static final String EVENT_TYPE_CREATED = "CREATED";
034:            /**
035:             * Deletion event. This event is generally sent whenever the 
036:             * community that is using this portlet is marked 
037:             * for deletion. The service data must not be 
038:             * physically removed when a community is marked for 
039:             * deletion.
040:             */
041:            public static final String EVENT_TYPE_DELETED = "DELETED";
042:            /**
043:             * Disable event. This event is generally sent whenever the 
044:             * community that is using this portlet is disabled and it asks
045:             * its services to disable their functionality if applicable.
046:             */
047:            public static final String EVENT_TYPE_DISABLED = "DISABLED";
048:            /**
049:             * Enable event. This event is generally sent whenever the 
050:             * community that is using this portlet is enabled and it asks its services
051:             * to be enable if applicable.
052:             */
053:            public static final String EVENT_TYPE_ENABLED = "ENABLED";
054:            /**
055:             * Undo the deletion. This event is generally sent when a community
056:             * that is using this portlet is previously marked for deletion is reset
057:             * and it asks its services to reset if applicable.
058:             */
059:            public static final String EVENT_TYPE_UNDELETED = "UNDELETED";
060:            /**
061:             * Remove event. This event is sent whenever the 
062:             * community that is using this portlet is permantely removed
063:             * and it asks the services it to remove their data too, if applicable.
064:             */
065:            public static final String EVENT_TYPE_DESTROYED = "DESTROYED";
066:
067:            /**
068:             * Key to get/set the portlet preferences for a user in  OWNER role.
069:             */
070:            public static final String PREFERENCES_OWNER = "owner";
071:            /**
072:             * Key to get/set the portlet preferences for a user in  MEMBER role.
073:             */
074:            public static final String PREFERENCES_MEMBER = "member";
075:            /**
076:             * Key to get/set the portlet preferences for a user in  VISITOR role.
077:             */
078:            public static final String PREFERENCES_VISITOR = "visitor";
079:            /**
080:             * Key to get/set the portlet preferences for a user in INVITED role.
081:             */
082:            public static final String PREFERENCES_INVITED = "invited";
083:            /**
084:             * Key to get/set the portlet preferences for a user in  REJECTED role.
085:             */
086:            public static final String PREFERENCES_REJECTED = "rejected";
087:            /**
088:             * Key to get/set the portlet preferences for a user in  PENDING role.
089:             */
090:            public static final String PREFERENCES_PENDING = "pending";
091:            /**
092:             * Key to get/set the portlet preferences for a user in  BANNED role.
093:             */
094:            public static final String PREFERENCES_BANNED = "banned";
095:            /**
096:             * Key to get/set the portlet preferences when the community is in DISABLED state.
097:             */
098:            public static final String PREFERENCES_DISABLED_COMMUNITY = "disabled_community";
099:            /**
100:             * Key to get/set the portlet preferences when the community is marked for deletion i.e.in DELETED state.
101:             */
102:            public static final String PREFERENCES_DELETED_COMMUNITY = "deleted_community";
103:
104:            private String _communityPrincipalId;
105:            private String _portletName;
106:            private String _portleInstanceName;
107:            private Map _provisionProperties;
108:            private SSOToken _ssoToken;
109:            private HttpServletRequest _request;
110:            private String _eventType;
111:
112:            /**
113:             * Public constructor
114:             */
115:            public PortletProvisionEvent(String eventType,
116:                    HttpServletRequest request, String communityPrincipalId,
117:                    String portletName, String portleInstanceName,
118:                    Map provisionProperties, SSOToken ssoToken) {
119:                _communityPrincipalId = communityPrincipalId;
120:                _portletName = portletName;
121:                _portleInstanceName = portleInstanceName;
122:                _provisionProperties = provisionProperties;
123:                _ssoToken = ssoToken;
124:                _request = request;
125:                _eventType = eventType;
126:
127:            }
128:
129:            /**
130:             * 
131:             * @return Id of the community
132:             */
133:            public String getCommunityPrincipalId() {
134:                return _communityPrincipalId;
135:            }
136:
137:            /**
138:             * 
139:             * @return name of the portlet
140:             */
141:            public String getPortletName() {
142:                return _portletName;
143:            }
144:
145:            /**
146:             * 
147:             * @return name of the channel.
148:             */
149:            public String getPortletInstanceName() {
150:                return _portleInstanceName;
151:            }
152:
153:            /**
154:             * This method returns the PortletProvisionPreferences if available. Otherwise, it returns null.
155:             * Possible values for key are the defined constants starting with PREFERENCES_*.
156:             * @param key static string constants defined in this class.
157:             * @return Instance of PortletProvisionPreferences for the role specified.
158:             */
159:            public PortletProvisionPreferences getPortletProvisionPreferences(
160:                    String key) {
161:                if (_provisionProperties != null) {
162:                    return (PortletProvisionPreferences) _provisionProperties
163:                            .get(key);
164:                } else {
165:                    return null;
166:                }
167:            }
168:
169:            /**
170:             * 
171:             * @return SSOToken
172:             */
173:            public SSOToken getSSOToken() {
174:                return _ssoToken;
175:            }
176:
177:            /**
178:             * 
179:             * @return servlet request.
180:             */
181:            public HttpServletRequest getHttpServletRequest() {
182:                return _request;
183:            }
184:
185:            /**
186:             * Possible values are static constant defined starting with EVENT_TYPE.
187:             * @return community event type. 
188:             */
189:            public String getType() {
190:                return _eventType;
191:            }
192:
193:            /**
194:             *
195:             * 
196:             */
197:            public String toString() {
198:                StringBuffer buffer = new StringBuffer(30);
199:                buffer.append("\n\tCommunityId:" + getCommunityPrincipalId());
200:                buffer.append("\n\tPortletName:" + getPortletName());
201:                buffer.append("\n\tPortletInstanceName:"
202:                        + getPortletInstanceName());
203:                buffer.append("\n\tSSOToken:" + getSSOToken().toString());
204:                buffer.append("\n\tEventType:" + getType().toString());
205:                buffer.append("\n\tProvisionRoles:" + _provisionProperties);
206:                return buffer.toString();
207:            }
208:
209:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.