caterpillar 1.2.5 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +11 -1
- data/README.rdoc +128 -4
- data/Rakefile +2 -2
- data/bin/caterpillar +1 -1
- data/generators/caterpillar/templates/config/portlets.rb +15 -13
- data/lib/caterpillar.rb +2 -3
- data/lib/caterpillar/config.rb +4 -0
- data/lib/caterpillar/helpers/liferay.rb +23 -0
- data/lib/caterpillar/liferay.rb +11 -23
- data/lib/caterpillar/parser.rb +3 -0
- data/lib/caterpillar/portlet.rb +9 -6
- data/lib/caterpillar/portlet_support.rb +29 -0
- data/lib/caterpillar/task.rb +129 -36
- data/lib/java/rails-portlet-0.10.0.jar +0 -0
- data/lib/rails_gem_chooser.rb +37 -31
- data/portlet_test_bench/controllers/caterpillar/junit_controller.rb +10 -0
- data/portlet_test_bench/resources/jake_sully.jpg +0 -0
- data/portlet_test_bench/views/caterpillar/application/index.html.erb +9 -10
- data/test/dtd/liferay-display_5_1_0.dtd +45 -0
- data/test/dtd/liferay-display_5_2_0.dtd +45 -0
- data/test/dtd/liferay-display_6_0_0.dtd +45 -0
- data/test/dtd/liferay-portlet-app_5_1_0.dtd +583 -0
- data/test/dtd/liferay-portlet-app_5_2_0.dtd +643 -0
- data/test/dtd/liferay-portlet-app_6_0_0.dtd +731 -0
- data/test/dtd/portlet-app_2_0.xsd +830 -0
- data/test/liferay_helpers_test.rb +39 -1
- data/test/portlet_support_test.rb +25 -0
- data/test/rails_task_test.rb +20 -0
- data/test/test_helper.rb +18 -0
- data/test/xml_test.rb +55 -21
- metadata +58 -9
- data/lib/java/rails-portlet-0.9.2.jar +0 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
<!--
|
2
|
+
This is the DTD for the Display parameters for Liferay Portal.
|
3
|
+
|
4
|
+
<!DOCTYPE display PUBLIC
|
5
|
+
"-//Liferay//DTD Display 5.1.0//EN"
|
6
|
+
"http://www.liferay.com/dtd/liferay-display_5_1_0.dtd">
|
7
|
+
-->
|
8
|
+
|
9
|
+
<!--
|
10
|
+
The display element is the root of the deployment descriptor that describes how
|
11
|
+
portlets are categorized and displayed for users to choose when personalizing a
|
12
|
+
page in Liferay Portal.
|
13
|
+
-->
|
14
|
+
<!ELEMENT display (category*)>
|
15
|
+
|
16
|
+
<!--
|
17
|
+
The category element organizes a set of portlets. A portlet can exist in more
|
18
|
+
than one category.
|
19
|
+
-->
|
20
|
+
<!ELEMENT category (category*, portlet*)>
|
21
|
+
|
22
|
+
<!--
|
23
|
+
The name of a category is mapped to the portal's Language properties. If the
|
24
|
+
category name is "test", then the key in the portal's resource bundle will be
|
25
|
+
"category.test".
|
26
|
+
|
27
|
+
See:
|
28
|
+
|
29
|
+
http://www.liferay.com/page/guest/documentation/development/languages
|
30
|
+
-->
|
31
|
+
<!ATTLIST category
|
32
|
+
name CDATA #REQUIRED
|
33
|
+
>
|
34
|
+
|
35
|
+
<!--
|
36
|
+
The portlet element represents a portlet.
|
37
|
+
-->
|
38
|
+
<!ELEMENT portlet (#PCDATA)>
|
39
|
+
|
40
|
+
<!--
|
41
|
+
The id must match the unique portlet-name specified in portlet.xml.
|
42
|
+
-->
|
43
|
+
<!ATTLIST portlet
|
44
|
+
id CDATA #REQUIRED
|
45
|
+
>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<!--
|
2
|
+
This is the DTD for the Display parameters for Liferay Portal.
|
3
|
+
|
4
|
+
<!DOCTYPE display PUBLIC
|
5
|
+
"-//Liferay//DTD Display 5.2.0//EN"
|
6
|
+
"http://www.liferay.com/dtd/liferay-display_5_2_0.dtd">
|
7
|
+
-->
|
8
|
+
|
9
|
+
<!--
|
10
|
+
The display element is the root of the deployment descriptor that describes how
|
11
|
+
portlets are categorized and displayed for users to choose when personalizing a
|
12
|
+
page in Liferay Portal.
|
13
|
+
-->
|
14
|
+
<!ELEMENT display (category*)>
|
15
|
+
|
16
|
+
<!--
|
17
|
+
The category element organizes a set of portlets. A portlet can exist in more
|
18
|
+
than one category.
|
19
|
+
-->
|
20
|
+
<!ELEMENT category (category*, portlet*)>
|
21
|
+
|
22
|
+
<!--
|
23
|
+
The name of a category is mapped to the portal's Language properties. If the
|
24
|
+
category name is "test", then the key in the portal's resource bundle will be
|
25
|
+
"category.test".
|
26
|
+
|
27
|
+
See:
|
28
|
+
|
29
|
+
http://www.liferay.com/page/guest/documentation/development/languages
|
30
|
+
-->
|
31
|
+
<!ATTLIST category
|
32
|
+
name CDATA #REQUIRED
|
33
|
+
>
|
34
|
+
|
35
|
+
<!--
|
36
|
+
The portlet element represents a portlet.
|
37
|
+
-->
|
38
|
+
<!ELEMENT portlet (#PCDATA)>
|
39
|
+
|
40
|
+
<!--
|
41
|
+
The id must match the unique portlet-name specified in portlet.xml.
|
42
|
+
-->
|
43
|
+
<!ATTLIST portlet
|
44
|
+
id CDATA #REQUIRED
|
45
|
+
>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<!--
|
2
|
+
This is the DTD for the Display parameters for Liferay Portal.
|
3
|
+
|
4
|
+
<!DOCTYPE display PUBLIC
|
5
|
+
"-//Liferay//DTD Display 6.0.0//EN"
|
6
|
+
"http://www.liferay.com/dtd/liferay-display_6_0_0.dtd">
|
7
|
+
-->
|
8
|
+
|
9
|
+
<!--
|
10
|
+
The display element is the root of the deployment descriptor that describes how
|
11
|
+
portlets are categorized and displayed for users to choose when personalizing a
|
12
|
+
page in Liferay Portal.
|
13
|
+
-->
|
14
|
+
<!ELEMENT display (category*)>
|
15
|
+
|
16
|
+
<!--
|
17
|
+
The category element organizes a set of portlets. A portlet can exist in more
|
18
|
+
than one category.
|
19
|
+
-->
|
20
|
+
<!ELEMENT category (category*, portlet*)>
|
21
|
+
|
22
|
+
<!--
|
23
|
+
The name of a category is mapped to the portal's Language properties. If the
|
24
|
+
category name is "test", then the key in the portal's resource bundle will be
|
25
|
+
"category.test".
|
26
|
+
|
27
|
+
See:
|
28
|
+
|
29
|
+
http://www.liferay.com/page/guest/documentation/development/languages
|
30
|
+
-->
|
31
|
+
<!ATTLIST category
|
32
|
+
name CDATA #REQUIRED
|
33
|
+
>
|
34
|
+
|
35
|
+
<!--
|
36
|
+
The portlet element represents a portlet.
|
37
|
+
-->
|
38
|
+
<!ELEMENT portlet (#PCDATA)>
|
39
|
+
|
40
|
+
<!--
|
41
|
+
The id must match the unique portlet-name specified in portlet.xml.
|
42
|
+
-->
|
43
|
+
<!ATTLIST portlet
|
44
|
+
id CDATA #REQUIRED
|
45
|
+
>
|
@@ -0,0 +1,583 @@
|
|
1
|
+
<!--
|
2
|
+
This is the DTD for the Portlet Application parameters that are specific to
|
3
|
+
Liferay Portal.
|
4
|
+
|
5
|
+
<!DOCTYPE liferay-portlet-app PUBLIC
|
6
|
+
"-//Liferay//DTD Portlet Application 5.1.0//EN"
|
7
|
+
"http://www.liferay.com/dtd/liferay-portlet-app_5_1_0.dtd">
|
8
|
+
-->
|
9
|
+
|
10
|
+
<!--
|
11
|
+
The liferay-portlet-app element is the root of the deployment descriptor for
|
12
|
+
a Liferay portlet application.
|
13
|
+
-->
|
14
|
+
<!ELEMENT liferay-portlet-app (portlet*, role-mapper*, custom-user-attribute*)>
|
15
|
+
|
16
|
+
<!--
|
17
|
+
The portlet element contains the declarative data of a portlet.
|
18
|
+
-->
|
19
|
+
<!ELEMENT portlet (portlet-name, icon?, virtual-path?, struts-path?,
|
20
|
+
configuration-path?, configuration-action-class?, indexer-class?,
|
21
|
+
open-search-class?, scheduler-class?, portlet-url-class?,
|
22
|
+
friendly-url-mapper-class?, url-encoder-class?, portlet-data-handler-class?,
|
23
|
+
portlet-layout-listener-class?, poller-processor-class?,
|
24
|
+
pop-message-listener-class?, social-activity-interpreter-class?,
|
25
|
+
social-request-interpreter-class?, preferences-company-wide?,
|
26
|
+
preferences-unique-per-layout?, preferences-owned-by-group?,
|
27
|
+
use-default-template?, show-portlet-access-denied?, show-portlet-inactive?,
|
28
|
+
action-url-redirect?, restore-current-view?, maximize-edit?, maximize-help?,
|
29
|
+
pop-up-print?, layout-cacheable?, instanceable?, user-principal-strategy?,
|
30
|
+
private-request-attributes?, private-session-attributes?, render-weight?,
|
31
|
+
ajaxable?, header-portal-css*, header-portlet-css*, header-portal-javascript*,
|
32
|
+
header-portlet-javascript*, footer-portal-css*, footer-portlet-css*,
|
33
|
+
footer-portal-javascript*, footer-portlet-javascript*, css-class-wrapper?,
|
34
|
+
facebook-integration?, add-default-resource?, system?, active?, include?)>
|
35
|
+
|
36
|
+
<!--
|
37
|
+
The portlet-name element contains the unique name of the portlet. This name must
|
38
|
+
match the portlet-name specified in portlet.xml.
|
39
|
+
-->
|
40
|
+
<!ELEMENT portlet-name (#PCDATA)>
|
41
|
+
|
42
|
+
<!--
|
43
|
+
The icon element specifies an image that represents the portlet.
|
44
|
+
-->
|
45
|
+
<!ELEMENT icon (#PCDATA)>
|
46
|
+
|
47
|
+
<!--
|
48
|
+
The virtual-path value sets the virtual path used to override the default
|
49
|
+
servlet context path.
|
50
|
+
|
51
|
+
For example, suppose your portlet is deployed to the servlet path
|
52
|
+
"/test-portlet". By default, the portal will return "/test-portlet" for the
|
53
|
+
servlet context path. You can override it by setting virtual-path to "/virtual"
|
54
|
+
and have the portal return "/virtual" for the servlet context path.
|
55
|
+
|
56
|
+
The default value is "" which means this is not used.
|
57
|
+
-->
|
58
|
+
<!ELEMENT virtual-path (#PCDATA)>
|
59
|
+
|
60
|
+
<!--
|
61
|
+
Supppose the struts-path value is "mail". This tells the portal that all
|
62
|
+
requests with the path mail/* are considered part of this portlet's scope. Users
|
63
|
+
who request paths that match mail/* will only be granted access if they also
|
64
|
+
have access to this portlet. This is true for both portlet requests and regular
|
65
|
+
servlet requests.
|
66
|
+
-->
|
67
|
+
<!ELEMENT struts-path (#PCDATA)>
|
68
|
+
|
69
|
+
<!--
|
70
|
+
The configuration-path value is no longer available. Use
|
71
|
+
configuration-action-class instead.
|
72
|
+
-->
|
73
|
+
<!ELEMENT configuration-path (#PCDATA)>
|
74
|
+
|
75
|
+
<!--
|
76
|
+
The configuration-action-class value must be a class that implements
|
77
|
+
com.liferay.portal.kernel.portlet.ConfigurationAction and is called to allow
|
78
|
+
users to configure the portlet at runtime.
|
79
|
+
|
80
|
+
See:
|
81
|
+
|
82
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-impl/com/liferay/portlet/messageboards/action/ConfigurationActionImpl.html
|
83
|
+
-->
|
84
|
+
<!ELEMENT configuration-action-class (#PCDATA)>
|
85
|
+
|
86
|
+
<!--
|
87
|
+
The indexer-class value must be a class that implements
|
88
|
+
com.liferay.portal.kernel.search.Indexer and is called to create or update a
|
89
|
+
search index for the portlet.
|
90
|
+
|
91
|
+
See:
|
92
|
+
|
93
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-impl/com/liferay/portlet/messageboards/util/Indexer.html
|
94
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-kernel/com/liferay/portal/kernel/search/Indexer.html
|
95
|
+
http://lucene.apache.org
|
96
|
+
-->
|
97
|
+
<!ELEMENT indexer-class (#PCDATA)>
|
98
|
+
|
99
|
+
<!--
|
100
|
+
The open-search-class value must be a class that implements
|
101
|
+
com.liferay.portal.kernel.search.OpenSearch and is called to get search results
|
102
|
+
in the OpenSearch 1.1 standard.
|
103
|
+
|
104
|
+
See:
|
105
|
+
|
106
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-impl/com/liferay/portlet/alfrescocontent/util/OpenSearch.html
|
107
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-kernel/com/liferay/portal/kernel/search/OpenSearch.html
|
108
|
+
http://www.opensearch.org
|
109
|
+
-->
|
110
|
+
<!ELEMENT open-search-class (#PCDATA)>
|
111
|
+
|
112
|
+
<!--
|
113
|
+
The scheduler-class value must be a class that implements
|
114
|
+
com.liferay.portal.kernel.job.Scheduler and is called to schedule jobs for this
|
115
|
+
portlet.
|
116
|
+
|
117
|
+
See:
|
118
|
+
|
119
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-impl/com/liferay/portlet/calendar/job/CalendarScheduler.html
|
120
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-kernel/com/liferay/portal/kernel/job/Scheduler.html
|
121
|
+
http://www.opensymphony.com/quartz
|
122
|
+
-->
|
123
|
+
<!ELEMENT scheduler-class (#PCDATA)>
|
124
|
+
|
125
|
+
<!--
|
126
|
+
The portlet-url-class value must be a class that extends
|
127
|
+
com.liferay.portlet.PortletURLImplWrapper. Set this class to override the
|
128
|
+
default portlet URL implementation.
|
129
|
+
|
130
|
+
See:
|
131
|
+
|
132
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-impl/com/liferay/portal/struts/StrutsActionPortletURL.html
|
133
|
+
-->
|
134
|
+
<!ELEMENT portlet-url-class (#PCDATA)>
|
135
|
+
|
136
|
+
<!--
|
137
|
+
The friendly-url-mapper-class value must be a class that implements
|
138
|
+
com.liferay.portal.kernel.portlet.FriendlyURLMapper. Use this if content inside
|
139
|
+
a portlet needs to have a friendly URL. See the Message Boards portlet for an
|
140
|
+
example of its uses.
|
141
|
+
|
142
|
+
See:
|
143
|
+
|
144
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-impl/com/liferay/portlet/messageboards/MBFriendlyURLMapper.html
|
145
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-kernel/com/liferay/portal/kernel/portlet/FriendlyURLMapper.html
|
146
|
+
-->
|
147
|
+
<!ELEMENT friendly-url-mapper-class (#PCDATA)>
|
148
|
+
|
149
|
+
<!--
|
150
|
+
The url-encoder-class value must be a class that implements
|
151
|
+
com.liferay.portal.kernel.servlet.URLEncoder. Use this to set a custom
|
152
|
+
URLEncoder that is used by the RenderResponse class to implement the encodeURL
|
153
|
+
method. This is useful if you need to add custom logic to rewrite URLs.
|
154
|
+
-->
|
155
|
+
<!ELEMENT url-encoder-class (#PCDATA)>
|
156
|
+
|
157
|
+
<!--
|
158
|
+
The portlet-data-handler-class value must be a class that implements
|
159
|
+
com.liferay.portal.kernel.lar.PortletDataHandler and is called when archiving
|
160
|
+
tasks are run.
|
161
|
+
|
162
|
+
See:
|
163
|
+
|
164
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-impl/com/liferay/portlet/journal/lar/PortletDataHandlerImpl.html
|
165
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-kernel/com/liferay/portal/kernel/lar/PortletDataHandler.html
|
166
|
+
-->
|
167
|
+
<!ELEMENT portlet-data-handler-class (#PCDATA)>
|
168
|
+
|
169
|
+
<!--
|
170
|
+
The portlet-layout-listener-class value must be a class that implements
|
171
|
+
com.liferay.portal.kernel.portlet.PortletLayoutListener and is called when a portlet
|
172
|
+
is added, moved, or removed from a layout.
|
173
|
+
|
174
|
+
See:
|
175
|
+
|
176
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-impl/com/liferay/portlet/journalcontent/JournalContentPortletLayoutListener.html
|
177
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-kernel/com/liferay/portal/kernel/portlet/PortletLayoutListener.html
|
178
|
+
-->
|
179
|
+
<!ELEMENT portlet-layout-listener-class (#PCDATA)>
|
180
|
+
|
181
|
+
<!--
|
182
|
+
The poller-processor-class value must be a class that implements
|
183
|
+
com.liferay.portal.kernel.poller.PollerProcessor and is triggered by the
|
184
|
+
JavaScript class Liferay.Poller. It allows a portlet to use polling to be
|
185
|
+
notified of data changes. See the Chat portlet for a real world implementation.
|
186
|
+
|
187
|
+
See:
|
188
|
+
|
189
|
+
http://docs.liferay.com/portal/5.2/javadocs/portal-kernel/com/liferay/portal/kernel/poller/PollerProcessor.html
|
190
|
+
-->
|
191
|
+
<!ELEMENT poller-processor-class (#PCDATA)>
|
192
|
+
|
193
|
+
<!--
|
194
|
+
The pop-message-listener-class value must be a class that implements
|
195
|
+
com.liferay.portal.kernel.pop.MessageListener and is called when processing
|
196
|
+
emails.
|
197
|
+
|
198
|
+
See:
|
199
|
+
|
200
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-impl/com/liferay/portlet/messageboards/pop/MessageListenerImpl.html
|
201
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-kernel/com/liferay/portal/kernel/pop/MessageListener.html
|
202
|
+
-->
|
203
|
+
<!ELEMENT pop-message-listener-class (#PCDATA)>
|
204
|
+
|
205
|
+
<!--
|
206
|
+
The social-activity-interpreter-class value must be a class that implements
|
207
|
+
com.liferay.portlet.social.model.SocialActivityInterpreter and is called to
|
208
|
+
interpret activities into friendly messages that are easily understandable by a
|
209
|
+
human being.
|
210
|
+
|
211
|
+
See:
|
212
|
+
|
213
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-impl/com/liferay/portlet/messageboards/social/MBActivityInterpreter.html
|
214
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-service/com/liferay/portlet/social/model/SocialActivityInterpreter.html
|
215
|
+
-->
|
216
|
+
<!ELEMENT social-activity-interpreter-class (#PCDATA)>
|
217
|
+
|
218
|
+
<!--
|
219
|
+
The social-request-interpreter-class value must be a class that implements
|
220
|
+
com.liferay.portlet.social.model.SocialRequestInterpreter and is called to
|
221
|
+
interpret requests into friendly messages that are easily understandable by a
|
222
|
+
human being.
|
223
|
+
|
224
|
+
See:
|
225
|
+
|
226
|
+
http://docs.liferay.com/portal/5.1/javadocs/portal-service/com/liferay/portlet/social/model/SocialRequestInterpreter.html
|
227
|
+
-->
|
228
|
+
<!ELEMENT social-request-interpreter-class (#PCDATA)>
|
229
|
+
|
230
|
+
<!--
|
231
|
+
Set the preferences-company-wide value to true if the preferences for the
|
232
|
+
portlet are across the entire company. Setting this value to true means
|
233
|
+
the value for preferences-unique-per-layout and preferences-owned-by-group are
|
234
|
+
not used. The default value is false.
|
235
|
+
|
236
|
+
For example, an administrator could set the preferences to an Announcements
|
237
|
+
portlet that would save a message in the portlet's preferences. This message
|
238
|
+
would then be used across all pages for that company. The portlet must not be
|
239
|
+
instanceable because instanceable portlets have uniquely generated portlet ids.
|
240
|
+
|
241
|
+
The default behavior of the bundled Announcements portlet sets the instanceable
|
242
|
+
value to true so that normal users cannot create company wide messages. A future
|
243
|
+
release would include permissions for the edit mode versus the view mode which
|
244
|
+
would allow an administrator to set the message while users would just view the
|
245
|
+
message.
|
246
|
+
-->
|
247
|
+
<!ELEMENT preferences-company-wide (#PCDATA)>
|
248
|
+
|
249
|
+
<!--
|
250
|
+
Set the preferences-unique-per-layout value to true if the preferences for the
|
251
|
+
portlet are unique across all pages. If set to false, the preferences for the
|
252
|
+
portlet are shared across all pages. The default value is true.
|
253
|
+
|
254
|
+
The preferences-unique-per-layout element is used in combination with the
|
255
|
+
preferences-owned-by-group element. See the comments for the
|
256
|
+
preferences-owned-by-group element for more information.
|
257
|
+
-->
|
258
|
+
<!ELEMENT preferences-unique-per-layout (#PCDATA)>
|
259
|
+
|
260
|
+
<!--
|
261
|
+
Set the preferences-owned-by-group value to true if the preferences for the
|
262
|
+
portlet are owned by the group when the portlet is shown in a group page. If
|
263
|
+
set to false, the preferences are owned by the user at all times. The default
|
264
|
+
value is true.
|
265
|
+
|
266
|
+
Suppose the Stocks portlet has preferences-unique-per-layout set to true and
|
267
|
+
preferences-owned-by-group set to false. Users can set a different list of
|
268
|
+
stocks for every personal page. Users can set a different list of stocks for
|
269
|
+
every community page.
|
270
|
+
|
271
|
+
Suppose the Stocks portlet has preferences-unique-per-layout set to false and
|
272
|
+
preferences-owned-by-group set to false. Users can set one list of stocks to be
|
273
|
+
shared across all personal pages. Users can set one list of stocks to be shared
|
274
|
+
across a community's set of pages.
|
275
|
+
|
276
|
+
Suppose the Stocks portlet has preferences-unique-per-layout set to true and
|
277
|
+
preferences-owned-by-group set to true. Users can set a different list of stocks
|
278
|
+
for every personal page. Administrators set the portlet preferences for users in
|
279
|
+
a community page. Administrators can set a different list of stocks for every
|
280
|
+
community page that are then shared by all users within a community.
|
281
|
+
|
282
|
+
Suppose the Stocks portlet has preferences-unique-per-layout set to false and
|
283
|
+
preferences-owned-by-group set to true. Users can set one list of stocks to be
|
284
|
+
shared across all personal pages. Administrators set the portlet preferences for
|
285
|
+
users in a community page. Administrators can set one list of stocks to be
|
286
|
+
shared by all users across a community's set of pages.
|
287
|
+
-->
|
288
|
+
<!ELEMENT preferences-owned-by-group (#PCDATA)>
|
289
|
+
|
290
|
+
<!--
|
291
|
+
Set the use-default-template value to true if the portlet uses the default
|
292
|
+
template to decorate and wrap content. Setting this to false allows the
|
293
|
+
developer to own and maintain the portlet's entire outputted content. The
|
294
|
+
default value is true.
|
295
|
+
|
296
|
+
The most common use of this is if you want the portlet to look different from
|
297
|
+
the other portlets or if you want the portlet to not have borders around the
|
298
|
+
outputted content.
|
299
|
+
-->
|
300
|
+
<!ELEMENT use-default-template (#PCDATA)>
|
301
|
+
|
302
|
+
<!--
|
303
|
+
Set the show-portlet-access-denied value to true if users are shown the portlet
|
304
|
+
with an access denied message if they do not have access to the portlet. If set
|
305
|
+
to false, users are never shown the portlet if they do not have access to the
|
306
|
+
portlet. The default value is set in portal.properties.
|
307
|
+
|
308
|
+
See:
|
309
|
+
|
310
|
+
http://www.liferay.com/page/guest/documentation/development/properties
|
311
|
+
-->
|
312
|
+
<!ELEMENT show-portlet-access-denied (#PCDATA)>
|
313
|
+
|
314
|
+
<!--
|
315
|
+
Set the show-portlet-inactive value to true if users are shown the portlet
|
316
|
+
with an inactive message if the portlet is inactive. If set to false, users are
|
317
|
+
never shown the portlet if the portlet is inactive. The default value is set in
|
318
|
+
portal.properties.
|
319
|
+
|
320
|
+
http://www.liferay.com/page/guest/documentation/development/properties
|
321
|
+
-->
|
322
|
+
<!ELEMENT show-portlet-inactive (#PCDATA)>
|
323
|
+
|
324
|
+
<!--
|
325
|
+
Set the action-url-redirect value to true if an action URL for this portlet
|
326
|
+
should cause an auto redirect. This helps prevent double submits. The default
|
327
|
+
value is false.
|
328
|
+
-->
|
329
|
+
<!ELEMENT action-url-redirect (#PCDATA)>
|
330
|
+
|
331
|
+
<!--
|
332
|
+
Set the restore-current-view value to true if the portlet restores to the
|
333
|
+
current view when toggling between maximized and normal states. If set to false,
|
334
|
+
the portlet will reset the current view when toggling between maximized and
|
335
|
+
normal states. The default value is true.
|
336
|
+
-->
|
337
|
+
<!ELEMENT restore-current-view (#PCDATA)>
|
338
|
+
|
339
|
+
<!--
|
340
|
+
Set the maximize-edit value to true if the portlet goes into the maximized state
|
341
|
+
when the user goes into the edit mode. This only affects the default portal
|
342
|
+
icons and not what may be programmatically set by the portlet developer.
|
343
|
+
The default value is false.
|
344
|
+
-->
|
345
|
+
<!ELEMENT maximize-edit (#PCDATA)>
|
346
|
+
|
347
|
+
<!--
|
348
|
+
Set the maximize-help value to true if the portlet goes into the maximized state
|
349
|
+
when the user goes into the help mode. This only affects the default portal
|
350
|
+
icons and not what may be programmatically set by the portlet developer.
|
351
|
+
The default value is false.
|
352
|
+
-->
|
353
|
+
<!ELEMENT maximize-help (#PCDATA)>
|
354
|
+
|
355
|
+
<!--
|
356
|
+
Set the pop-up-print value to true if the portlet goes into the pop up state
|
357
|
+
when the user goes into the print mode. This only affects the default portal
|
358
|
+
icons and not what may be programmatically set by the portlet developer.
|
359
|
+
The default value is true.
|
360
|
+
-->
|
361
|
+
<!ELEMENT pop-up-print (#PCDATA)>
|
362
|
+
|
363
|
+
<!--
|
364
|
+
Set the layout-cacheable flag to true if the data contained in this portlet can
|
365
|
+
will never change unless the layout or Journal portlet entry is changed.
|
366
|
+
-->
|
367
|
+
<!ELEMENT layout-cacheable (#PCDATA)>
|
368
|
+
|
369
|
+
<!--
|
370
|
+
Set the instanceable value to true if the portlet can appear multiple times on a
|
371
|
+
page. If set to false, the portlet can only appear once on a page. The default
|
372
|
+
value is false.
|
373
|
+
-->
|
374
|
+
<!ELEMENT instanceable (#PCDATA)>
|
375
|
+
|
376
|
+
<!--
|
377
|
+
Set the user-principal-strategy value to either "userId" or "screenName".
|
378
|
+
Calling request.getRemoteUser() will normally return the user id. However, some
|
379
|
+
portlets may need the user principal returned to be screen name instead.
|
380
|
+
-->
|
381
|
+
<!ELEMENT user-principal-strategy (#PCDATA)>
|
382
|
+
|
383
|
+
<!--
|
384
|
+
Set the private-request-attributes value to true if the portlet does not share
|
385
|
+
request attributes with the portal or any other portlet. The default value is
|
386
|
+
true. The property "request.shared.attributes" in portal.properties specifies
|
387
|
+
which request attributes are shared even when the private-request-attributes
|
388
|
+
value is true.
|
389
|
+
-->
|
390
|
+
<!ELEMENT private-request-attributes (#PCDATA)>
|
391
|
+
|
392
|
+
<!--
|
393
|
+
Set the private-session-attributes value to true if the portlet does not share
|
394
|
+
session attributes with the portal. The default value is true. The property
|
395
|
+
"session.shared.attributes" in portal.properties specifies which session
|
396
|
+
attributes are shared even when the private-session-attributes value is true.
|
397
|
+
-->
|
398
|
+
<!ELEMENT private-session-attributes (#PCDATA)>
|
399
|
+
|
400
|
+
<!--
|
401
|
+
The default value of render-weight is 1. If set to a value less than 1, the
|
402
|
+
portlet is rendered in parallel. If set to a value of 1 or greater, then the
|
403
|
+
portlet is rendered serially. Portlets with a greater render weight have greater
|
404
|
+
priority and will be rendered before portlets with a lower render weight.
|
405
|
+
|
406
|
+
If the ajaxable value is set to false, then render-weight is always set to 1
|
407
|
+
if it is set to a value less than 1. This means ajaxable can override
|
408
|
+
render-weight if ajaxable is set to false.
|
409
|
+
-->
|
410
|
+
<!ELEMENT render-weight (#PCDATA)>
|
411
|
+
|
412
|
+
<!--
|
413
|
+
The default value of ajaxable is true. If set to false, then this portlet can
|
414
|
+
never be displayed via Ajax.
|
415
|
+
-->
|
416
|
+
<!ELEMENT ajaxable (#PCDATA)>
|
417
|
+
|
418
|
+
<!--
|
419
|
+
Set the path of CSS that will be referenced in the page's header relative to the
|
420
|
+
portal's context path.
|
421
|
+
-->
|
422
|
+
<!ELEMENT header-portal-css (#PCDATA)>
|
423
|
+
|
424
|
+
<!--
|
425
|
+
Set the path of CSS that will be referenced in the page's header relative to the
|
426
|
+
portlet's context path.
|
427
|
+
-->
|
428
|
+
<!ELEMENT header-portlet-css (#PCDATA)>
|
429
|
+
|
430
|
+
<!--
|
431
|
+
Set the path of JavaScript that will be referenced in the page's header relative
|
432
|
+
to the portal's context path.
|
433
|
+
-->
|
434
|
+
<!ELEMENT header-portal-javascript (#PCDATA)>
|
435
|
+
|
436
|
+
<!--
|
437
|
+
Set the path of JavaScript that will be referenced in the page's header relative
|
438
|
+
to the portlet's context path.
|
439
|
+
-->
|
440
|
+
<!ELEMENT header-portlet-javascript (#PCDATA)>
|
441
|
+
|
442
|
+
<!--
|
443
|
+
Set the path of CSS that will be referenced in the page's footer relative to the
|
444
|
+
portal's context path.
|
445
|
+
-->
|
446
|
+
<!ELEMENT footer-portal-css (#PCDATA)>
|
447
|
+
|
448
|
+
<!--
|
449
|
+
Set the path of CSS that will be referenced in the page's footer relative to the
|
450
|
+
portlet's context path.
|
451
|
+
-->
|
452
|
+
<!ELEMENT footer-portlet-css (#PCDATA)>
|
453
|
+
|
454
|
+
<!--
|
455
|
+
Set the path of JavaScript that will be referenced in the page's footer relative
|
456
|
+
to the portal's context path.
|
457
|
+
-->
|
458
|
+
<!ELEMENT footer-portal-javascript (#PCDATA)>
|
459
|
+
|
460
|
+
<!--
|
461
|
+
Set the path of JavaScript that will be referenced in the page's footer relative
|
462
|
+
to the portlet's context path.
|
463
|
+
-->
|
464
|
+
<!ELEMENT footer-portlet-javascript (#PCDATA)>
|
465
|
+
|
466
|
+
<!--
|
467
|
+
Set name of the CSS class that will be injected in the DIV that wraps this
|
468
|
+
portlet.
|
469
|
+
-->
|
470
|
+
<!ELEMENT css-class-wrapper (#PCDATA)>
|
471
|
+
|
472
|
+
<!--
|
473
|
+
Set the facebook-integration value to either "fbml" or "iframe". The default
|
474
|
+
value is "iframe" because IFrame integration will work without requiring any
|
475
|
+
changes to your code. See the Message Boards portlet for minor changes that were
|
476
|
+
made to make it FBML compliant. Note that the Liferay tag libraries already
|
477
|
+
output FBML automatically if a request is made by Facebook.
|
478
|
+
-->
|
479
|
+
<!ELEMENT facebook-integration (#PCDATA)>
|
480
|
+
|
481
|
+
<!--
|
482
|
+
If the add-default-resource value is set to false, and the portlet does not
|
483
|
+
belong to the page but has been dynamically added, then the user will see that
|
484
|
+
he does not have permissions to view the portlet. If the add-default-resource
|
485
|
+
value is set to true, the default portlet resources and permissions are added to
|
486
|
+
the page. The user can then view the portlet. Most portlets are harmless and can
|
487
|
+
benefit from this flexibility. However, to prevent security loop holes, the
|
488
|
+
default value is false.
|
489
|
+
|
490
|
+
The properties "portlet.add.default.resource.check.enabled" and
|
491
|
+
"portlet.add.default.resource.check.whitelist" in portal.properties allow
|
492
|
+
security checks to be configured around this behavior.
|
493
|
+
-->
|
494
|
+
<!ELEMENT add-default-resource (#PCDATA)>
|
495
|
+
|
496
|
+
<!--
|
497
|
+
Set the system value to true if the portlet is a system portlet that a user
|
498
|
+
cannot manually add to their page. The default value is false.
|
499
|
+
-->
|
500
|
+
<!ELEMENT system (#PCDATA)>
|
501
|
+
|
502
|
+
<!--
|
503
|
+
Set the active value to true if the portlet is active and available to users.
|
504
|
+
If set to false, the portlet will not be active or available to users. The
|
505
|
+
default value is true.
|
506
|
+
|
507
|
+
This value can be changed at runtime via the Admin portlet.
|
508
|
+
-->
|
509
|
+
<!ELEMENT active (#PCDATA)>
|
510
|
+
|
511
|
+
<!--
|
512
|
+
Set the include value to true to if the portlet is available to the portal. If
|
513
|
+
set to false, the portlet is not available to the portal. The default value is
|
514
|
+
true.
|
515
|
+
|
516
|
+
Portlets that are not included as part of the portal are never available to the
|
517
|
+
user to be made active or inactive. As far the user knows, the portlets do not
|
518
|
+
even exist in the system. This allows the Liferay developers to bundle a lot of
|
519
|
+
portlets in one core package, and yet allow custom deployments to turn on or off
|
520
|
+
individual portlets or sets of portlets. This follows the Siebel and Microsoft
|
521
|
+
model of bundling everything in one core package, but using XML configuration or
|
522
|
+
registry settings to turn on and off features or sets of features.
|
523
|
+
|
524
|
+
We do not recommend that custom deployers modify the core source by removing
|
525
|
+
specific portlets because this prevents an easy upgrade process in the future.
|
526
|
+
The best way to turn on and off portlets is to set the include element. The
|
527
|
+
advantage of this way of doing things is that it becomes very easy to deploy
|
528
|
+
Liferay. All features are available in one package. The disadvantage is that by
|
529
|
+
not utilizing all of the portlets, you are wasting disk space and may even take
|
530
|
+
a small but static memory footprint. However, we feel that the extra disk space
|
531
|
+
and memory usage is a cheap price to pay in order to provide an easy
|
532
|
+
installation and upgrade path.
|
533
|
+
-->
|
534
|
+
<!ELEMENT include (#PCDATA)>
|
535
|
+
|
536
|
+
<!--
|
537
|
+
The role-mapper contains two names specified by role-name and role-link. The
|
538
|
+
role-name value must be a role specified in portlet.xml. The role-link value
|
539
|
+
must be the name of a Liferay role that exists in the database. The role-mapper
|
540
|
+
element pairs up these two values to map roles from portlet.xml to roles in
|
541
|
+
the Liferay database.
|
542
|
+
|
543
|
+
This is needed because Liferay roles may contain spaces whereas roles in
|
544
|
+
portlet.xml cannot contain spaces. This also adds extra flexibility where the
|
545
|
+
portlet vendor does not need to have any knowledge about Liferay's roles.
|
546
|
+
-->
|
547
|
+
<!ELEMENT role-mapper (role-name, role-link)>
|
548
|
+
|
549
|
+
<!--
|
550
|
+
See the comments in role-mapper element.
|
551
|
+
-->
|
552
|
+
<!ELEMENT role-name (#PCDATA)>
|
553
|
+
|
554
|
+
<!--
|
555
|
+
See the comments in role-mapper element.
|
556
|
+
-->
|
557
|
+
<!ELEMENT role-link (#PCDATA)>
|
558
|
+
|
559
|
+
<!--
|
560
|
+
The custom-user-attribute contains a list of names that are retrieved using a
|
561
|
+
custom class that extends com.liferay.portlet.CustomUserAttributes.
|
562
|
+
|
563
|
+
Download the sample hot deployable portlet WAR named test.war. Look for the
|
564
|
+
class com.sample.strutsliferay.portlet.SampleUserAttributes to see how it
|
565
|
+
associates the custom user attribute "user.name.test" with the value
|
566
|
+
"Test Name". This class could be modified to read custom user attributes from
|
567
|
+
another datasource that may be a database, a LDAP server, or a web service.
|
568
|
+
|
569
|
+
See:
|
570
|
+
|
571
|
+
http://www.liferay.com/page/guest/documentation/development/hot_deploy
|
572
|
+
-->
|
573
|
+
<!ELEMENT custom-user-attribute (name+, custom-class)>
|
574
|
+
|
575
|
+
<!--
|
576
|
+
See the comments in custom-user-attribute element.
|
577
|
+
-->
|
578
|
+
<!ELEMENT name (#PCDATA)>
|
579
|
+
|
580
|
+
<!--
|
581
|
+
See the comments in custom-user-attribute element.
|
582
|
+
-->
|
583
|
+
<!ELEMENT custom-class (#PCDATA)>
|