The following is an example of the default site category that is shipped with Site Administration:

<gsa-template>
  <import-items>
<!-- Site Templates -->

<add-item item-descriptor="siteTemplate" id="sa_default_category">
  <set-property name="name"><![CDATA[Default Category]]></set-property>
  <set-property name="description"><![CDATA[This is the default ATG site
      configuration category that will include all available
      properties.]]></set-property>
  <set-property name="itemMappingId"><![CDATA[SiteCategory:default]]>
      </set-property>
</add-item>

</import-items>
</gsa-template>

You create site categories by first creating the view mappings that will be used for the site configuration and then creating the site category configuration file:

  1. Make a copy of the viewmapping.xml file.

  2. Create a item mapping based on the site configuration repository item with a unique name. For example:

    <add-item item-descriptor="itemMapping" id="SaImNewSiteCategory">
      <set-property name="name"><![CDATA[SiteCategory:new category]]>
          </set-property>
      <set-property name="description"><![CDATA[New Site Category
          itemMapping]]></set-property>
      <set-property name="mode"><![CDATA[AmMmDef]]></set-property>
      <set-property name="itemPath"><![CDATA[/atg/multisite/
          SiteRepository]]></set-property>
      <set-property name="itemName"><![CDATA[siteConfiguration]]>
          </set-property>
      <set-property name="formHandler"><![CDATA[SaFhSite]]>
          </set-property>
      <set-property name="viewMappings">
          <![CDATA[SaIvmNewSiteCategory]]></set-property>
      <set-property name="attributes"><![CDATA
          [resourceBundle=SaAvSiteBnd,showCreationId=SaAvCatCreateId]]>
          </set-property>
    </add-item>

  3. Create an item view mapping and item view for the main (general) tab excluding any specific categories or properties you want to hide and including any specific properties you want to see. For example:

    <add-item item-descriptor="itemViewMapping"
        id="SaIvmNewSiteCategory">
      <set-property name="name"><![CDATA[New Site Category
          itemViewMapping]]></set-property>
      <set-property name="displayName">
          <![CDATA[SaIvmSiteDefaultCategory.displayName]]>
          </set-property>
      <set-property name="view"><![CDATA[SaIvBaseSiteConfig]]>
        </set-property>
      <set-property name="propertyMappings">
          <![CDATA[openDate=SaPvmTimeStamp,
          closingDate=SaPvmTimeStamp,
          name=SaPvmSiteName,
          contextRoot=SaPvmSiteURL,
          productionURL=SaPvmSiteURL,
          siteDownURL=SaPvmSiteURL,
          preOpeningURL=SaPvmSiteURL,
          postClosingURL=SaPvmSiteURL,
          additionalProductionURLs=SaPvmAlternativeURL,
          sitePriority=SaPvmSitePriority,
          siteTypes=SaPvmSiteTypes,
          enabled=SaPvmEnableStatus]]></set-property>
       <set-property name="attributeValues"><![CDATA
          [resourceBundle=SaAvSiteBnd,
    includedCategories=SaAvDefCatIncludedCats,
    includeNewProperties=SaAvDefCatIncNewProps]]>
    </set-property>
    </add-item>
    <add-item item-descriptor="attributeValue" id="SaAvDefCatIncNewProps">
      <set-property name="value"><![CDATA[true]]></set-property>
    </add-item>

  4. For each new custom tab, add its itemViewMapping ID to the itemMapping viewMapping property. For example for Tab 1:

    <set-property name="viewMappings">
    <![CDATA[SaIvmNewSiteCategory]]></set-property>

    For Tab 2:

    <set-property name="viewMappings">
    <![CDATA[SaIvmNewSiteCategory, saIvmSecondTab]]></set-property>

    Note: Once you have created the view mappings for the new tab, you must import the file in to the viewMappingRepository.

  5. Create a siteRepository.xml file and use XML-combine to append these to the site configuration item descriptor.

    For example, edit your new copy of /atg/multisite
    /siteRepository.xml
    similar to the following:

    <gsa-template xml-combine="append">
    <item-descriptor name="siteConfiguration" xml-combine="append">
      <table name="New_Table" type="auxiliary" id-column-name="id">
        <property name="New_Property" column-names="New_Property"
             data-type="string" category-resource="NewCategory"
             display-name-resource="New_Property">
          <attribute name="resourceBundle"
             value="atg.multisite.myCategoryResources"/>
        </property>
      </table>
    </item-descriptor>
    </gsa-template>

  6. Create a repository item specifying the item mapping name to use. Refer to Recording Sites within the Site Repository Definition.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices