Oracle® Collaboration Suite Workspaces Application Developer's Guide 10g Release 1 (10.1.1) Part Number B16234-02 |
|
|
View PDF |
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 user interface or the Java SDK.
This chapter describes the following topics related to developing workspace templates:
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:
Oracle Workspaces user interface: Click the name of the workspace > Overview > Settings button > Generate Template button
Java SDK: Call the CwSession.getWorkspaceTemplate method.
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:
Oracle Workspaces user interface: From the Administration > Templates tab, click the button View Template Schema.
Use any XML tool to create a new template based on this XSD file.
The following is a sample template that will create a workspace with the following entities and properties:
The new workspace will have the following properties:
Membership Notification = All members
Member Access = Enabled
Default Member Role = Reader
Workspace Listing = False
Calendar resource with two predefined tasks
Files resource with several predefined folder and file names
Discussion resource with two predefined discussion boards
Email resource
Empty member list (the member list will contain only the workspace creator)
<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>
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:
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.
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.
Put the <contentLocation> and <contentID> elements in a <contentLocation> element. Put all <contentLocation> elements in a <contentLocations> element.
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>
Templates are stored in the Oracle Workspaces application by an Oracle Workspaces application administrator. They can be stored either through the user interface or the Java SDK.
Oracle Workspaces user interface: Click Administration Tab > Templates tab > Store New Template button. You can cut-and-paste the template XML from here.
Java SDK: Call the CwSession.storeWorkspaceTemplate method, passing a string representing the template content