Skip Headers
Oracle® Workspaces Application Developer's Guide
10g Release 1 (10.1.2)

Part Number B25480-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

4 Developing Workspace Templates with XML

Templates are XML documents that are used to create new workspaces with some predefined settings and content. These settings and content include workspace properties, library structure, library content, discussion forums, tasks, views, and members.

Templates can be created by using any standard XML editing tool or the Java SDK. An XSD for the workspace template is provided.Templates can also be generated from an existing workspace by a member who is an administrator of that workspace. These templates can be further edited for more granular control of the template.Templates are stored in the Oracle Workspaces application by an Oracle Workspaces application administrator. The template can be stored either through the Oracle Workspaces Web client or the Java SDK.

This chapter describes the following topics related to developing workspace templates:

Generating Templates from Existing Workspaces

You must have the role of administrator in the workspace from which you want to generate a template. You may generate a template by one of the following ways:

Creating Templates

Templates can be created using a standard XML editing tool or using the Java SDK. An XSD for the Template is provided.

Retrieve the template XML schema definition (XSD) file by using one of the following options as an application administrator:

Use any XML tool to create a new template based on this XSD file.

Sample Template XML File

The following is a sample template that will create a workspace with the following entities and properties:

<workspaceTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://www.oracle.com/cw/wstemplate"
  xsi:schemaLocation=
"http://www.oracle.com/cw/wstemplate http://www.oracle.com/cw/wstemplate.xsd">
  <templateProperties>
    <name>New Product Launch Marketing Template</name>
    <description>
Workspace template for coordinating marketing activities for launching a new
product
    </description>
    <category>system.marketing</category>
    <createdBy>System</createdBy>
    <createdOn>2004-10-01T18:43:10.000000</createdOn>
  </templateProperties>
  <workspaceDetails>
    <properties>
      <MEMBERSHIP_NOTIFICATION>ALL_MEMBERS</MEMBERSHIP_NOTIFICATION>
      <MEMBER_ACCESS>ENABLED</MEMBER_ACCESS>
      <MEMBER_DEFAULT_ROLE>READER</MEMBER_DEFAULT_ROLE>
      <PUBLICLY_LISTED>false</PUBLICLY_LISTED>
    </properties>
    <resources>
      <resource xsi:type="CalendarType">
        <name>Meetings</name>
        <description>Tracks project meetings and tasks</description>
        <vtodos>
          <vtodo id="cust_ref_task">
            <summary>Prepare Reference Customer List</summary>
            <description>Prepare a list of reference customers</description>
            <priority>5</priority>
          </vtodo>
          <vtodo id="comp_anal_task">
            <summary>Complete competitive analysis</summary>
            <description>
Gather information about features supported by the competitors
and perform competitive analysis
            </description>
            <priority>5</priority>
          </vtodo>
        </vtodos>
      </resource>
      <resource xsi:type="FilesType">
        <name>Library</name>
        <description>Workspace document library</description>
        <libraryDetails>
          <folders>
            <folder>
              <name>Advertising</name>
              <description>
Folder for information related to advertising campaigns
              </description>
              <folderDetails>
                <files>
                  <file>
                    <name>AnalystDayPresentation.ppt</name>
                    <description>Presentation for analyst day</description>
                  </file>
                  <file>
                    <name>Budget.xls</name>
                    <description>Budget for advertising campaigns</description>
                  </file>
                  <file>
                    <name>Options.xls</name>
                    <description>Advertising options</description>
                  </file>
                  <file>
                    <name>RoadShows.xls</name>
                    <description>Road show details</description>
                  </file>
                </files>
              </folderDetails>
            </folder>
            <folder>
              <name>Customers</name>
              <description>
Folder for storing information related to customers
              </description>
              <folderDetails>
                <files>
                  <file id="2042#542919">
                    <name>CustomerFAQ.doc</name>
                    <description>
Answers for frequently asked questions
                    </description>
                  </file>
                  <file id="2042#542933">
                    <name>CustomerFeedback.xls</name>
                    <description>
Customer feedback on the product
                    </description>
                  </file>
                  <file id="2042#542924">
                    <name>CustomerReferences.xls</name>
                    <description>List of reference customers</description>
                  </file>
                  <file id="2042#543125">
                    <name>Issues.xls</name>
                    <description>For tracking customer issues</description>
                  </file>
                </files>
              </folderDetails>
            </folder>
            <folder>
              <name>Market Intelligence</name>
              <description>
Folder for storing market intelligence information
              </description>
              <folderDetails>
                <files>
                  <file>
                    <name>CompetitorFeatures.doc</name>
                    <description>
Summary of features supported by product competitors
                    </description>
                  </file>
                  <file>
                    <name>MarketOverview.doc</name>
                    <description>Market share overview</description>
                  </file>
                </files>
              </folderDetails>
            </folder>
            <folder>
              <name>Partners</name>
              <description>
