Creating Catalogs

A catalog is an XML file that defines a set of assets that are available to Mosaic applications on the server. Mosaic assets include tiles, style sheets, runtime shared libraries (RSLs), services, resources, and applications.

In general, when you create a catalog you follow these steps:

  1. Create the following folder structure for the tiles and other assets you want to deploy to the server. It is not necessary to create folders for asset types that you are not using.
    • [ProjectName]\catalogs

    • [ProjectName]\catalogs\Interfaces

    • [ProjectName]\catalogs\Resources

    • [ProjectName]\catalogs\RSLs

    • [ProjectName]\catalogs\Services

    • [ProjectName]\catalogs\Stylesheets

    • [ProjectName]\catalogs\Tiles

    • [ProjectName]\catalogs\Tiles\[tilename] (repeat for each tile in the catalog)

  2. Create an XML file named descriptor.xml in a file editor.

  3. Add tiles, categories, and metadata to the file in XML.

  4. Save the descriptor.xml file to the [ProjectName]/catalogs folder.

  5. Deploy the catalog, and the associated tiles, to the Mosaic server. For more information on deploying, see Deploying assets to the server.

The following example illustrates an empty catalog named sample_catalog. The value of the name attribute corresponds to the value of the name attribute in the mosaic-catalog Ant task used to deploy the catalog. Similarly, the value of the name is used as the value of the catalog attribute of TileReference elements in an application. The value of the name attribute must be unique across all catalogs available on the Mosaic server.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<catalog:Catalog name="[mosaic-catalog Ant task name]" label="Sample Catalog" 
    xmlns:shell="http://ns.adobe.com/Mosaic/Shell/1.0/" 
    xmlns:catalog="http://ns.adobe.com/Mosaic/Catalog/1.0/" 
    xmlns:tile="http://ns.adobe.com/Mosaic/Tile/1.0/" 
    xmlns:view="http://ns.adobe.com/Mosaic/View/1.0/" 
    xmlns:crx="http://ns.adobe.com/Mosaic/CRXTypes/1.0/"> 
</catalog:Catalog>
Note: The example above illustrates the Mosaic namespaces and prefixes used in all Mosaic sample catalog files.

Adding metadata to a catalog

You can add metadata at both the catalog and asset levels in using the Metadata element. However, provide at least a description, using the Description element, for both catalogs and tiles.

The following example extends the sample_catalog example by adding metadata that describes the HTML tile and the catalog.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<catalog:Catalog name="[mosaic-catalog Ant task name]" label="Sample Catalog" 
    xmlns:shell="http://ns.adobe.com/Mosaic/Shell/1.0/" 
    xmlns:catalog="http://ns.adobe.com/Mosaic/Catalog/1.0/" 
    xmlns:tile="http://ns.adobe.com/Mosaic/Tile/1.0/" 
    xmlns:view="http://ns.adobe.com/Mosaic/View/1.0/" 
    xmlns:crx="http://ns.adobe.com/Mosaic/CRXTypes/1.0/"> 
    <crx:Metadata> 
        <crx:Description>Sample Catalog</crx:Description> 
    </crx:Metadata> 
 
    <catalog:Categories> 
        <catalog:Category name="HTML_Tiles"/> 
    </catalog:Categories> 
 
    <tile:TileClassList> 
        <tile:TileClass 
            maxHeight="1200" 
            maxWidth="1200" 
            minHeight="400" 
            minWidth="400" 
            maintainAspectRatio="true" 
            initialHeight="400" 
            initialWidth="400" 
            label="AdobeDotCom" 
            name="Adobe.com" 
            catalog="sampleCatalog"> 
            <crx:Metadata> 
                <crx:Description>Adobe.com</crx:Description> 
                <crx:Category>HTML_Tiles</crx:Category> 
                <crx:Tag>component</crx:Tag> 
            </crx:Metadata> 
            <tile:Content contentType="text/html" uri="http://www.adobe.com"/> 
        </tile:TileClass> 
    </tile:TileClassList> 
</catalog:Catalog>

For more information on the child elements and attributes of the Metadata element, see LiveCycle Mosaic 9.5 XML Schema Reference.

Adding categories to a catalog

To assist organizing your tiles, you can create categories within a catalog. Then, you associate tiles with a particular category. For example, you could create categories to store tiles for each Mosaic application separately, or create a category explicitly for HTML tiles.

The following example extends the sample_catalog example by adding a single category for HTML tiles and adds a single HTML tile associated with the category.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<catalog:Catalog name="sample_catalog" label="Sample Catalog" 
    xmlns:shell="http://ns.adobe.com/Mosaic/Shell/1.0/" 
    xmlns:catalog="http://ns.adobe.com/Mosaic/Catalog/1.0/" 
    xmlns:tile="http://ns.adobe.com/Mosaic/Tile/1.0/" 
    xmlns:view="http://ns.adobe.com/Mosaic/View/1.0/" 
    xmlns:crx="http://ns.adobe.com/Mosaic/CRXTypes/1.0/">  
 
    <catalog:Categories> 
        <catalog:Category name="HTML_Tiles"/> 
    </catalog:Categories>  
 
    <tile:TileClassList> 
        <tile:TileClass 
            maxHeight="1200" 
            maxWidth="1200" 
            minHeight="400" 
            minWidth="400" 
            maintainAspectRatio="true" 
            initialHeight="400" 
            initialWidth="400" 
            label="AdobeDotCom" 
            name="Adobe.com" 
            catalog="sampleCatalog"> 
            <crx:Metadata> 
                <crx:Description>Adobe.com</crx:Description> 
                <crx:Category>HTML_Tiles</crx:Category> 
                <crx:Tag>component</crx:Tag> 
            </crx:Metadata> 
            <tile:Content contentType="text/html" uri="http://www.adobe.com"/> 
        </tile:TileClass> 
    </tile:TileClassList> 
</catalog:Catalog>

Tiles can be associated with multiple categories, or none. For more information on the attributes of the Category element, see LiveCycle Mosaic 9.5 XML Schema Reference.

Adding assets to a catalog

You add Mosaic assets to a Mosaic catalog by adding their definition to the descriptor.xml file that defines the catalog. Mosaic assets include tiles, style sheets, services, and images, as well as panels, and views you want to reuse across applications.

Add a Flex tile to a catalog:

  1. Open a catalog descriptor.xml file in a text or XML editor.

  2. Add a new tile:TileClass element as a child of the tile:TileClassList element in the catalog, and specify the appropriate information for your tile.

    Note: The value of the name attribute of the tile:TileClass element is the filename of the tile excluding the filename extension.

The following example adds the TileTimer tile from the TileGame sample application to a catalog:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<catalog:Catalog name="sample_catalog" label="Sample Catalog" 
    xmlns:shell="http://ns.adobe.com/Mosaic/Shell/1.0/" 
    xmlns:catalog="http://ns.adobe.com/Mosaic/Catalog/1.0/" 
    xmlns:tile="http://ns.adobe.com/Mosaic/Tile/1.0/" 
    xmlns:view="http://ns.adobe.com/Mosaic/View/1.0/" 
    xmlns:crx="http://ns.adobe.com/Mosaic/CRXTypes/1.0/"> 
 
    <tile:tileClassList> 
        <tile:TileClass initialHeight="296" 
            initialWidth="214" 
            label="Tile Timer" 
            name="TileTimer" 
 
            <crx:Metadata> 
                <crx:Description>Simple Tile Game</crx:Description> 
                <crx:Category>Component</crx:Category> 
                <crx:Tag>component</crx:Tag> 
                <crx:Tag>menu</crx:Tag> 
            </crx:Metadata> 
 
            <tile:Content loadAs="default" 
                contentType="application/x-shockwave-flash" 
                uri="/mosaic/catalogs/sample_catalog/tiles/TileTimer/content"/> 
      
        </tile:TileClass> 
    <tile:TileClassList> 
</catalog:Catalog>

Because the TileTimer tile is based on an application built using Flex, for the tile:Content element, the value of loadAs is "default". For tiles based on Flex modules, set loadAs to "module".

