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