cziegeler 02/05/07 06:21:06 Modified: src/documentation/xdocs/developing portal.xml Log: pretty printed portal docs Submitted by: Bert Van Kets [[EMAIL PROTECTED]] Revision Changes Path 1.3 +616 -637 xml-cocoon2/src/documentation/xdocs/developing/portal.xml Index: portal.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/developing/portal.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- portal.xml 6 May 2002 08:41:00 -0000 1.2 +++ portal.xml 7 May 2002 13:21:06 -0000 1.3 @@ -42,7 +42,6 @@ very flexible process which allows to have different configurations for different users.</p> <p>In general the building of the profile consists of four steps:</p> - <ol> <li>Building the base profile. This profile defines which possibilites the portal has, which coplets are available to the portal and @@ -98,67 +97,64 @@ part:</p> <source> <layout-profile> - <portal> <!-- This node contains the layout of the portal view --> - <layouts> - - <layout> - <!-- The color of the background --> - <background> - <color>#ffffff</color> - </background> - <!-- The font and color for usual text --> - <font> - <type>Arial, Helvetica, sans-serif</type> - <size>2</size> - <color>black</color> - </font> - </layout> - </layouts> - - <!-- The following means that the portal has a header area --> - <header> - <exists>true</exists> - </header> - - <!-- The following means that the portal has 3 columns --> - <columns> - <number>3</number> - </columns> - - <!-- The following means that the portal has not a footer area --> - <footer> - <exists>false</exists> - </footer> - </portal> - - <coplets> <!-- This node contains the layout of the coplets --> - <layouts> - <layout> - <title> <!-- The layout of the title --> - <background> - <color>#46627A</color> - </background> - <font> - <type>Arial</type> - <size>2</size> - <color>#ffffff</color> - </font> - </title> - - <content> <!-- The layout of the content --> - <font> - <type>Arial</type> - <size>2</size> - <color>#000000</color> - </font> - <background> - <color>#ffffff</color> - </background> - </content> - </layout> - </layouts> - </coplets> - + <portal> + <!-- This node contains the layout of the portal view --> + <layouts> + <layout> + <!-- The color of the background --> + <background> + <color>#ffffff</color> + </background> + <!-- The font and color for usual text --> + <font> + <type>Arial, Helvetica, sans-serif</type> + <size>2</size> + <color>black</color> + </font> + </layout> + </layouts> + <!-- The following means that the portal has a header area --> + <header> + <exists>true</exists> + </header> + <!-- The following means that the portal has 3 columns --> + <columns> + <number>3</number> + </columns> + <!-- The following means that the portal has not a footer area --> + <footer> + <exists>false</exists> + </footer> + </portal> + <coplets> + <!-- This node contains the layout of the coplets --> + <layouts> + <layout> + <title> + <!-- The layout of the title --> + <background> + <color>#46627A</color> + </background> + <font> + <type>Arial</type> + <size>2</size> + <color>#ffffff</color> + </font> + </title> + <content> + <!-- The layout of the content --> + <font> + <type>Arial</type> + <size>2</size> + <color>#000000</color> + </font> + <background> + <color>#ffffff</color> + </background> + </content> + </layout> + </layouts> + </coplets> </layout-profile> </source> </s3> @@ -168,31 +164,35 @@ All coplets are defined under a node called "coplets", so an example profile could look like this:</p> <source> <coplets-profile> - <coplets> - <coplet id="bankingnews"> - <resource uri="cocoon://coplet-banking.xml"/> - <transformation> <!-- optional xsl transformation --> - <stylesheet>sunbank/styles/coplet.xsl</stylesheet> - </transformation> - <configuration> - <mandatory>false</mandatory> - <sizable>true</sizable> - <active>true</active> - <timeout>5000</timeout> <!-- optional, milliseconds --> - <messages> <!-- optional: Messages --> - <coplet_not_available> + <coplets> + <coplet id="bankingnews"> + <resource uri="cocoon://coplet-banking.xml"/> + <transformation> + <!-- optional xsl transformation --> + <stylesheet>sunbank/styles/coplet.xsl</stylesheet> + </transformation> + <configuration> + <mandatory>false</mandatory> + <sizable>true</sizable> + <active>true</active> + <timeout>5000</timeout> + <!-- optional, milliseconds --> + <messages> + <!-- optional: Messages --> + <coplet_not_available> Display this if the coplet is not available. </coplet_not_available> - </messages> - </configuration> - <title>Banking News</title> - <status> - <visible>true</visible> - <size>max</size> - </status> - </coplet> - </coplets> - </coplets-profile></source> + </messages> + </configuration> + <title>Banking News</title> + <status> + <visible>true</visible> + <size>max</size> + </status> + </coplet> + </coplets> +</coplets-profile> +</source> <p>This example defines one coplet: the bankingnews coplet with the title "Banking News". The title is displayed in the portal view above the coplet content. The most important part is the resource definition. Using this @@ -296,34 +296,41 @@ <p>Each coplet can have its own configuration, e.g. a weather coplet should display the weather for a particular city etc.</p> <source> <coplets-profile> - <coplets> - <coplet id="bankingnews"> - <resource uri="cocoon://coplet-banking.xml"/> - <customization uri="cocoon://customize-coplet-banking.xml"/> <!-- optional --> - <transformation> <!-- optional xsl transformation --> - <stylesheet>sunbank/styles/coplet.xsl</stylesheet> - </transformation> - <configuration> - <mandatory>false</mandatory> - <sizable>true</sizable> - <active>true</active> - <timeout>5000</timeout> <!-- optional, milliseconds --> - <messages> <!-- optional: Messages --> - <coplet_not_available> + <coplets> + <coplet id="bankingnews"> + <resource uri="cocoon://coplet-banking.xml"/> + <customization uri="cocoon://customize-coplet-banking.xml"/> + <!-- optional --> + <transformation> + <!-- optional xsl transformation --> + <stylesheet>sunbank/styles/coplet.xsl</stylesheet> + </transformation> + <configuration> + <mandatory>false</mandatory> + <sizable>true</sizable> + <active>true</active> + <timeout>5000</timeout> + <!-- optional, milliseconds --> + <messages> + <!-- optional: Messages --> + <coplet_not_available> Display this if the coplet is not available. </coplet_not_available> - </messages> - <customizable>true</customizable> <!-- optional --> - <persistent>false</persistent> <!-- optional --> - </configuration> - <title>Banking News</title> - <status> - <visible>true</visible> - <size>max</size> - </status> - </coplet> - </coplets> - </coplets-profile></source> + </messages> + <customizable>true</customizable> + <!-- optional --> + <persistent>false</persistent> + <!-- optional --> + </configuration> + <title>Banking News</title> + <status> + <visible>true</visible> + <size>max</size> + </status> + </coplet> + </coplets> +</coplets-profile> +</source> <p>To declare a coplet as customizable it must get a configuration resource which is displayed to a user of this coplet to enter all required configuration values. This is done with the <em>customization</em> tag. The @@ -363,39 +370,37 @@ types: STRING (arbitrary text), BOOLEAN (true or false), INTEGER (a number) and CARDINAL (a positiv number).</p> <source><type-profile> - - <typedefs> - <!-- The following types are defined by the portal: (Names are casesensitiv!) + <typedefs> + <!-- The following types are defined by the portal: (Names are casesensitiv!) STRING, BOOLEAN, ENUMERATION, INTEGER, CARDINAL --> - - <typedef name="backgroundcolor" type="ENUMERATION"> - <value name="weiss">#ffffff</value> - <value name="hellgrau">#cccccc</value> - <value name="hellgruen">#aab9bf</value> - <value name="dunkelgruen">#46627A</value> - </typedef> - <typedef name="textcolor" type="ENUMERATION"> - <value name="weiss">white</value> - <value name="schwarz">black</value> - <value name="weiss">#ffffff</value> - <value name="hellgrau">#cccccc</value> - <value name="hellgruen">#aab9bf</value> - <value name="dunkelgruen">#46627A</value> - </typedef> - <typedef name="copletsize" type="ENUMERATION"> - <value name="Maximized">max</value> - <value name="Minimized">min</value> - </typedef> - <typedef name="columnnumber" type="ENUMERATION"> - <value name="1">1</value> - <value name="2">2</value> - <value name="3">3</value> - <value name="4">4</value> - <value name="5">5</value> - </typedef> - </typedefs> - -</type-profile></source> + <typedef name="backgroundcolor" type="ENUMERATION"> + <value name="weiss">#ffffff</value> + <value name="hellgrau">#cccccc</value> + <value name="hellgruen">#aab9bf</value> + <value name="dunkelgruen">#46627A</value> + </typedef> + <typedef name="textcolor" type="ENUMERATION"> + <value name="weiss">white</value> + <value name="schwarz">black</value> + <value name="weiss">#ffffff</value> + <value name="hellgrau">#cccccc</value> + <value name="hellgruen">#aab9bf</value> + <value name="dunkelgruen">#46627A</value> + </typedef> + <typedef name="copletsize" type="ENUMERATION"> + <value name="Maximized">max</value> + <value name="Minimized">min</value> + </typedef> + <typedef name="columnnumber" type="ENUMERATION"> + <value name="1">1</value> + <value name="2">2</value> + <value name="3">3</value> + <value name="4">4</value> + <value name="5">5</value> + </typedef> + </typedefs> +</type-profile> +</source> <p>The element section has the same structure a the user profile. For each leave which is changeable by the user the elements section contains an entry for the type of this node. The node is enhanced by two attributes: type @@ -403,53 +408,52 @@ is used by the portal to present the configuration screen for the portal. It displayes for each changeable leave a form field with the corresponding type.</p> - <source> -<type-profile> - <elements> - <layout-profile> - <portal><layouts> - <layout> - <!-- The user can change the background. + <source><type-profile> + <elements> + <layout-profile> + <portal> + <layouts> + <layout> + <!-- The user can change the background. The possible values are taken from the enumeration backgroundcolor. The user gets the title "Background" displayed for the form field. --> - <background> - <color type="backgroundcolor" description="Background"/> - </background> - <font> - <color type="textcolor" description="Font color"/> - </font> - </layout> - </layouts> - <columns> - <!-- The user can change the number of columns --> - <number type="columnnumber" description="Number of columns"/> - </columns> - </portal> - </layout-profile> - - <portal-profile> - <content> - <!-- Using the * the following configuration is applied for + <background> + <color type="backgroundcolor" description="Background"/> + </background> + <font> + <color type="textcolor" description="Font color"/> + </font> + </layout> + </layouts> + <columns> + <!-- The user can change the number of columns --> + <number type="columnnumber" description="Number of columns"/> + </columns> + </portal> + </layout-profile> + <portal-profile> + <content> + <!-- Using the * the following configuration is applied for all columns regardless of their position. --> - <column position="*"> - <width type="CARDINAL" description="Width"/> - <coplets> - <!-- Using the * the following configuration is applied for + <column position="*"> + <width type="CARDINAL" description="Width"/> + <coplets> + <!-- Using the * the following configuration is applied for each coplet. --> - <coplet id="*" position="*" number="*"> - <status> - <!-- The user can change the visibility and size + <coplet id="*" position="*" number="*"> + <status> + <!-- The user can change the visibility and size of the coplet --> - <visible type="BOOLEAN" description="Visible"/> - <size type="copletsize" description="Size"/> - </status> - </coplet> - </coplets> - </column> - </content> - </portal-profile> - </elements> + <visible type="BOOLEAN" description="Visible"/> + <size type="copletsize" description="Size"/> + </status> + </coplet> + </coplets> + </column> + </content> + </portal-profile> + </elements> </type-profile></source> </s3> </s2> @@ -487,64 +491,58 @@ </ul> <p> So here is an example:</p> <source><global-delta> - <!-- No difference to the base profile --> - <layout-delta> - </layout-delta> - - <!-- No difference to the base profile --> - <coplets-delta> - </coplets-delta> - - <!-- This is the starting portal view for all users. + <!-- No difference to the base profile --> + <layout-delta/> + <!-- No difference to the base profile --> + <coplets-delta/> + <!-- This is the starting portal view for all users. It has to be defined in the global profile --> - <portal-profile> - - <!-- This is the content of the portal view --> - <content> - <header> - <coplet id="personalize" position="1"> - <status> - <visible>true</visible> - <size>max</size> - </status> - </coplet> - </header> - <column position="1"> - <width>28%</width> - <!-- The coplets are displayed in the order of their + <portal-profile> + <!-- This is the content of the portal view --> + <content> + <header> + <coplet id="personalize" position="1"> + <status> + <visible>true</visible> + <size>max</size> + </status> + </coplet> + </header> + <column position="1"> + <width>28%</width> + <!-- The coplets are displayed in the order of their position attribute in each column. --> - <coplets> - <coplet id="administration" number="1" position="1"> - <status> - <visible>true</visible> - <size>max</size> - </status> - </coplet> - </coplets> - </column> - - <column position="2"> - <width>50%</width> - <coplets> - <coplet id="banknews" number="2" position="1"/> - </coplets> - </column> - - <column position="3"> - <width>22%</width> - <coplets/> - </column> - </content> -</portal-profile> - -<personal-profile> - <greeting>Herzlich willkommen</greeting> - <messages> - <coplet_not_available>Das coplet ist zur Zeit nicht verfuegbar.</coplet_not_available> - </messages> -</personal-profile> - -</global-delta></source> + <coplets> + <coplet id="administration" number="1" position="1"> + <status> + <visible>true</visible> + <size>max</size> + </status> + </coplet> + </coplets> + </column> + <column position="2"> + <width>50%</width> + <coplets> + <coplet id="banknews" number="2" position="1"/> + </coplets> + </column> + <column position="3"> + <width>22%</width> + <coplets/> + </column> + </content> + </portal-profile> + <personal-profile> + <greeting>Herzlich willkommen</greeting> + <messages> + <coplet_not_available> + The coplet is currently not available. + </coplet_not_available> + </messages> + </personal-profile> +</global-delta> +</source> </s2> <s2 title="The User Status Profile"> <p>The user status profile contains often changing information like @@ -555,15 +553,15 @@ user the status profile contains an XML block with the coplet specific configuration for this coplet.</p> <source><status-profile> - <customization> - <!-- Custom information for each customizable coplet --> - <coplet id="popmail" number="3"> - <host>mail</host> - <password>gsgdgsg</password> - <mailcount>4</mailcount> - <user>walter</user> - </coplet> - </customization> + <customization> + <!-- Custom information for each customizable coplet --> + <coplet id="popmail" number="3"> + <host>mail</host> + <password>gsgdgsg</password> + <mailcount>4</mailcount> + <user>walter</user> + </coplet> + </customization> </status-profile></source> </s2> </s1> @@ -575,47 +573,45 @@ an application configuration for the portal like the example portal called "sunBank" below: <![CDATA[]]></p> <source> <application name="sunBank"> - <configuration name="portal"> <!-- This is the portal configuration --> - <portal-uri>finance-portal</portal-uri> - <profile-cache>true</profile-cache> - <process-coplets-parallel>false</process-coplets-parallel> - <default-coplet-timeout>10000</default-coplet-timeout> - <profile> - <!-- The resource for loading the layout profile --> - <layout-base uri="cocoon://financeresource-layoutprofile"/> - <!-- The resource for loading the base coplets profile --> - <coplet-base uri="cocoon://financeresource-copletprofile"/> - <!-- The optional resource for saving the base coplets profile --> - <coplet-base-save uri="cocoon://financeresource-savecopletprofile"/> - - <!-- The optional type resource --> - <type-base uri="cocoon://financeresource-types"/> - <!-- The optional type resource for the admin configuration --> - <admin-type-base uri="cocoon://financeresource-admintypes"/> - - <!-- The resources for loading/saving the deltas --> - <global-delta-load uri="cocoon://financeresource-globalprofile"/> - <global-delta-save uri="cocoon://financeresource-saveglobalprofile"/> - <role-delta-load uri="cocoon://financeresource-roleprofile"/> - <role-delta-save uri="cocoon://financeresource-saveroleprofile"/> - <user-delta-load uri="cocoon://financeresource-userprofile"/> - <user-delta-save uri="cocoon://financeresource-saveuserprofile"/> - - <!-- Optional resources for loading/saving the status profile + <configuration name="portal"> + <!-- This is the portal configuration --> + <portal-uri>finance-portal</portal-uri> + <profile-cache>true</profile-cache> + <process-coplets-parallel>false</process-coplets-parallel> + <default-coplet-timeout>10000</default-coplet-timeout> + <profile> + <!-- The resource for loading the layout profile --> + <layout-base uri="cocoon://financeresource-layoutprofile"/> + <!-- The resource for loading the base coplets profile --> + <coplet-base uri="cocoon://financeresource-copletprofile"/> + <!-- The optional resource for saving the base coplets profile --> + <coplet-base-save uri="cocoon://financeresource-savecopletprofile"/> + <!-- The optional type resource --> + <type-base uri="cocoon://financeresource-types"/> + <!-- The optional type resource for the admin configuration --> + <admin-type-base uri="cocoon://financeresource-admintypes"/> + <!-- The resources for loading/saving the deltas --> + <global-delta-load uri="cocoon://financeresource-globalprofile"/> + <global-delta-save uri="cocoon://financeresource-saveglobalprofile"/> + <role-delta-load uri="cocoon://financeresource-roleprofile"/> + <role-delta-save uri="cocoon://financeresource-saveroleprofile"/> + <user-delta-load uri="cocoon://financeresource-userprofile"/> + <user-delta-save uri="cocoon://financeresource-saveuserprofile"/> + <!-- Optional resources for loading/saving the status profile which is required for persistent, customizable coplets --> - <user-status-load uri="cocoon://financeresource-loadstatusprofile"/> - <user-status-save uri="cocoon://financeresource-savestatusprofile"/> - - <!-- optional type resources --> - <global-type-delta uri="..."/> - <role-type-delta uri="..."/> - <user-type-delta uri="..."/> - </profile> - <!-- Redirect to this resource, if the user is not authenticated + <user-status-load uri="cocoon://financeresource-loadstatusprofile"/> + <user-status-save uri="cocoon://financeresource-savestatusprofile"/> + <!-- optional type resources --> + <global-type-delta uri="..."/> + <role-type-delta uri="..."/> + <user-type-delta uri="..."/> + </profile> + <!-- Redirect to this resource, if the user is not authenticated to view that coplet --> - <auth-redirect>finance-portal</auth-redirect> - </configuration> - </application></source> + <auth-redirect>finance-portal</auth-redirect> + </configuration> +</application> +</source> <s2 title="Global Portal Configuration"> <p>One mandatory configuration value for the portal is the <em>portal-uri</em>. It must point to a pipeline which produces the portal view @@ -720,16 +716,19 @@ pipeline with the "portal" as the generator, the auth-protect action for defining the application and an stylesheet for creating the presentation: </p> - <source> <map:match pattern="sunbank-portal"> - <map:act type="auth-protect"/> <!-- for getting the portal configuration --> - <map:parameter name="handler" value="portalhandler"/> - <map:parameter name="application" value="sunBank"/> - - <map:generate type="portal"/> <!-- generate the portal view --> - <map:transform src="sunbank/styles/portalHTML.xsl"/> <!-- presentation in HTML --> - <map:serialize/> - </map:act> - </map:match></source> + <source><map:match pattern="sunbank-portal"> + <map:act type="auth-protect"> + <!-- for getting the portal configuration --> + <map:parameter name="handler" value="portalhandler"/> + <map:parameter name="application" value="sunBank"/> + <map:generate type="portal"/> + <!-- generate the portal view --> + <map:transform src="sunbank/styles/portalHTML.xsl"/> + <!-- presentation in HTML --> + <map:serialize/> + </map:act> +</map:match> +</source> <s3 title="The Generated Portal View"> <p>The XML generated by the "portal" generator is not exactly the same as for the user profile. The portal optimizes and reorganizes the profile. @@ -741,124 +740,117 @@ profile.</p> <source><!-- The portal indicates that the following is the portal view --> <portal> - - <!-- The configuration of the portal --> - <configuration> - <!-- This is the uri which should be invoked for rebuilding the portal view + <!-- The configuration of the portal --> + <configuration> + <!-- This is the uri which should be invoked for rebuilding the portal view and for changing the view. The parameter portalprofile is always present and indicates the current profile. --> - <uri>finance-portlets?portalprofile=uprofile:sunBank:user_admin_cocoon</uri> - <!-- This is the uniquie portal profile ID --> - <profile>uprofile:sunBank:user_admin_cocoon</profile> - <media>html</media> <!-- The current media: html or wap --> - </configuration> - - <!-- Now the needed part of the layout profile: --> - <layout> - <portal> - <background> - <color formdescription="Hintergrundfarbe" formpath="portalconf.0.0" formtype="backgroundcolor">#aab9bf</color> - </background> - <font> - <type>Arial, Helvetica, sans-serif</type> - <size>2</size> - <color formdescription="Schriftfarbe" formpath="portalconf.1.0" formtype="textcolor">black</color> - </font> - </portal> - - <coplets> - <title> - <background> - <color>#46627A</color> - </background> - <font> - <type>Arial</type> - <size>2</size> - <color>#ffffff</color> - </font> - </title> - <content> - <background> - <color>#000000</color> - </background> - <font> - <type>Arial</type> - <size>2</size> - <color>#ffffff</color> - </font> - </content> - </coplets> - </layout> - - <!-- This is the portal view: --> - <header> - <coplet id="personalize" position="1" number="1"> - <resource uri="financecoplet-personalize.xml"/> - <configuration> - <mandatory>true</mandatory> - <sizable>true</sizable> - <active>true</active> - </configuration> - <title>Personalisieren</title> - <status> - <visible>true</visible> - <size>max</size> - </status> - <content>..the coplet content...</content> - </coplet> - </header> - - <columns number="3"> - <column position="1" width="28%"> - <coplet id="administration" position="1" number="1"> - <resource uri="financecoplet-administration.xml"/> - <configuration> - <mandatory>false</mandatory> - <sizable>true</sizable> - <active>true</active> - </configuration> - <title>Portal Administration</title> - <status> - <visible formdescription="Sichtbar" formpath="portalconf.4.0" formtype="BOOLEAN">true</visible> - <size formdescription="Groesse" formpath="portalconf.5.0" formtype="copletsize">max</size> - </status> - <content>..the coplet content...</content> - </coplet> + <uri>finance-portlets?portalprofile=uprofile:sunBank:user_admin_cocoon</uri> + <!-- This is the uniquie portal profile ID --> + <profile>uprofile:sunBank:user_admin_cocoon</profile> + <media>html</media> + <!-- The current media: html or wap --> + </configuration> + <!-- Now the needed part of the layout profile: --> + <layout> + <portal> + <background> + <color formdescription="Hintergrundfarbe" formpath="portalconf.0.0" formtype="backgroundcolor">#aab9bf</color> + </background> + <font> + <type>Arial, Helvetica, sans-serif</type> + <size>2</size> + <color formdescription="Schriftfarbe" formpath="portalconf.1.0" formtype="textcolor">black</color> + </font> + </portal> + <coplets> + <title> + <background> + <color>#46627A</color> + </background> + <font> + <type>Arial</type> + <size>2</size> + <color>#ffffff</color> + </font> + </title> + <content> + <background> + <color>#000000</color> + </background> + <font> + <type>Arial</type> + <size>2</size> + <color>#ffffff</color> + </font> + </content> + </coplets> + </layout> + <!-- This is the portal view: --> + <header> + <coplet id="personalize" position="1" number="1"> + <resource uri="financecoplet-personalize.xml"/> + <configuration> + <mandatory>true</mandatory> + <sizable>true</sizable> + <active>true</active> + </configuration> + <title>Personalisieren</title> + <status> + <visible>true</visible> + <size>max</size> + </status> + <content>..the coplet content...</content> + </coplet> + </header> + <columns number="3"> + <column position="1" width="28%"> + <coplet id="administration" position="1" number="1"> + <resource uri="financecoplet-administration.xml"/> + <configuration> + <mandatory>false</mandatory> + <sizable>true</sizable> + <active>true</active> + </configuration> + <title>Portal Administration</title> + <status> + <visible formdescription="Sichtbar" formpath="portalconf.4.0" formtype="BOOLEAN">true</visible> + <size formdescription="Groesse" formpath="portalconf.5.0" formtype="copletsize">max</size> + </status> + <content>..the coplet content...</content> + </coplet> .... </column> - <column position="2" width="50%"> + <column position="2" width="50%"> ... </column> - <column position="3" width="22%"> + <column position="3" width="22%"> ... </column> - </columns> - - <!-- The personal information --> - <personal-profile> - <greeting>Hi there!</greeting> - <messages> - <coplet_not_available>The coplet is currently not available.</coplet_not_available> - </messages> - </personal-profile> + </columns> + <!-- The personal information --> + <personal-profile> + <greeting>Hi there!</greeting> + <messages> + <coplet_not_available>The coplet is currently not available.</coplet_not_available> + </messages> + </personal-profile> </portal></source> </s3> - </s2> - <s2 title="Administration of the portal view"> + </s2> + <s2 title="Administration of the portal view"> <p>Displaying the administration page of the portal is as simple as displaying the portal. The difference lies in changing the generator to the "portal-conf" generator: </p> - <source> <map:match pattern="sunbank-conf"> - <map:act type="auth-protect"> - <map:parameter name="handler" value="portalhandler"/> - <map:parameter name="application" value="sunBank"/> - - <map:generate type="portal-conf"/> - <map:transform src="sunbank/styles/portalconfHTML.xsl"/> - <map:serialize/> - </map:act> - </map:match> -</source> + <source><map:match pattern="sunbank-conf"> + <map:act type="auth-protect"> + <map:parameter name="handler" value="portalhandler"/> + <map:parameter name="application" value="sunBank"/> + <map:generate type="portal-conf"/> + <map:transform src="sunbank/styles/portalconfHTML.xsl"/> + <map:serialize/> + </map:act> +</map:match></source> <p>Make sure to protect the portal configuration generator as the administrator can change all profiles, clear the cache etc. It should only be available for real portal administrators.</p> @@ -873,146 +865,132 @@ profile.</p> <source><!-- The portalconf node indicates that the following is the portal administration view --> <portalconf> - -<!-- The configuration of the portal --> - <configuration> - <!-- This is the uri which should be invoked for rebuilding the portal view + <!-- The configuration of the portal --> + <configuration> + <!-- This is the uri which should be invoked for rebuilding the portal view and for changing the view. The parameter portalprofile is always present and indicates the current profile. --> - <uri>finance-portlets?portalprofile=uprofile:sunBank:user_admin_cocoon</uri> - <!-- This is the uniquie portal profile ID --> - <profile>uprofile:sunBank:user_admin_cocoon</profile> - <media>html</media> <!-- The current media: html or wap --> - </configuration> - - <!-- The layout profile, see chapter about the layout profile --> - <layout-profile> - <portal> - <layouts> - <layout> - <background> - <color formdescription="Hintergrundfarbe" formpath="portalconf.0.0" formtype="backgroundcolor">#aab9bf</color> - </background> - <font> - <type>Arial, Helvetica, sans-serif</type> - <size>2</size> - <color formdescription="Schriftfarbe" formpath="portalconf.1.0" formtype="textcolor">black</color> - </font> - </layout> - </layouts> - - <header> - <exists>true</exists> - </header> - - <columns> - <number formdescription="Anzahl" formpath="portalconf.2.0" formtype="columnnumber">3</number> - </columns> - - <footer> - <exists>false</exists> - </footer> - </portal> - - <coplets> - <layouts> - <layout> - <title> - <background> - <color>#46627A</color> - </background> - <font> - <type>Arial</type> - <size>2</size> - <color>#ffffff</color> - </font> - </title> - <content> - <font> - <type>Arial</type> - <size>2</size> - <color>#000000</color> - </font> - <background> - <color>#ffffff</color> - </background> - </content> - </layout> - </layouts> - </coplets> - - </layout-profile> - - <!-- The coplets profile, see chapter about the coplets profile --> - <coplets-profile> - <coplets> - <coplet id="banknews"> - <resource uri="onlinecoplet-banking.xml"/> - <configuration> - <mandatory>false</mandatory> - <sizable>true</sizable> - <active>true</active> - </configuration> - <title>Banking News</title> - <status> - <visible>true</visible> - <size>max</size> - </status> - </coplet> + <uri>finance-portlets?portalprofile=uprofile:sunBank:user_admin_cocoon</uri> + <!-- This is the uniquie portal profile ID --> + <profile>uprofile:sunBank:user_admin_cocoon</profile> + <media>html</media> + <!-- The current media: html or wap --> + </configuration> + <!-- The layout profile, see chapter about the layout profile --> + <layout-profile> + <portal> + <layouts> + <layout> + <background> + <color formdescription="Hintergrundfarbe" formpath="portalconf.0.0" formtype="backgroundcolor">#aab9bf</color> + </background> + <font> + <type>Arial, Helvetica, sans-serif</type> + <size>2</size> + <color formdescription="Schriftfarbe" formpath="portalconf.1.0" formtype="textcolor">black</color> + </font> + </layout> + </layouts> + <header> + <exists>true</exists> + </header> + <columns> + <number formdescription="Anzahl" formpath="portalconf.2.0" formtype="columnnumber">3</number> + </columns> + <footer> + <exists>false</exists> + </footer> + </portal> + <coplets> + <layouts> + <layout> + <title> + <background> + <color>#46627A</color> + </background> + <font> + <type>Arial</type> + <size>2</size> + <color>#ffffff</color> + </font> + </title> + <content> + <font> + <type>Arial</type> + <size>2</size> + <color>#000000</color> + </font> + <background> + <color>#ffffff</color> + </background> + </content> + </layout> + </layouts> + </coplets> + </layout-profile> + <!-- The coplets profile, see chapter about the coplets profile --> + <coplets-profile> + <coplets> + <coplet id="banknews"> + <resource uri="onlinecoplet-banking.xml"/> + <configuration> + <mandatory>false</mandatory> + <sizable>true</sizable> + <active>true</active> + </configuration> + <title>Banking News</title> + <status> + <visible>true</visible> + <size>max</size> + </status> + </coplet> ... </coplets> - - </coplets-profile> - - <!-- The type profile, see the chapter about the type profile --> - <typedefs> + </coplets-profile> + <!-- The type profile, see the chapter about the type profile --> + <typedefs> ... </typedefs> - - <!-- And now the portal view, see chapter about the portal profile --> - <portal-profile> - - <content> - <header> - <coplet id="personalize" position="1" number="1"> - <status> - <visible>true</visible> - <size>max</size> - </status> - </coplet> - </header> - <column position="1"> - <width formdescription="Breite" formpath="portalconf.3.0" formtype="CARDINAL">28%</width> - <coplets> - <coplet id="administration" position="1" number="2"> - <status> - <visible formdescription="Sichtbar" formpath="portalconf.4.0" formtype="BOOLEAN">true</visible> - <size formdescription="Groesse" formpath="portalconf.5.0" formtype="copletsize">max</size> - </status> - </coplet> + <!-- And now the portal view, see chapter about the portal profile --> + <portal-profile> + <content> + <header> + <coplet id="personalize" position="1" number="1"> + <status> + <visible>true</visible> + <size>max</size> + </status> + </coplet> + </header> + <column position="1"> + <width formdescription="Breite" formpath="portalconf.3.0" formtype="CARDINAL">28%</width> + <coplets> + <coplet id="administration" position="1" number="2"> + <status> + <visible formdescription="Sichtbar" formpath="portalconf.4.0" formtype="BOOLEAN">true</visible> + <size formdescription="Groesse" formpath="portalconf.5.0" formtype="copletsize">max</size> + </status> + </coplet> ... </coplets> - </column> - - <column position="2"> + </column> + <column position="2"> ... </column> - - <column position="3"> + <column position="3"> ... </column> - - </content> - </portal-profile> - - <!-- The personal profile, see the corresponding chapter --> - <personal-profile> - <greeting>Hi there!</greeting> - <messages> - <coplet_not_available>The coplet is currently not available.</coplet_not_available> - </messages> - </personal-profile> -</portalconf></source> + </content> + </portal-profile> + <!-- The personal profile, see the corresponding chapter --> + <personal-profile> + <greeting>Hi there!</greeting> + <messages> + <coplet_not_available>The coplet is currently not available.</coplet_not_available> + </messages> + </personal-profile> +</portalconf> +</source> </s3> </s2> <s2 title="Changing the Profile"> @@ -1069,44 +1047,44 @@ Together with your "real" pipeline for defining the content and doing the presentation, the "auth-protect" action is needed. This action defines the application and portal, the coplet (pipeline) belongs to:</p> - <source> <map:match pattern="licence-coplet"> - <!-- Get the application configuration --> - <map:act type="auth-protect"> - <map:parameter name="handler" value="portalhandler"/> - <map:parameter name="application" value="sunBank"/> - - <!-- The resource containg the licencing information: --> - <map:generate src="cocoon/licencing.xml"/> - - <!-- present it in HTML --> - <map:transform src="sunbank/styles/HTML.xsl"/> - <!-- Serialize it to XML for including in the portal view: --> - <map:serialize/> - </map:act> - </map:match></source> + <source><map:match pattern="licence-coplet"> + <!-- Get the application configuration --> + <map:act type="auth-protect"> + <map:parameter name="handler" value="portalhandler"/> + <map:parameter name="application" value="sunBank"/> + <!-- secure the coplet: --> + <map:act type="portal-auth"> + <map:parameter name="coplet" value="licencing"/> + </map:act> + <!-- The resource containg the licencing information: --> + <map:generate src="cocoon/licencing.xml"/> + <!-- present it in HTML --> + <map:transform src="sunbank/styles/HTML.xsl"/> + <!-- Serialize it to XML for including in the portal view: --> + <map:serialize/> + </map:act> +</map:match> +</source> <p>In addition you can secure the pipeline of the coplet. So only users who can select this coplet in their profile can invoke the pipeline. This extra protection is performed by the "portal-auth" action:</p> - <source> <map:match pattern="licence-coplet"> - <!-- Get the application configuration --> - <map:act type="auth-protect"> - <map:parameter name="handler" value="portalhandler"/> - <map:parameter name="application" value="sunBank"/> - - <!-- secure the coplet: --> - <map:act type="portal-auth"> - <map:parameter name="coplet" value="licencing"/> - </map:act> - - <!-- The resource containg the licencing information: --> - <map:generate src="cocoon/licencing.xml"/> - - <!-- present it in HTML --> - <map:transform src="sunbank/styles/HTML.xsl"/> - <!-- Serialize it to XML for including in the portal view: --> - <map:serialize/> - </map:act> - </map:match></source> + <source><map:match pattern="licence-coplet"> + <!-- Get the application configuration --> + <map:act type="auth-protect"> + <map:parameter name="handler" value="portalhandler"/> + <map:parameter name="application" value="sunBank"/> + <!-- secure the coplet: --> + <map:act type="portal-auth"> + <map:parameter name="coplet" value="licencing"/> + </map:act> + <!-- The resource containg the licencing information: --> + <map:generate src="cocoon/licencing.xml"/> + <!-- present it in HTML --> + <map:transform src="sunbank/styles/HTML.xsl"/> + <!-- Serialize it to XML for including in the portal view: --> + <map:serialize/> + </map:act> +</map:match></source> <p>In this example the coplet is protected by the use of the parameter tag inside the "portal-auth" action. Only if the user is allowed to view/configure the coplet with the ID "licencing", he can invoke this resource. @@ -1126,49 +1104,50 @@ the information can be included in the current xml stream of a coplet.</p> <p>The content of the context looks like the following:</p> <source><layout> - <portal> - <background> - <color formdescription="Hintergrundfarbe" formpath="portalconf.0.0" formtype="backgroundcolor">#aab9bf</color> - </background> - <font> - <type>Arial, Helvetica, sans-serif</type> - <size>2</size> - <color formdescription="Schriftfarbe" formpath="portalconf.1.0" formtype="textcolor">black</color> - </font> - </portal> - - <coplets> - <title> - <background> - <color>#46627A</color> - </background> - <font> - <type>Arial</type> - <size>2</size> - <color>#ffffff</color> - </font> - </title> - <content> - <background> - <color>#000000</color> - </background> - <font> - <type>Arial</type> - <size>2</size> - <color>#ffffff</color> - </font> - </content> - </coplets> + <portal> + <background> + <color formdescription="Hintergrundfarbe" formpath="portalconf.0.0" formtype="backgroundcolor">#aab9bf</color> + </background> + <font> + <type>Arial, Helvetica, sans-serif</type> + <size>2</size> + <color formdescription="Schriftfarbe" formpath="portalconf.1.0" formtype="textcolor">black</color> + </font> + </portal> + <coplets> + <title> + <background> + <color>#46627A</color> + </background> + <font> + <type>Arial</type> + <size>2</size> + <color>#ffffff</color> + </font> + </title> + <content> + <background> + <color>#000000</color> + </background> + <font> + <type>Arial</type> + <size>2</size> + <color>#ffffff</color> + </font> + </content> + </coplets> </layout> <configuration> - <!-- This is the uri which should be invoked for rebuilding the portal view + <!-- This is the uri which should be invoked for rebuilding the portal view The parameter portalprofile is always present and indicates the current profile. --> - <uri>finance-portlets?portalprofile=uprofile:sunBank:user_admin_cocoon</uri> - <!-- This is the uniquie portal profile ID --> - <profile>uprofile:sunBank:user_admin_cocoon</profile> - <media>html</media> <!-- The current media: html or wap --> -</configuration></source> + <uri>finance-portlets?portalprofile=uprofile:sunBank:user_admin_cocoon</uri> + <!-- This is the uniquie portal profile ID --> + <profile>uprofile:sunBank:user_admin_cocoon</profile> + <media>html</media> + <!-- The current media: html or wap --> +</configuration> +</source> <p>Using this information the coplet can layout itself with the layout chosen by the user for the portal. For example a <em><session:getxml context="portal" path="/layout/coplets/content/background/color"/></em> is @@ -1206,24 +1185,23 @@ mail coplet which requires the configuration for a mail host, a user name and a password.</p> <source><page xmlns:session="http://cocoon.apache.org/session/1.0"> - <!-- Define a form --> - <session:form name="popmail" method="POST"> - <session:action> - <!-- The action is send to the pipeline redisplaying the portal --> - <session:getxml context="portal" path="/configuration/uri"/> - </session:action> - <!-- Create the input fields for + <!-- Define a form --> + <session:form name="popmail" method="POST"> + <session:action> + <!-- The action is send to the pipeline redisplaying the portal --> + <session:getxml context="portal" path="/configuration/uri"/> + </session:action> + <!-- Create the input fields for host, username and password --> - <session:content> - <session:inputxml context="portal" path="/coplet-data/host" name="Host" type="text"/> - <session:inputxml context="portal" path="/coplet-data/user" name="User" type="text"/> - <session:inputxml context="portal" path="/coplet-data/password" name="Password" type="password"/> - </session:content> - <!-- The submit button --> - <input type="submit" value="Customize"/> - </session:form> -</page> - </source> + <session:content> + <session:inputxml context="portal" path="/coplet-data/host" name="Host" type="text"/> + <session:inputxml context="portal" path="/coplet-data/user" name="User" type="text"/> + <session:inputxml context="portal" path="/coplet-data/password" name="Password" type="password"/> + </session:content> + <!-- The submit button --> + <input type="submit" value="Customize"/> + </session:form> +</page></source> <p>The <em>inputxml</em> tags assure that the information provided by the user is automatically written into the <em>portal</em> context at the places provided.</p> @@ -1231,19 +1209,22 @@ the <em>getxml</em> command to retrieve to configuration from the <em>portal</em> context:</p> <source><page xmlns:session="http://cocoon.apache.org/session/1.0"> - <!-- Get the configuration information out of the portal context --> - <!-- and feed it into the getmail command --> - <session:getmail> - <session:user> <!-- Set the user --> - <session:getxml path="/coplet-data/user" context="portal"/> - </session:user> - <session:password> <!-- Set the password --> - <session:getxml path="/coplet-data/password" context="portal"/> - </session:password> - <session:host> <!-- Seet the host --> - <session:getxml path="/coplet-data/host" context="portal"/> - </session:host> - </session:getmail> + <!-- Get the configuration information out of the portal context --> + <!-- and feed it into the getmail command --> + <session:getmail> + <session:user> + <!-- Set the user --> + <session:getxml path="/coplet-data/user" context="portal"/> + </session:user> + <session:password> + <!-- Set the password --> + <session:getxml path="/coplet-data/password" context="portal"/> + </session:password> + <session:host> + <!-- Seet the host --> + <session:getxml path="/coplet-data/host" context="portal"/> + </session:host> + </session:getmail> </page></source> <p>Each time the coplet configuration changes the user status profile is automatically saved.</p> @@ -1264,5 +1245,3 @@ </s1> </body> </document> - -
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]