blob: abdcb9df75c8b753b000f58b8671438ccb553c42 [file] [log] [blame]
Cheng Tang697ce242014-04-27 16:18:17 +08001<!--
2<!DOCTYPE liferay-portlet-app PUBLIC
3 "-//Liferay//DTD Portlet Application 4.3.1//EN"
4 "http://www.liferay.com/dtd/liferay-portlet-app_4_3_1.dtd">
5-->
6
7<!--
8The liferay-portlet-app element is the root of the deployment descriptor for
9a Liferay portlet application.
10-->
11<!ELEMENT liferay-portlet-app (portlet*, role-mapper*, custom-user-attribute*)>
12
13<!--
14The portlet element contains the declarative data of a portlet.
15-->
16<!ELEMENT portlet (portlet-name, icon?, virtual-path?, struts-path?,
17configuration-path?, configuration-action-class?, indexer-class?,
18open-search-class?, scheduler-class?, portlet-url-class?,
19friendly-url-mapper-class?, url-encoder-class?, portlet-data-handler-class?,
20smtp-message-listener-class?, preferences-company-wide?,
21preferences-unique-per-layout?, preferences-owned-by-group?,
22use-default-template?, show-portlet-access-denied?, show-portlet-inactive?,
23action-url-redirect?, restore-current-view?, maximize-edit?, maximize-help?,
24pop-up-print?, layout-cacheable?, instanceable?, private-request-attributes?,
25private-session-attributes?, render-weight?, ajaxable?, header-css*,
26header-javascript*, add-default-resource?, system?, active?, include?)>
27
28<!--
29The portlet-name element contains the unique name of the portlet. This name must
30match the portlet-name specified in portlet.xml.
31-->
32<!ELEMENT portlet-name (#PCDATA)>
33
34<!--
35The icon element specifies an image that represents the portlet.
36-->
37<!ELEMENT icon (#PCDATA)>
38
39<!--
40The virtual-path value sets the virtual path used to override the default
41servlet context path.
42
43For example, suppose your portlet is deployed to the servlet path
44"/test-portlet". By default, the portal will return "/test-portlet" for the
45servlet context path. You can override it by setting virtual-path to "/virtual"
46and have the portal return "/virtual" for the servlet context path.
47
48The default value is "" which means this is not used.
49-->
50<!ELEMENT virtual-path (#PCDATA)>
51
52<!--
53Suppose the struts-path value is "mail". This tells the portal that all
54requests with the path mail/* are considered part of this portlet's scope. Users
55who request paths that match mail/* will only be granted access if they also
56have access to this portlet. This is true for both portlet requests and regular
57servlet requests.
58-->
59<!ELEMENT struts-path (#PCDATA)>
60
61<!--
62The configuration-path value is no longer available. Use
63configuration-action-class instead.
64-->
65<!ELEMENT configuration-path (#PCDATA)>
66
67<!--
68The configuration-action-class value must be a class that implements
69com.liferay.portal.kernel.portlet.ConfigurationAction and is called to allow
70users to configure the portlet at runtime.
71
72See:
73
74http://docs.liferay.com/portal/4.3/javadocs/portal-impl/com/liferay/portlet/messageboards/action/ConfigurationActionImpl.html
75-->
76<!ELEMENT configuration-action-class (#PCDATA)>
77
78<!--
79The indexer-class value must be a class that implements
80com.liferay.portal.kernel.search.Indexer and is called to create or update a
81search index for the portlet.
82
83See:
84
85http://docs.liferay.com/portal/4.3/javadocs/portal-kernel/com/liferay/portal/kernel/search/Indexer.html
86http://docs.liferay.com/portal/4.3/javadocs/portal-impl/com/liferay/portlet/messageboards/util/Indexer.html
87http://lucene.apache.org
88-->
89<!ELEMENT indexer-class (#PCDATA)>
90
91<!--
92The open-search-class value must be a class that implements
93com.liferay.portal.kernel.search.OpenSearch and is called to get search results
94in the OpenSearch 1.1 standard.
95
96See:
97
98http://docs.liferay.com/portal/4.3/javadocs/portal-kernel/com/liferay/portal/kernel/search/OpenSearch.html
99http://docs.liferay.com/portal/4.3/javadocs/portal-impl/com/liferay/portlet/alfrescocontent/util/OpenSearch.html
100http://www.opensearch.org
101-->
102<!ELEMENT open-search-class (#PCDATA)>
103
104<!--
105The scheduler-class value must be a class that implements
106com.liferay.portal.job.Scheduler and is called to schedule Quartz jobs for this
107portlet.
108
109See:
110
111http://docs.liferay.com/portal/4.3/javadocs/portal-impl/com/liferay/portal/job/Scheduler.html
112http://docs.liferay.com/portal/4.3/javadocs/portal-impl/com/liferay/portlet/calendar/job/Scheduler.html
113http://www.opensymphony.com/quartz
114-->
115<!ELEMENT scheduler-class (#PCDATA)>
116
117<!--
118The portlet-url-class value must be a class that extends
119com.liferay.portlet.PortletURLImplWrapper. Set this class to override the
120default portlet URL implementation.
121
122See:
123
124http://docs.liferay.com/portal/4.3/javadocs/portal-impl/com/liferay/portal/struts/StrutsActionPortletURL.html
125-->
126<!ELEMENT portlet-url-class (#PCDATA)>
127
128<!--
129The friendly-url-mapper-class value must be a class that implements
130com.liferay.portal.kernel.portlet.FriendlyURLMapper. Use this if content inside
131a portlet needs to have a friendly URL. See the Message Boards portlet for an
132example of its uses.
133
134See:
135
136http://docs.liferay.com/portal/4.3/javadocs/portal-impl/com/liferay/portlet/messageboards/MBFriendlyURLMapper.html
137-->
138<!ELEMENT friendly-url-mapper-class (#PCDATA)>
139
140<!--
141The url-encoder-class value must be a class that implements
142com.liferay.portal.kernel.servlet.URLEncoder. Use this to set a custom
143URLEncoder that is used by the RenderResponse class to implement the encodeURL
144method. This is useful if you need to add custom logic to rewrite URLs.
145-->
146<!ELEMENT url-encoder-class (#PCDATA)>
147
148<!--
149The portlet-data-handler-class value must be a class that implements
150com.liferay.portal.kernel.lar.PortletDataHandler and is called when archiving
151tasks are run.
152
153See:
154
155http://docs.liferay.com/portal/4.3/javadocs/portal-kernel/com/liferay/portal/kernel/lar/PortletDataHandler.html
156http://docs.liferay.com/portal/4.3/javadocs/portal-impl/com/liferay/portlet/journal/lar/PortletDataHandlerImpl.html
157-->
158<!ELEMENT portlet-data-handler-class (#PCDATA)>
159
160<!--
161The smtp-message-listener-class value must be a class that implements
162com.liferay.portal.kernel.smtp.MessageListener and is called when processing
163emails.
164
165See:
166
167http://docs.liferay.com/portal/4.3/javadocs/portal-kernel/com/liferay/portal/kernel/smtp/MessageListener.html
168http://docs.liferay.com/portal/4.3/javadocs/portal-impl/com/liferay/portlet/messageboards/smtp/MessageListenerImpl.html
169-->
170<!ELEMENT smtp-message-listener-class (#PCDATA)>
171
172<!--
173Set the preferences-company-wide value to true if the preferences for the
174portlet are across the entire company. Setting this value to true means
175the value for preferences-unique-per-layout and preferences-owned-by-group are
176not used. The default value is false.
177
178For example, an administrator could set the preferences to an Announcements
179portlet that would save a message in the portlet's preferences. This message
180would then be used across all pages for that company. The portlet must not be
181instanceable because instanceable portlets have uniquely generated portlet ids.
182
183The default behavior of the bundled Announcements portlet sets the instanceable
184value to true so that normal users cannot create company wide messages. A future
185release would include permissions for the edit mode versus the view mode which
186would allow an administrator to set the message while users would just view the
187message.
188-->
189<!ELEMENT preferences-company-wide (#PCDATA)>
190
191<!--
192Set the preferences-unique-per-layout value to true if the preferences for the
193portlet are unique across all pages. If set to false, the preferences for the
194portlet are shared across all pages. The default value is true.
195
196The preferences-unique-per-layout element is used in combination with the
197preferences-owned-by-group element. See the comments for the
198preferences-owned-by-group element for more information.
199-->
200<!ELEMENT preferences-unique-per-layout (#PCDATA)>
201
202<!--
203Set the preferences-owned-by-group value to true if the preferences for the
204portlet are owned by the group when the portlet is shown in a group page. If
205set to false, the preferences are owned by the user at all times. The default
206value is true.
207
208Suppose the Stocks portlet has preferences-unique-per-layout set to true and
209preferences-owned-by-group set to false. Users can set a different list of
210stocks for every personal page. Users can set a different list of stocks for
211every community page.
212
213Suppose the Stocks portlet has preferences-unique-per-layout set to false and
214preferences-owned-by-group set to false. Users can set one list of stocks to be
215shared across all personal pages. Users can set one list of stocks to be shared
216across a community's set of pages.
217
218Suppose the Stocks portlet has preferences-unique-per-layout set to true and
219preferences-owned-by-group set to true. Users can set a different list of stocks
220for every personal page. Administrators set the portlet preferences for users in
221a community page. Administrators can set a different list of stocks for every
222community page that are then shared by all users within a community.
223
224Suppose the Stocks portlet has preferences-unique-per-layout set to false and
225preferences-owned-by-group set to true. Users can set one list of stocks to be
226shared across all personal pages. Administrators set the portlet preferences for
227users in a community page. Administrators can set one list of stocks to be
228shared by all users across a community's set of pages.
229-->
230<!ELEMENT preferences-owned-by-group (#PCDATA)>
231
232<!--
233Set the use-default-template value to true if the portlet uses the default
234template to decorate and wrap content. Setting this to false allows the
235developer to own and maintain the portlet's entire outputted content. The
236default value is true.
237
238The most common use of this is if you want the portlet to look different from
239the other portlets or if you want the portlet to not have borders around the
240outputted content.
241-->
242<!ELEMENT use-default-template (#PCDATA)>
243
244<!--
245Set the show-portlet-access-denied value to true if users are shown the portlet
246with an access denied message if they do not have access to the portlet. If set
247to false, users are never shown the portlet if they do not have access to the
248portlet. The default value is set in portal.properties.
249
250See:
251
252http://www.liferay.com/page/guest/documentation/development/properties
253-->
254<!ELEMENT show-portlet-access-denied (#PCDATA)>
255
256<!--
257Set the show-portlet-inactive value to true if users are shown the portlet
258with an inactive message if the portlet is inactive. If set to false, users are
259never shown the portlet if the portlet is inactive. The default value is set in
260portal.properties.
261
262http://www.liferay.com/page/guest/documentation/development/properties
263-->
264<!ELEMENT show-portlet-inactive (#PCDATA)>
265
266<!--
267Set the action-url-redirect value to true if an action URL for this portlet
268should cause an auto redirect. This helps prevent double submits. The default
269value is false.
270-->
271<!ELEMENT action-url-redirect (#PCDATA)>
272
273<!--
274Set the restore-current-view value to true if the portlet restores to the
275current view when toggling between maximized and normal states. If set to false,
276the portlet will reset the current view when toggling between maximized and
277normal states. The default value is true.
278-->
279<!ELEMENT restore-current-view (#PCDATA)>
280
281<!--
282Set the maximize-edit value to true if the portlet goes into the maximized state
283when the user goes into the edit mode. This only affects the default portal
284icons and not what may be programmatically set by the portlet developer.
285The default value is false.
286-->
287<!ELEMENT maximize-edit (#PCDATA)>
288
289<!--
290Set the maximize-help value to true if the portlet goes into the maximized state
291when the user goes into the help mode. This only affects the default portal
292icons and not what may be programmatically set by the portlet developer.
293The default value is false.
294-->
295<!ELEMENT maximize-help (#PCDATA)>
296
297<!--
298Set the pop-up-print value to true if the portlet goes into the pop up state
299when the user goes into the print mode. This only affects the default portal
300icons and not what may be programmatically set by the portlet developer.
301The default value is true.
302-->
303<!ELEMENT pop-up-print (#PCDATA)>
304
305<!--
306Set the layout-cacheable flag to true if the data contained in this portlet can
307will never change unless the layout or Journal portlet entry is changed.
308-->
309<!ELEMENT layout-cacheable (#PCDATA)>
310
311<!--
312Set the instanceable value to true if the portlet can appear multiple times on a
313page. If set to false, the portlet can only appear once on a page. The default
314value is false.
315-->
316<!ELEMENT instanceable (#PCDATA)>
317
318<!--
319Set the private-request-attributes value to true if the portlet does not share
320request attributes with the portal or any other portlet. The default value is
321true. The property "request.shared.attributes" in portal.properties specifies
322which request attributes are shared even when the private-request-attributes
323value is true.
324-->
325<!ELEMENT private-request-attributes (#PCDATA)>
326
327<!--
328Set the private-session-attributes value to true if the portlet does not share
329session attributes with the portal. The default value is true. The property
330"session.shared.attributes" in portal.properties specifies which session
331attributes are shared even when the private-session-attributes value is true.
332-->
333<!ELEMENT private-session-attributes (#PCDATA)>
334
335<!--
336The default value of render-weight is 1. If set to a value less than 1, the
337portlet is rendered in parallel. If set to a value of 1 or greater, then the
338portlet is rendered serially. Portlets with a greater render weight have greater
339priority and will be rendered before portlets with a lower render weight.
340
341If the ajaxable value is set to false, then render-weight is always set to 1
342if it is set to a value less than 1. This means ajaxable can override
343render-weight if ajaxable is set to false.
344-->
345<!ELEMENT render-weight (#PCDATA)>
346
347<!--
348The default value of ajaxable is true. If set to false, then this portlet can
349never be displayed via Ajax.
350-->
351<!ELEMENT ajaxable (#PCDATA)>
352
353<!--
354Set the path of CSS that will be referenced in the page's header relative to the
355portlet's context path.
356-->
357<!ELEMENT header-css (#PCDATA)>
358
359<!--
360Set the path of JavaScript that will be referenced in the page's header relative
361to the portlet's context path.
362-->
363<!ELEMENT header-javascript (#PCDATA)>
364
365<!--
366If the add-default-resource value is set to false, and the portlet does not
367belong to the page but has been dynamically added, then the user will see that
368he does not have permissions to view the portlet. If the add-default-resource
369value is set to true, the default portlet resources and permissions are added to
370the page. The user can then view the portlet. Most portlets are harmless and can
371benefit from this flexibility. However, to prevent security loop holes, the
372default value is false.
373-->
374<!ELEMENT add-default-resource (#PCDATA)>
375
376<!--
377Set the system value to true if the portlet is a system portlet that a user
378cannot manually add to their page. The default value is false.
379-->
380<!ELEMENT system (#PCDATA)>
381
382<!--
383Set the active value to true if the portlet is active and available to users.
384If set to false, the portlet will not be active or available to users. The
385default value is true.
386
387This value can be changed at runtime via the Admin portlet.
388-->
389<!ELEMENT active (#PCDATA)>
390
391<!--
392Set the include value to true to if the portlet is available to the portal. If
393set to false, the portlet is not available to the portal. The default value is
394true.
395
396Portlets that are not included as part of the portal are never available to the
397user to be made active or inactive. As far the user knows, the portlets do not
398even exist in the system. This allows the Liferay developers to bundle a lot of
399portlets in one core package, and yet allow custom deployments to turn on or off
400individual portlets or sets of portlets. This follows the Siebel and Microsoft
401model of bundling everything in one core package, but using XML configuration or
402registry settings to turn on and off features or sets of features.
403
404We do not recommend that custom deployers modify the core source by removing
405specific portlets because this prevents an easy upgrade process in the future.
406The best way to turn on and off portlets is to set the include element. The
407advantage of this way of doing things is that it becomes very easy to deploy
408Liferay. All features are available in one package. The disadvantage is that by
409not utilizing all of the portlets, you are wasting disk space and may even take
410a small but static memory footprint. However, we feel that the extra disk space
411and memory usage is a cheap price to pay in order to provide an easy
412installation and upgrade path.
413-->
414<!ELEMENT include (#PCDATA)>
415
416<!--
417The role-mapper contains two names specified by role-name and role-link. The
418role-name value must be a role specified in portlet.xml. The role-link value
419must be the name of a Liferay role that exists in the database. The role-mapper
420element pairs up these two values to map roles from portlet.xml to roles in
421the Liferay database.
422
423This is needed because Liferay roles may contain spaces whereas roles in
424portlet.xml cannot contain spaces. This also adds extra flexibility where the
425portlet vendor does not need to have any knowledge about Liferay's roles.
426-->
427<!ELEMENT role-mapper (role-name, role-link)>
428
429<!--
430See the comments in role-mapper element.
431-->
432<!ELEMENT role-name (#PCDATA)>
433
434<!--
435See the comments in role-mapper element.
436-->
437<!ELEMENT role-link (#PCDATA)>
438
439<!--
440The custom-user-attribute contains a list of names that are retrieved using a
441custom class that extends com.liferay.portlet.CustomUserAttributes.
442
443Download the sample hot deployable portlet WAR named test.war. Look for the
444class com.liferay.portlet.teststruts.TestStrutsUserAttributes to see how it
445associates the custom user attribute "user.name.test" with the value
446"Test Name". This class could be modified to read custom user attributes from
447another datasource that may be a database, a LDAP server, or a web service.
448
449See:
450
451http://www.liferay.com/page/guest/documentation/development/hot_deploy
452-->
453<!ELEMENT custom-user-attribute (name+, custom-class)>
454
455<!--
456See the comments in custom-user-attribute element.
457-->
458<!ELEMENT name (#PCDATA)>
459
460<!--
461See the comments in custom-user-attribute element.
462-->
463<!ELEMENT custom-class (#PCDATA)>