Folder for information about internal and external partners
              </description>
              <folderDetails>
                <files>
                  <file id="2042#543071">
                    <name>PartnersList.xls</name>
                    <description>List of product partners</description>
                  </file>
                </files>
              </folderDetails>
            </folder>
            <folder>
              <name>Pricing</name>
              <description>
Folder for information needed for analyzing pricing options
              </description>
              <folderDetails>
                <files>
                  <file id="2042#543025">
                    <name>PricingOptions.xls</name>
                    <description>List of pricing options</description>
                  </file>
                </files>
              </folderDetails>
            </folder>
            <folder>
              <name>Product Collaterals</name>
              <description>
Folder for storing product collaterals
              </description>
              <folderDetails>
                <files>
                  <file id="2042#542833">
                    <name>ProductDataSheet.doc</name>
                    <description>Data sheet for the product</description>
                  </file>
                </files>
                <folders>
                  <folder id="2042#542839">
                    <name>White Papers</name>
                    <description>
Folder for storing product white papers
                    </description>
                  </folder>
                </folders>
              </folderDetails>
            </folder>
          </folders>
        </libraryDetails>
      </resource>
      <resource xsi:type="DiscussionsType">
        <name>TD</name>
        <description>Workspace discussion forums</description>
        <boards>
          <board id="2044#TD_B%9944">
            <name>Advertising Campaign Ideas</name>
            <description>
A board for discussing new ideas for advertising campaigns
            </description>
          </board>
          <board>
            <name>Marketing Strategies</name>
            <description>
A board for discussing new marketing strategies
            </description>
          </board>
        </boards>
      </resource>
      <resource xsi:type="ViewsType">
        <name>Views</name>
        <description>Logical Grouping of workspace contents</description>
        <views>
          <view>
            <name>Customer reference program</name>
            <description>
A view for information related to the customer reference program
            </description>
            <viewItems>
              <itemRef refid="cust_ref_task"/>
              <itemRef refid="2042#542839"/>
              <itemRef refid="2042#542919"/>
              <itemRef refid="2042#542933"/>
              <itemRef refid="2042#542924"/>
              <itemRef refid="2042#543125"/>
              <itemRef refid="2042#543025"/>
              <itemRef refid="2042#542833"/>
            </viewItems>
          </view>
          <view>
            <name>Sales Support</name>
            <description>
A view for information needed by the sales team
            </description>
            <viewItems>
              <itemRef refid="comp_anal_task"/>
              <itemRef refid="2044#TD_B%9944"/>
              <itemRef refid="2042#542839"/>
              <itemRef refid="2042#543071"/>
              <itemRef refid="2042#543025"/>
              <itemRef refid="2042#542919"/>
              <itemRef refid="2042#542933"/>
              <itemRef refid="2042#542924"/>
              <itemRef refid="2042#542833"/>
            </viewItems>
          </view>
        </views>
      </resource>
      <resource xsi:type="EmailType">
        <name>Inbox</name>
        <description>Project email inbox</description>
      </resource>
    </resources>
  </workspaceDetails>
</workspaceTemplate>

Specifying File Locations in Template

Suppose you have a template file that has several files defined in it. If you create a workspace with that template, it will create empty files with names as specified in the template. If you want the template to copy a file instead of creating an empty one, specify the following in the template file:

  1. In a <contentLocation> element, specify the full Oracle Content Services path name of the file to be copied. The user creating a new workspace using this template must have read access to this file in Oracle Content Services.

  2. In a <contentID> element, specify an ID for the file to be copied. This ID is a string that is unique to the template file.

  3. Put the <contentLocation> and <contentID> elements in a <contentLocation> element. Put all <contentLocation> elements in a <contentLocations> element.

  4. In the file definition element (the <file> element) add a <content> element. In this <content> element, add the corresponding <contentID> of the file you would like copied.

The following XML extract copies the contents of /workspaces/files/AnalystDayPresentation.ppt to Advertising/AnalystDayPresentation.ppt in the new workspace:

<templateProperties>
    <!-- Template properties -->
  </templateProperties>
  
  <contentLocations>
    <contentLocation>
      <contentID>0</contentID>
      <location>/workspaces/files/AnalystDayPresentation.ppt</location>
    </contentLocation>  
  </contentLocations>
  
  <workspaceDetails>
    <properties><!-- Workspace properties --></properties>
    <resources>
      <resource xsi:type="FilesType">
        <name>Library</name>
        <description>Workspace document library</description>
        <libraryDetails>
          <folders>
            <folder>
              <name>Advertising</name>
              <description>
                Folder for information related to advertising campaigns
              </description>
              <folderDetails>
                <files>
                  <file>
                    <name>AnalystDayPresentation.ppt</name>
                    <content>
                      <contentID>0</contentID>
                    </content>                    
                    <description>Presentation for analyst day</description>
                  </file>
                </files>
              </folderDetails>
            </folder>
          </folders>
        </libraryDetails>
      </resource>
    </resources>
  </workspaceDetails>

Storing Templates

Templates are stored in the Oracle Workspaces application by an Oracle Workspaces application administrator. They can be stored either through the Oracle Workspaces Web client or the Java SDK.