XML Configuration

Extensibility covers the mechanisms by which you, as the user or developer, can extend the functionality of the Teradata Database, for example with the use of User Defined Functions, or UDFs.
Teradata Employee

XML Configuration

Configuration of two XML files in your portlet's WEB-INF folder is required to integrate your portlet with VISA. The first file is the familiar web.xml where listener and filter classes are configured. The second file, also in WEB-INF, must be named viewpoint-portlet.xml, and contains the declaration of your portlet's security domain, in addition to other Viewpoint-specific portlet metadata.


The following XML stanza must be configured in the appropriate location in WEB-INF/web.xml:


The ConfigLoaderContextListener class is invoked on startup of the portlet webapp, and simply triggers the loading of the viewpoint-portlet.xml file.



The SecurityFilter class is a key component of the VISA implementation, and must be present in all portlet web.xml files.


Let's take a look at a relatively simple configuration, from the Calendar portlet.

<?xml version="1.0" encoding="UTF-8"?>

<portlet id="Calendar" label="Calendar">
<config-url />

<domain id="Calendar">
<permission scope="domain" name="CREATE_EVENT" />
<permission scope="domain" name="EDIT_ANY_EVENT" />
<permission scope="domain" name="EDIT_OWN_EVENT" />


Let's look at the each of the XML elements in turn:

viewpoint-configRoot element. 
portletone element must be present for each portlet in the webapp.id: uniquely identify the portlet.

label: the display name for the portlet.
versionthe version of this portlet 
categorythe category of this portlet; defines where the portlet appears in hierarchical lists and menus, such as the Add Content menu 
web-contextthe path at which the webapp containing this portlet is deployed into the servlet container 
config-urlthe URL of the portlet's configuration screen, if the portlet provides one 
help-urlthe URL of the portlet's online help 
supported-localeList of languages that this portlet supports  
resource-bundleThe name of the properties resource bundle that contains localized strings for portlet title, category and permissions 
domaineach portlet stanza must include a domain element with the same idvalue as the portlet element; optionally one or more additional domains may also be declaredid: must be unique for the Viewpoint installation
permissionone element must be present for each permission in the domainscope: one of domain or resource

name: must be unique for this domain

description: optional informative text
dependencyindicates that this domain has a dependency on another domaindepends-on-domain: the domain on which this domain has a dependency

depends-on-permission: the permission in the other domain on which this domain depends

Now let's take a look at a slightly more complicated example, this time from the System Health portlet.

<?xml version="1.0" encoding="UTF-8"?>
<portlet id="SystemHealth" label="System Health">


<domain id="SystemHealth">
<dependency depends-on-domain="com.teradata.viewpoint.globaldataentity.TeradataSystem" depends-on-permission="ACCESS_GLOBAL_ENTITY" />

<!-- resource permissions -->
<permission scope="domain" name="SET_PREFS" description="If granted, the user can access the preferencess view" />
<permission scope="domain" name="SHARE_PORTLET" description="If granted, the user can share the portlet" />
<permission scope="resource" name="VIEW_SUMMARY" description="If granted, the user can view the summary info for a particular system" />
<permission scope="resource" name="VIEW_DETAIL" description="If granted, the user can view the detail info (drill down) for a particular system" />