Add an HTML tile to a catalog:

  1. Open a catalog descriptor.xml file in a text or XML editor.

  2. Add a new <tile:TileClass> element as a child of the <tile:TileClassList> element in the catalog. Then, specify the appropriate information for your tile.

    Note: HTML tiles do not have a corresponding file to deploy to the server. Assets that do not have a corresponding file to deploy to the server can use any value for the name attribute. However, this value must be unique among all assets of the same type within the catalog.

The following example extends the sample_catalog example by adding a single HTML tile that displays the Adobe website.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<catalog:Catalog name="sample_catalog" label="Sample Catalog" 
    xmlns:shell="http://ns.adobe.com/Mosaic/Shell/1.0/" 
    xmlns:catalog="http://ns.adobe.com/Mosaic/Catalog/1.0/" 
    xmlns:tile="http://ns.adobe.com/Mosaic/Tile/1.0/" 
    xmlns:view="http://ns.adobe.com/Mosaic/View/1.0/" 
    xmlns:crx="http://ns.adobe.com/Mosaic/CRXTypes/1.0/"> 
    <tile:TileClassList> 
        <tile:TileClass maxHeight="1200" 
            maxWidth="1200" 
            minHeight="400" 
            minWidth="400" 
            maintainAspectRatio="true" 
            initialHeight="400" 
            initialWidth="400" 
            label="AdobeDotCom" 
            name="Adobe.com" 
            catalog="sampleCatalog"> 
            <crx:Metadata> 
                <crx:Description>Adobe.com</crx:Description> 
            </crx:Metadata> 
            <tile:Content contentType="text/html" uri="http://www.adobe.com"/> 
        </tile:TileClass> 
    </tile:TileClassList> 
</catalog:Catalog>

Add a panel to a catalog:

  1. Open a catalog descriptor.xml file in a text or XML editor.

  2. Add a new view:PanelClass element as a child of a view:PanelClassList element in the catalog, and specify the appropriate information for your tile.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<catalog:Catalog name="sample_catalog" label="Sample Catalog" 
    xmlns:shell="http://ns.adobe.com/Mosaic/Shell/1.0/" 
    xmlns:catalog="http://ns.adobe.com/Mosaic/Catalog/1.0/" 
    xmlns:tile="http://ns.adobe.com/Mosaic/Tile/1.0/" 
    xmlns:view="http://ns.adobe.com/Mosaic/View/1.0/" 
    xmlns:crx="http://ns.adobe.com/Mosaic/CRXTypes/1.0/">  
 
    <view:PanelClassList> 
        <view:PanelClass name="Calculators"> 
            <crx:Metadata> 
                <crx:Description>A collection of calculators</crx:Description> 
                <crx:Category>Operations</crx:Category> 
                <crx:Tag>calculator</crx:Tag> 
                <crx:Tag>analytics</crx:Tag> 
            </crx:Metadata> 
            <view:Content> 
                <view:Panel label="Panel 1" width="100%" height="100%"> 
                    <view:Layout name="StackLayout"/> 
                    <catalog:CatalogReference name="sample_catalog" uri="sample_catalog"/> 
                    <TileReference name="Calc" catalog="sample_catalog"/> 
                </view:Panel> 
            </view:Content> 
        </view:PanelClass> 
    </view:PanelClassList> 
     
</catalog:Catalog>

Add a view to a catalog:

  1. Open a catalog descriptor.xml file in a text or XML editor.

  2. Add a new view:ViewClass element as a child of a view:ViewClassList element in the catalog, and specify the appropriate information for your view.

