Source Code Cross Referenced for PortletServiceDefinition.java in  » Portal » gridsphere » org » gridsphere » portlet » service » spi » impl » descriptor » 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 » gridsphere » org.gridsphere.portlet.service.spi.impl.descriptor 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a>
003:         * @version $Id: PortletServiceDefinition.java 6385 2007-10-25 14:02:26Z wehrens $
004:         */package org.gridsphere.portlet.service.spi.impl.descriptor;
005:
006:        import java.util.*;
007:
008:        /**
009:         * The <code>SportletServiceDefinition</code> defines a portlet service
010:         * definition that is defined in the portlet service descripor.
011:         */
012:        public class PortletServiceDefinition {
013:
014:            protected String serviceName = "";
015:            protected List serviceDescriptions = new Vector();
016:            protected String serviceInterface = "";
017:            protected String serviceImplementation = "";
018:            protected boolean userRequired = false;
019:            protected List<ConfigParam> configParamList = new Vector<ConfigParam>();
020:            protected Properties configProps = null;
021:            protected boolean loadOnStartup = false;
022:
023:            /**
024:             * Sets the portlet service name
025:             *
026:             * @param serviceName the portlet service name
027:             */
028:            public void setServiceName(String serviceName) {
029:                this .serviceName = serviceName;
030:            }
031:
032:            /**
033:             * Returns the portlet service name
034:             *
035:             * @return the portlet service name
036:             */
037:            public String getServiceName() {
038:                return this .serviceName;
039:            }
040:
041:            /**
042:             * Sets the portlet service descriptions
043:             *
044:             * @param serviceDescriptions the list of portlet service descriptions
045:             */
046:            public void setServiceDescription(List serviceDescriptions) {
047:                this .serviceDescriptions = serviceDescriptions;
048:            }
049:
050:            /**
051:             * Returns the portlet service descriptions
052:             *
053:             * @return the portlet service descriptions
054:             */
055:            public List getServiceDescription() {
056:                return this .serviceDescriptions;
057:            }
058:
059:            /**
060:             * Sets the portlet service interface
061:             *
062:             * @param serviceInterface the portlet service interface
063:             */
064:            public void setServiceInterface(String serviceInterface) {
065:                this .serviceInterface = serviceInterface;
066:            }
067:
068:            /**
069:             * Returns the portlet service interface
070:             *
071:             * @return the portlet service interface
072:             */
073:            public String getServiceInterface() {
074:                return this .serviceInterface;
075:            }
076:
077:            /**
078:             * Returns the portlet service implementation
079:             *
080:             * @return the portlet service implementation
081:             */
082:            public String getServiceImplementation() {
083:                return this .serviceImplementation;
084:            }
085:
086:            /**
087:             * Sets the portlet service implementation
088:             *
089:             * @param serviceImplementation the portlet service implementation
090:             */
091:            public void setServiceImplementation(String serviceImplementation) {
092:                this .serviceImplementation = serviceImplementation;
093:            }
094:
095:            /**
096:             * Determines if this service is a user service or not
097:             *
098:             * @param userRequired if <code>true</code> then portlet service is
099:             *                     an instance of a user service, <code>false</code> otherwise
100:             */
101:            public void setUserRequired(boolean userRequired) {
102:                this .userRequired = userRequired;
103:            }
104:
105:            /**
106:             * Determines if this service is a user service or not
107:             *
108:             * @return <code>true</code> if portlet service is
109:             *         an instance of a user service, <code>false</code> otherwise
110:             */
111:            public boolean getUserRequired() {
112:                return this .userRequired;
113:            }
114:
115:            /**
116:             * Sets the service configuration parameter list
117:             *
118:             * @param configParamList the configuration parameter list
119:             */
120:            public void setConfigParamList(List<ConfigParam> configParamList) {
121:                this .configParamList = configParamList;
122:            }
123:
124:            /**
125:             * Returns the service configuration parameter list
126:             *
127:             * @return the configuration parameter list
128:             */
129:            public List<ConfigParam> getConfigParamList() {
130:                return this .configParamList;
131:            }
132:
133:            /**
134:             * Creates a properties from the  ConfigParamList
135:             *
136:             * @see #getConfigParamList
137:             */
138:            private void createProperties() {
139:                configProps = new Properties();
140:                Iterator it = this .configParamList.iterator();
141:                ConfigParam param;
142:                while (it.hasNext()) {
143:                    param = (ConfigParam) it.next();
144:                    configProps.setProperty(param.getParamName(), param
145:                            .getParamValue());
146:                }
147:            }
148:
149:            /**
150:             * Return the configuration properties
151:             *
152:             * @return the configuration properties
153:             */
154:            public Properties getConfigProperties() {
155:                if (configProps == null)
156:                    createProperties();
157:                return configProps;
158:            }
159:
160:            /**
161:             * Sets the configuration properties
162:             *
163:             * @param props the configuration properties
164:             */
165:            public void setConfigProperties(Properties props) {
166:                Enumeration e = props.keys();
167:                if (!props.isEmpty()) {
168:                    configParamList = new Vector<ConfigParam>();
169:                }
170:                while (e.hasMoreElements()) {
171:                    String key = (String) e.nextElement();
172:                    ConfigParam param = new ConfigParam(key, props
173:                            .getProperty(key));
174:                    configParamList.add(param);
175:                }
176:            }
177:
178:            /**
179:             * Returns true if this service should be initialized on startup
180:             *
181:             * @return true if this service should be initialized on startup
182:             */
183:            public boolean isLoadOnStartup() {
184:                return loadOnStartup;
185:            }
186:
187:            /**
188:             * Sets whether this service should be initialized on startup
189:             *
190:             * @param loadOnStartup true if this service should be initialized on startup
191:             */
192:            public void setLoadOnStartup(boolean loadOnStartup) {
193:                this .loadOnStartup = loadOnStartup;
194:            }
195:
196:            /**
197:             * Returns a <code>String</code> representation if this portlet service
198:             * definition
199:             *
200:             * @return the service definition as a <code>String</code>
201:             */
202:            public String toString() {
203:                StringBuffer sb = new StringBuffer("\n");
204:                sb.append("service name: ").append(serviceName).append("\n");
205:                sb.append("service description: ").append(
206:                        this .serviceDescriptions.get(0)).append("\n");
207:                sb.append("service interface: ").append(this .serviceInterface)
208:                        .append("\n");
209:                sb.append("service implementation: ").append(
210:                        this .serviceImplementation).append("\n");
211:                sb.append("user required: ").append(this .userRequired).append(
212:                        "\n");
213:                sb.append("load on startup: ").append(this .loadOnStartup)
214:                        .append("\n");
215:                sb.append("config properties: ");
216:                Iterator it = this .configParamList.iterator();
217:                ConfigParam c;
218:                while (it.hasNext()) {
219:                    c = (ConfigParam) it.next();
220:                    sb.append("\tname: ").append(c.getParamName()).append(
221:                            "\tvalue: ").append(c.getParamValue());
222:                }
223:                return sb.toString();
224:            }
225:
226:        }
ww_w__.__j___a__v__a_2__s_.c___o_m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.