<?xml version="1.0"?>
<!--
Copyright 2004 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
  <properties>
    <title>Jetspeed Decorations</title>
    <subtitle>Documentation for Designers working with Jetspeed Decorations</subtitle>
    <authors>
      <person name="David Sean Taylor" email="taylor@apache.org"/>
    </authors>
  </properties>
  <body>
<section name="Introduction to Decorators">
<p>
Decorators are defined as any static or semi-static markup surrounding a dynamically generated Fragment. 
Decorators are usually written with either Velocity or JSP templates.
Decorators define how a single portal page is aggregated. A layout is made up of:
<ul>
  <li>One or more templates</li>
  <li>A template descriptor</li>
  <li>Images</li>
  <li>A Stylesheet (CSS)</li>
  <li>Macros</li>  
</ul>
</p>
<p>
    <img src='images/layouts/layouts-overview.png'/>
</p>
</section>
<section name='Packaging'>
<p>
Layouts are packaged in a JAR file. Supported decorators: 
<ul>
    <li>Page Decorators</li>
    <li>Portlet Decorators</li>
    <li>Generic Decorators</li>    
    <li>Localized Decorators</li>
</ul>
Operations Supported:
<ul>
    <li>Deploy</li>
    <li>Un-deploy</li>
    <li>Re-deploy</li>
</ul>
The decorator.properties file must be located in the root directory of the jar archive and 
contain the properties outlined in the next slide to be identified as a decorator by the auto 
deployment system. The deployer will relocate the locale specific content to satisfy J2 
content locators as necessary on deploy and undeploy. The current implementation supports 
only 2 character language and country codes.    
</p>    
</section>
<section name='Decorator Properties'>
<p>
The decorator.properties file must be located in the root directory of the jar archive and 
contain the properties outlined above to be identified as a decorator by the auto-deployment system. 
</p>
<p>
A deployable decorator must have the following properties set or defaulted in the decorator.properties 
configuration:

<source test=""><![CDATA[

id = IDENTIFIER
media.type=  HTML | WML
decorates =  layout | portlet | any

]]></source>

To avoid conflicts with the locale logic and runtime locators, decorators should be 
named with ids longer than 2 characters in length. The media.type property defaults to 'html'. 
The 'any' value for the decorates property is mapped to the generic deployment directory.
The deployer will relocate the locale specific content to satisfy J2 content locators as 
necessary on deploy and undeploy. The current implementation supports only 2 
character language and country codes.
</p>    
</section>

</body>
</document>