The following example extends the sample_catalog example by adding several new views:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<catalog:Catalog name="sample_catalog" label="Sample Catalog" 
    xmlns:shell="http://ns.adobe.com/Mosaic/Shell/1.0/" 
    xmlns:catalog="http://ns.adobe.com/Mosaic/Catalog/1.0/" 
    xmlns:tile="http://ns.adobe.com/Mosaic/Tile/1.0/" 
    xmlns:view="http://ns.adobe.com/Mosaic/View/1.0/" 
    xmlns:crx="http://ns.adobe.com/Mosaic/CRXTypes/1.0/">  
 
    <view:ViewClassList> 
        <view:ViewClass name="Financial Services" label="Financial Services"> 
            <crx:Metadata> 
                <crx:Description>A sample workspace, contains at least one panel.></crx:Description> 
                <crx:Category>Finance</crx:Category> 
                <crx:Tag>business</crx:Tag> 
            </crx:Metadata> 
            <crx:Context/> 
            <view:Content> 
                <view:View> 
                    <view:PanelReference name="Calculators" catalog="sample_catalog"/> 
                    <view:Panel> 
                        <!-- inline panel elements --> 
                    </view:Panel> 
                </view:View> 
            </view:Content> 
        </view:ViewClass> 
        <view:ViewClass name="Executive Dashboard" label="Executive Dashboard"> 
            <crx:Metadata> 
                <crx:Description>A sample workspace.</crx:Description> 
                <crx:Category>Operations</crx:Category> 
                <crx:Tag>executive</crx:Tag> 
            </crx:Metadata> 
            <crx:Context> 
                <crx:Data key="ADBE" type="string" value="<symbol=ADBE;viewBy=quarter;descriptions=short>"/> 
            </crx:Context> 
            <view:Content/> 
        </view:ViewClass> 
    </view:ViewClassList> 
</catalog:Catalog>

Add a style sheet to a catalog:

  1. Open a catalog descriptor.xml file in a text or XML editor.

  2. Add a new view:StyleSheetClass element as a child of a view:StyleSheetClassList element in the catalog, and specify the appropriate information for your style sheet.

The following example extends the sample_catalog example by adding a single style sheet with customized navigation styles:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<catalog:Catalog name="sample_catalog" label="Sample Catalog" 
    xmlns:shell="http://ns.adobe.com/Mosaic/Shell/1.0/" 
    xmlns:catalog="http://ns.adobe.com/Mosaic/Catalog/1.0/" 
    xmlns:tile="http://ns.adobe.com/Mosaic/Tile/1.0/" 
    xmlns:view="http://ns.adobe.com/Mosaic/View/1.0/" 
    xmlns:crx="http://ns.adobe.com/Mosaic/CRXTypes/1.0/"> 
    <view:StylesheetClassList> 
        <view:StylesheetClass 
            name="NavigationStyles" 
            catalog="sampleCatalog" > 
             
            <crx:Metadata> 
                <crx:Description>An example of an alternate navigation control for Views and ViewManagers.</crx:Description> 
            </crx:Metadata> 
 
            <view:Content 
                uri="/mosaic/catalogs/sampleCatalog/Stylesheets/NavigationStyles/content" 
                contentType="application/x-shockwave-flash" 
            /> 
 
        </view:StylesheetClass> 
    </view:StylesheetClassList> 
</catalog:Catalog>

After you add a style sheet to a catalog, you can reference styles from the style sheet in applications. For more information, see Default styles.

Creating policy-protected catalogs

To restrict access to Mosaic assets, you create policies that define which user roles are entitled to access the assets. Mosaic assets include applications, catalogs, tiles, style sheets, views, panels, and resources. You create roles and assign users to them using LiveCycle Administration Console.

For more information about creating policies and assigning them to applications, see Creating and Assigning Policies.

Including Runtime Shared Libraries (RSLs) in a catalog

There are two locations where you can include Flex tile RSLs inside a catalog:

  • In the tile directory with the generated SWF file (for example, [ProjectName]/[CatalogName]/Tiles/[tilename]/)

  • In the catalog RSLs folder (for example, [ProjectName]/[CatalogName]/RSLs)

You do not add references to the RSLs to the catalog descriptor.xml. The RSLs are included in the catalog archive by adding the files to the appropriate folder, described above.

Note: Always compile Flex tiles with absolute RSL URLs. This step is required for the tile to function correctly in the Mosaic desktop client.

Deploying a catalog

Once you have created a catalog descriptor.xml file, deploy the catalog to the Mosaic server. After you deploy the catalog, the catalog and its associated assets are available to Mosaic applications.

For more information on deploying catalogs to the Mosaic server, see Deploying assets to the server.