Using External Content as native assets in WebCenter Sites 11.1.1.8
Is your organization leveraging videos in YouTube and embedding into organizations website via Video/Media assets? Is your organization's press releases managed in different sites and displaying them in organization's website using iFrames? Is your organization's product knowledge base articles managed in external sites and displayed on a product page? Or perhaps your content contributors are recreating the content in Web Center Sites instead of just referring to the application service provider APIs?
If you answered yes to any of the above, then the new Oracle WebCenter Sites (WCS) 11.1.1.8 version brings some much needed features that you will enjoy! If you were implementing the above scenarios prior to this release, the you would have likely used one of following solutions to address such requirements:
- Site developers develop an application to fetch and create external content as assets in Web Center Sites
- Content contributors recreate the content as assets in webcenter sites
- Import external content into WCS catalog.
In these approaches, there is always a chance of having outdated content between consumed & provider applications. To overcome this situation one needed to develop a system to periodically sync the data between provider & consumer application using scheduled jobs. With the Oracle .8 release, we now have the following new feature to integrate external content into WebCenter Sites and use them as native assets to WCS:
Proxy Asset Types in WebCenter Sites 11.1.1.8
Proxy asset enables to store external content references in WebCenter sites and provides the appropriate customization hooks to enable standard CMS features like Search, Associate, View, Workflow, Publish to destination.
Assumption
External application provides read API and can be accessible from Management, Delivery environments.
How It Works
Like AssetMaker to create basic asset types, Sites provides new feature called "Proxy Asset Maker” via the admin tab. With this feature, developers can create any number of proxy asset types. After creating the Proxy Asset and before enabling Proxy Asset to content contributors, developers have to create a few customizations to enable "Search, Content Tree and Inspect” features.
Proxy assets stores only externalid value along with standard fields in asset type table. As it stores only external ID out of the box, search, inspect,and content tree features will not be intuitive or user friendly for content contribution. Making it user friendly required customizing the contributor UI. All of the documentation for UI Customization is provided in WebCenter Sites developer document chapter 48.
- Generic Search
- Search List Undocked
- Search List Docked
- Search Thumbnail Undocked
- Search Thumbnail Docked
- Inspect (View Asset)
- Content Tree
After customizing, users can use proxy asset as native assets with limitations.
- Custom attributes are not supported
- Named or unnamed associations cannot be attached to Proxy Assets (but they can be children in relationships).
- Subtypes are not supported
- Cannot be managed translations within in the Web Center Sites (Dimensions, DimensionSets)
- Users cannot edit proxy assets
- Revision tracking is not supported
- WebCenter Sites has no way to know when any content is modified, or even if content is modified.
- WebCenter Sites search is limited to External application API capability. Every time user performs a search in Contributor UI, WCS performs a search on external application, register the search results in WCS and display them.
- Access restrictions depend on content provider application APIs.
- Proxy asset will not be deleted from WCS upon deleting from external system.
What users can do using Proxy Assets?
- Search, Browser in tree tabs as native assets
- Drag & drop into page slots / associations
- Publish to destination
- Be part of workflow process
- Embed or Include asset in CKEditor / TextArea content.
Proxy Asset Creation
As proxy asset points to external content, there will not be any New, Edit forms, however relevant content appears in Search results, Content Tree tabs, Associations by customizing respective functionalities. WebCenter Sites provides the the following tags to create external content as proxy asset and use them in search results, content tree, templates, associations.
- <proxy:register/> - Creates an asset in WCS, As part of asset registration we should provide the external content id, name.
- <proxy:createstore /> - Initializes a new store
- <proxy:addstoreitem /> - Adds an item to a given store.
- <proxy:tojson /> - Serializes a store to JSON to use in Grid Widgets like Search Results, Content Tree.
High-level steps to create proxy assets
1. Create the Proxy asset using Admin Tab > Proxy Asset Maker
2. Develop a process to call external api with the help of Client, ClientReponse, WebResource classes and parse response. This can be added to system event.
3. For each response item, create the proxy asset with <proxy:register /> tag
Steps to implement Tree Tabs (Without Categorization)
1. Develop standard tree tab widget elements to load proxy asset data.
- <ProxyAssetType>/Tree/Root - Renders the tree root nodes, that is, the content categories.
- <ProxyAssetType>/Tree/Load - Renders all content under a given category.
2. Create a Tree Tab via Admin Tab > Tree > Add New Tree Tab & provide the Section Name, Element Name as <ProxyAssetType>/Tree/Root for your Proxy Asset type.
Steps to implement Search
1. Based on User Search input, generate query to fetch data from external content provider
2. Load search results using third party external API
3. Register each search result with <proxy:register/>
4. Create the data store to with <proxy:createstore />, <proxy:addstoreitem />
5. Export data store into JSON format with <proxy:tojson />
6. Customize the Search Result pages based on required view
CustomElements/<ProxyAssetType>/UI/Layout/CenterPane/Search/View/ThumbnailView CustomElements/<ProxyAssetType>/UI/Layout/CenterPane/Search/View/DockedThumbnailView
CustomElements/<ProxyAssetType>/UI/Layout/CenterPane/Search/View/ThumbnailViewConfig CustomElements/<ProxyAssetType>/UI/Layout/CenterPane/Search/View/DockedThumbnailViewConfig
7. Customize Search Top Bar for Sort option
CustomElements/Dummy/UI/Layout/CenterPane/Search/View/SearchTopBarConfig
8. Configure the Grid Context Menu to remove edit option.
UI/Config/GlobalHtml
Now , overall, WebCenter Sites provides a standard framework to integrate and leverage the external content as native to WCS. In my next blog, I will explain how to integrate with Vimeo videos.
- Log in to post comments