Author: julien(a)jboss.com
Date: 2007-01-23 10:14:24 -0500 (Tue, 23 Jan 2007)
New Revision: 6079
Modified:
trunk/core/src/resources/dtd/jboss-portlet_2_6.dtd
Log:
dtd for jboss-portlet.xml 2.6
Modified: trunk/core/src/resources/dtd/jboss-portlet_2_6.dtd
===================================================================
--- trunk/core/src/resources/dtd/jboss-portlet_2_6.dtd 2007-01-23 15:03:42 UTC (rev 6078)
+++ trunk/core/src/resources/dtd/jboss-portlet_2_6.dtd 2007-01-23 15:14:24 UTC (rev 6079)
@@ -33,10 +33,13 @@
<!--
The remotable element is used to configure the default behavior of the portlets with
respect to WSRP
exposure.
+
For each portlet defined in portlet.xml, it is possible to configure specific settings
of the portlet container.
+
+It is also possible to inject services in the portlet context of the application using
the service elements.
-->
-<!ELEMENT portlet-app (remotable?,portlet*)>
+<!ELEMENT portlet-app (remotable?,portlet*,service*)>
<!--
Additional configuration for a portlet.
@@ -115,3 +118,41 @@
todo
-->
<!ATTLIST meta name content CDATA #REQUIRED>
+
+<!--
+Declare a service that will be injected by the portlet container as an attribute of the
portlet context.
+
+Example :
+
+<service>
+ <service-name>UserModule</service-name>
+ <service-class>org.jboss.portal.identity.UserModule</service-class>
+ <service-ref>:service=Module,type=User</service-ref>
+</service>
+
+In the portlet it is then possible to use it by doing a lookup on the service name, for
example in the
+init() lifecycle method :
+
+public void init()
+{
+ UserModule userModule =
(UserModule)getPortletContext().getAttribute("UserModule");
+}
+
+-->
+<!ELEMENT service (service-name,service-class,service-ref)>
+
+<!--
+The service name that will be used to bind the service as a portlet context attribute.
+-->
+<!ELEMENT service-name (#PCDATA)>
+
+<!--
+The full qualified name of the interface that the service implements.
+-->
+<!ELEMENT service-class (#PCDATA)>
+
+<!--
+The reference to the service. In the JMX Microkernel environment it consist of the JMX
name of the service MBean.
+For an MBean reference if the domain is left out, then the current domain of the portal
will be used.
+-->
+<!ELEMENT service-ref (#PCDATA)>