﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Viewpoint  / Widgets / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Sat, 21 Nov 2009 11:39:44 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>I actually got Eclipse the other day and I had a hard time importing the source code from the project. My whole project got deleted that way too.</description><pubDate>Thu, 02 Jul 2009 12:26:43 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Change the function header to return a SystemHealth object type instead of a List Object.On a side note, I highly recommend you install/use an IDE such as Eclipse, ItelliJ, or NetBeans to help you solve some of these compilation errors. A good IDE will highlight these simple compilation errors and give you tips to help you resolve them.</description><pubDate>Thu, 02 Jul 2009 12:23:23 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>I have Java.util.list already imported so I don't get why i have that error.</description><pubDate>Thu, 02 Jul 2009 12:14:51 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>I'm getting a new error.    [javac] C:\SystemHealth\src\java\com\teradata\portlets\systemhealth\service\impl\SystemHealthManagerImpl.java:57: incompatible types    [javac] found   : com.teradata.dcs.data.model.SystemHealth    [javac] required: java.util.List    [javac]         return result;</description><pubDate>Thu, 02 Jul 2009 12:10:31 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Sure, you will need that as well:public List getCurrentActiveSystemHealth(SystemHealthPreferences preferences){SystemHealth result;Integer id = getSystemId(preferences.getSystem());if (id != null){// fetch the dataresult = systemHealthDAO.getCurrentSystemHealth(id);}return result;}</description><pubDate>Thu, 02 Jul 2009 12:06:05 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>What about the result variable? It won't be able to find the symbol for that and "Id"</description><pubDate>Thu, 02 Jul 2009 12:00:57 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>You are trying to pass in a List of Integer objects to the getCurrentSystemHealth(int) function. This function takes a single system id int (or Integer) only:public List getCurrentActiveSystemHealth(SystemHealthPreferences preferences){Integer id = getSystemId(preferences.getSystem());if (id != null){// fetch the dataresult = systemHealthDAO.getCurrentSystemHealth(id);}return result;}</description><pubDate>Thu, 02 Jul 2009 11:51:30 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Ok let me just throw away that question and explain whats going on.  I'm building a portlet that displays system health.  I wasn't sure if I could display systemhealth on any widget but you explained to me that it was possible to do that. I've decided to use the TableWidget which was used the the SkewedSessions Tutorial. Now, I was confused about how you fetch the data because on the SkewedSessions tutotial the "getCurrentActiveSessions" was used with List   and I tried the same with my code but I get this error. [b]    [javac] C:\SystemHealth\src\java\com\teradata\portlets\systemhealth\service\impl\SystemHealthManagerImpl.java:53: getCurrentSystemHealth(int) in com.teradata.dcs.data.dao.SystemHealthDAO cannot be applied to (java.util.List&amp;lt;java.lang.Integer&amp;gt;)    [javac]             result = systemHealthDAO.getCurrentSystemHealth(systemIds);    [javac][/b]I have also copied the section I am talking about and the copy of my code. I wasn't sure where the data is being fetched from so I think thats where I confused myself. Could you help me with this code?[b]/**     * Gets a list of active skewed sessions running on the specified system. Each list     * item is a session model.     *     * @param preferences The user's portlet preferences for this portlet instance.     */    public List  getCurrentSkewedSessions(SkewedSessionsPreferences preferences)    {        List ();        Integer id = getSystemId(preferences.getSystem());        if (id != null)        {            List ();            systemIds.add(id);            // fetch the data            result = sessionDAO.getCurrentActiveSessions(systemIds);        }        return result;    }[/b]------------------------------MY CODE-------------------------------------------------------------[b]public List  getCurrentActiveSystemHealth(SystemHealthPreferences preferences)    {        List ();        Integer id = getSystemId(preferences.getSystem());        if (id != null)        {            List ();            systemIds.add(id);            // fetch the data            result = systemHealthDAO.getCurrentSystemHealth(systemIds);        }        return result;    }[/b]</description><pubDate>Thu, 02 Jul 2009 10:42:48 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>You have yourself confused here.The DynamicQuery portlet displays query result sets from queries run directly against the Teradata database. It connects directly to the Teradata database and runs the query you type in, displaying the results of the query.The DCS cache database is where  DCS data collectors persist the data they have collected from the Teradata database. I have given you a basic template to retrieve and display data from the DCS cache database on earlier pages of this thread. It is virtually a cut and paste template that you can reuse for retrieving all types of data. To retrieve data from the DCS cache database, you use the DAOs that have been supplied to you. These DAOs return a List of Model objects with the data. The key to understanding the data is the javadocs. The javadocs for the DAOs and the Models contain the documentation that describes the data associated with them.1. Take a look the API documentation (should be in tdpdk-xx.xx.xx.xx\doc\api). Find the documentation for the package com.teradata.dcs.data.model. All the classes in that package represent the metrics that are collected by the DCS and logged to PostgreSQL currently. Look through the classes and find the metrics (ie. the information you want to display) and take note of what class they are associated with. 2. Each class should have a corresponding Data Access Object (DAO) class that resides under com.teradata.data.dcs.dao. The DAO is what you use to retrieve the data from PostgreSQL.I cannot give you specific help beyond that without you giving me more specific information related to the type of data you are trying to retrieve and display. Different types of information are associated with different DAOs, Models, etc.</description><pubDate>Wed, 01 Jul 2009 17:11:33 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>The DCS cache database.  You know how you can display information from your DCS with the DynamicQuery portlet? Well, I'm trying to use that same DCS to display information on one of those sample portlets. Preferably the Heatmap widget on Widgetopia.</description><pubDate>Wed, 01 Jul 2009 16:46:25 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>You will need to provide more information:1. What database are you referring to? The Teradata database, the DCS cache database, a third-party database?2. What information do you want to display?</description><pubDate>Wed, 01 Jul 2009 15:32:28 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Could you tell me how I can edit the sample Heatmap widget which is included in the Widgetopia to display information from my database? I think it will really further help me with what I am doing.</description><pubDate>Wed, 01 Jul 2009 14:48:54 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>These are very elementary compilation errors. There are symbols in your code that the compiler cannot find. You need to go through all the errors and figure out what symbols the compiler is complaining about. For example, this line:lastPercentInState.put(preferences.getSystem(), statistics.getPercentInState());lastPercentInState is a variable that is never declared.</description><pubDate>Thu, 25 Jun 2009 16:41:37 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Alright. Well, I followed the skewedsessions tutorial and I created a project for the systemhealthDAO. Could I get help with these errors? [b]   [javac] C:\SystemHealth\src\java\com\teradata\portlets\systemhealth\service\impl\SystemHealthManagerImpl.java:93: cannot find symbol    [javac] symbol  : variable lastPercentInState    [javac] location: class com.teradata.portlets.systemhealth.service.impl.SystemHealthManagerImpl    [javac]                   lastPercentInState.put(preferences.getSystem(), statistics.getPercentInState());    [javac]                   ^    [javac] C:\SystemHealth\src\java\com\teradata\portlets\systemhealth\service\impl\SystemHealthManagerImpl.java:98: cannot find symbol    [javac] symbol  : class Session    [javac] location: class com.teradata.portlets.systemhealth.service.impl.SystemHealthManagerImpl    [javac]               List  sessions = sessionDAO.getCurrentActiveSessions(systemIds);    [javac]                        ^    [javac] C:\SystemHealth\src\java\com\teradata\portlets\systemhealth\service\impl\SystemHealthManagerImpl.java:98: cannot find symbol    [javac] symbol  : variable sessionDAO    [javac] location: class com.teradata.portlets.systemhealth.service.impl.SystemHealthManagerImpl    [javac]               List  sessions = sessionDAO.getCurrentActiveSessions(systemIds);    [javac]                                            ^    [javac] C:\SystemHealth\src\java\com\teradata\portlets\systemhealth\service\impl\SystemHealthManagerImpl.java:100: cannot find symbol    [javac] symbol  : class Session    [javac] location: class com.teradata.portlets.systemhealth.service.impl.SystemHealthManagerImpl    [javac]               for (Session session : sessions)    [javac]                        ^    [javac] C:\SystemHealth\src\java\com\teradata\portlets\systemhealth\service\impl\SystemHealthManagerImpl.java:121: cannot find symbol    [javac] symbol  : variable lastPercentInState    [javac] location: class com.teradata.portlets.systemhealth.service.impl.SystemHealthManagerImpl    [javac]         return lastPercentInState.get(systemName);    [javac]                ^    [javac] 17 errors[/b][i]* * SystemHealthManagerImpl.java */package com.teradata.portlets.systemhealth.service.impl;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import com.teradata.portlets.systemhealth.service.SystemHealthManager;import java.util.List;import java.util.Map;import java.util.HashMap;import java.util.ArrayList;import com.teradata.dcs.data.dao.SystemHealthDAO;import com.teradata.dcs.config.model.System;import com.teradata.dcs.config.model.SystemHealthCanaryThreshold;import com.teradata.dcs.config.model.SystemHealthMetricThreshold;import com.teradata.dcs.data.model.SystemHealth;import com.teradata.portlets.systemhealth.model.SystemHealthPreferences;import com.teradata.dcs.data.model.SystemStatistics;import com.teradata.dcs.data.dao.SystemStatisticsDAO;/** * This class implements the Business Delegate pattern. (see * http://java.sun.com/blueprints/corej2eepatterns/Patterns/BusinessDelegate.html). * This class is used to interface between the DAO's (see * http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html) * and the controllers. Business logic should be implemented here. */public class SystemHealthManagerImpl implements SystemHealthManager{    private static Log log = LogFactory.getLog(SystemHealthManagerImpl.class);    private SystemHealthDAO systemHealthDAO;    private SystemStatisticsDAO statisticsDAO;    private Map ();    /**     * Set the statistics DAO.     *     * @param value The Statistics DAO.     */    public void setStatisticsDAO(SystemStatisticsDAO value)    {        statisticsDAO = value;    }    /**     * Set the systemhealth DAO     *     * @param value The Systemhealth DAO.     */    public void setSystemHealthDAO(SystemHealthDAO value)    {         systemHealthDAO = value;    }     /**     * Retrieves a list of the names of the systems that are monitored by the     * Data Collector.     *     * @return A list of system names.     */    public List  getMonitoredSystems()    {	List  systems = systemHealthDAO.getAvailableSystems();        List ();	for  (System system : systems)	{		systemNames.add(system.getName());        }        return systemNames;    }   /**     * Gets a list of active system health on the specified system. Eacg list     * item is a system health model.     *     *@param preferences The user's portlet preferences for this portlet instance.     */    public List  getHealth(SystemHealthPreferences preferences)    {         List ();         Integer id = getSystemId(preferences.getSystem());         if (id != null)         {	     SystemStatistics statistics = statisticsDAO.getCurrentSystemStatistics(id);	     // save the system value             if (statistics != null &amp;&amp; statistics.getPercentInState() &amp;gt; preferences.getSystemHealthMetricThreshold())             {                  lastPercentInState.put(preferences.getSystem(), statistics.getPercentInState());                  List ();		  systemIds.add(id);                    // fetch the data		  List  sessions = sessionDAO.getCurrentActiveSessions(systemIds);        		  for (Session session : sessions)                  {			if ((session.getComputedState().equals("ACTIVE"))			    &amp;&amp;(session.getPercentInState() &amp;gt; preferences.getSystemHealthMetricThreshold()))			{				result.add(session);			}		   }                }             }	     return result;        }       /**     * Get the most recent percent in state for the specified system.     *     * @param systemName the system to monitor.     * @return the percent in state or null if no value has been fetched.     */    public Float getCurrentPercentInState(String systemName)    {        return lastPercentInState.get(systemName);    }}[/i]</description><pubDate>Thu, 25 Jun 2009 16:12:48 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>You can display any type of data with any type of widget. A widget is simply a tool to meaningfully display otherwise boring and/or confusing data. Deciding how to display meaningful data is the decision of the programmer and/or portlet designer.</description><pubDate>Thu, 25 Jun 2009 15:50:42 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Alright, I'll just walk you through what I've done now. I'm not sure these are right. Have I made any mistakes or left anything out?[b]bean id="systemHealthDAO" 		class="com.teradata.dcs.data.dao.ibatis.SystemHealthDAOiBatis"&amp;gt;		description&amp;gt;DAO for accessing System Health 		property name="sqlMapClient" ref="dcsSqlMapClient" /&amp;gt;	/bean&amp;gt;   !-- The SystemHealth manager implemenation --&amp;gt;    bean id="systemHealthManager" class="com.teradata.portlets.systemhealth.service.impl.SystemHealthManagerImpl"&amp;gt;        description&amp;gt;The business delegate for this application 	property name="myJavaSystemHealthDAO" ref="systemHealthDAO"/&amp;gt;    /bean&amp;gt;[/b]1. A reference to your injected DAO object:[b]private SystemHealthDAO myJavaSystemHealthDAO;[/b]2. A setter for the DAO:[b]public void setMyJavSystemHealthDAO(SystemHealthDAO myJavaSystemHealthDAO){this.myJavaSystemHealthDAO = myJavaSystemHealthDAO;}[/b]3. A manager function that retrieves the data:I wasn't sure of what I do here because I think this get function is only for query count[b]public List getMyQueryCountData(int systemId, Timestamp startTime, Timestamp endTime){return myJavaQueryCountDAO.getQueryCountSumOverTime(systemId, startTime, endTime);}[/b]4. "Some function that creates a collection of widget model objects for your desired widget type from the data your have retrieved from the DAO. Widget model objects are under the package com.teradata.tags.widgets.model." I've already created sample widgets but can you use every type of widget for system health?</description><pubDate>Wed, 24 Jun 2009 08:59:57 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Yeah, I know DynamicQuery saves your last statement but what I meant was if there was a way to just set all the infomation that is inputted into the code so that whenever the DQ portlet is deployed it just runs it automatically.  Would it work if I just replaced "username" and "sql" with an actual username and sql statement?</description><pubDate>Mon, 22 Jun 2009 12:49:34 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>"I understand what you're saying but I'm trying to figure out how to do this. Your first post indicated how to put the QueryCountDAO into the two .xml files but I wasn't even sure if that same method could be used for every DAO I use. How do you figure out which property name and reference to use? I also know that the DAOs also have to be implemented in Impl file as well. I followed the skewed sessions and it doesn't completely work. Will following the SkewedSessions sample and using the same method be enough to use any type of DAO?"Take a look at the "What is Dependency Injection" article bundled with the PDK for a brief overview of what is going on here. My earlier post with the QueryCountDAO in the .xml files is essentially a generic template for what you need to be doing for any DAO you will need. You can cut and paste and then change the id, class and any properties being injected and you will have a working bean. The property tag injects a java object into the configured bean at runtime; in the earlier example, the java object is the DAO and the configured bean is the manager. The "name" attribute is that name that corresponds to the variable you are trying to set in the manager. It is case sensitive, so this must be  the same as the manager variable name. The "ref" attribute is a reference to the DAO bean you have declared in your dataSourceiBatis.xml file. The value of the "ref" attribute must exactly match the "id" attribute of the bean that you are trying to inject into your Java Bean.Yes. You can use the same method in SkewedSessions for any type of DAO. You just need to figure out what DAO(s) you will be using to retrieve data and what widget(s) you will be using to display the data. The SkewedSessions example is definitely a good template for almost anything you will need to do.</description><pubDate>Fri, 19 Jun 2009 12:35:04 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>I understand what you're saying but I'm trying to figure out how to do this.  Your first post indicated how to put the QueryCountDAO into the two .xml files but I wasn't even sure if that same method could be used for every DAO I use. How do you figure out which property name and reference to use?  I also know that the DAOs also have to be implemented in Impl file as well. I followed the skewed sessions and it doesn't completely work. Will following the SkewedSessions sample and using the same method be enough to use any type of DAO?</description><pubDate>Fri, 19 Jun 2009 12:01:00 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>"Is there a way to edit the DynamicQuery portlet to just run a certain SQL statement each time without having to type it?"The DynamicQuery portlet already does this for you. It saves the last query, system and username that you have run as a portlet preference. In the executeQuery() function of the DynamicQueryDataserverController.java, the query, system and username are saved to preferences:            // Set the system name in the preferences object            preferences.setSystemName(manager.getSystem(systemId).getName());            // Set the username in the preferences object            preferences.setUsername(username);            // Set the SQL query in the preferences object            preferences.setSqlQuery(sql);            // Save the last query            ctx.savePreferences("DynamicQuery", preferences);In the summary() function of the DynamicQueryViewController.java, the preferences are loaded:        // Retrieve the previous query data        final DynamicQueryPreferences preferences = (DynamicQueryPreferences) ctx.loadPreferences(                "DynamicQuery", new DynamicQueryPreferences());        // Add the data for the previous query        ctx.addViewObject("preferences", preferences);</description><pubDate>Fri, 19 Jun 2009 11:49:46 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>"I'll probably do that but all I learned from it was how to create those Widgets in the sample. I've successfully created all of them but I'm trying to display information from our database. I don't know if I missed it but it doesn't explain that. "On the first page of this topic, I talked about the API documentation (my third post) and explained how "All the classes in that package represent the metrics that are collected by the DCS and logged to PostgreSQL currently". This is where the two pieces fit together. All the data collected from Teradata is logged to PostgreSQL. To retrieve the data, you use the provided DAO function(s) (see my third post for the package locations), which usually return a java.util.List of model objects where each model object contains the data for a single row from PostgreSQL. Now you have the data you need to populate a widget with meaningful data. Now you take that data you have received from the DAO (your List of model objects), create the object for the widget type that you wish to use and populate the widget object with the data you have received from the DAO. This is exactly what the Skewed Sessions portlet does. The getCurrentSkewedSessions() function in SkewedSessionsManagerImpl.java gets the data from the DAO and the summary() function in SkewedSessionsViewController creates a SkewedSessionsTableWidget object that contains the data. The SkewedSessionsTableWidget object extends the TableWidget class and defines the data that the table widget will display.</description><pubDate>Fri, 19 Jun 2009 11:33:10 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Is there a way to edit the DynamicQuery portlet to just run a certain SQL statement each time without having to type it?</description><pubDate>Tue, 16 Jun 2009 09:27:09 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>I'll probably do that but all I learned from it was how to create those Widgets in the sample. I've successfully created all of them but I'm trying to display information from our database. I don't know if I missed it but it doesn't explain that.</description><pubDate>Fri, 12 Jun 2009 10:02:30 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>It shows you exactly what you need to know to populate each widget with meaningful data. It is the simplest available example you will find. The WidgetopiaManagerImpl.java creates all of the models with data. Each model is then put into the view in the WidgetopiaViewController.java. Each model is then passed to its proper tag in the summary.jsp. I would highly recommend you got back and understand this portlet in its entirety if you want to learn widgets.</description><pubDate>Fri, 12 Jun 2009 09:53:19 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Yeah, I looked at that but It really doesn't go into details as far as coding. I'm trying to learn how to create widgets populated with meaningful data.</description><pubDate>Fri, 12 Jun 2009 09:42:54 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Take a look at the Widgetopia portlet in the PDK for examples. The Widgetopia portlet has examples of how to use all the different widgets that are available.</description><pubDate>Fri, 12 Jun 2009 09:37:35 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Does anyone have any kind of sample project involving widgets other than the one included in the PDK? I'm really in need on some sort of material I can use for reference.</description><pubDate>Wed, 10 Jun 2009 16:52:01 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Thanks. Could I get feedback on the other questions?</description><pubDate>Tue, 02 Jun 2009 12:34:28 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>In regards to your first inquiry on this page. Since you are getting an error with SkewedSessions, take a look at the stack trace that is generated when you add the portlet to the page. It will give you loads of information about the issue(s) you are having. This will answer your "Wonder what the problem is..." statement. ;^)</description><pubDate>Tue, 02 Jun 2009 11:59:57 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Alright. I deployed it and so far so good.  Nothing displays because I know I have to edit the summary page but is that all?</description><pubDate>Tue, 02 Jun 2009 11:52:57 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>You probably need to add the imports for the missing symbols. Ie.import com.teradata.dcs.data.dao.QueryCount;import java.sql.Timestamp;</description><pubDate>Tue, 02 Jun 2009 11:47:22 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Can I get help with these errors?compile:    [mkdir] Created dir: C:\QueryCount\build\classes    [javac] Compiling 6 source files to C:\QueryCount\build\classes    [javac] C:\QueryCount\src\java\com\teradata\portlets\querycount\service\impl\QueryCountManagerImpl.java:27: cannot find symbol    [javac] symbol  : class QueryCountDao    [javac] location: class com.teradata.portlets.querycount.service.impl.QueryCountManagerImpl    [javac]     private QueryCountDao myJavaQueryCountDAO;    [javac]             ^    [javac] C:\QueryCount\src\java\com\teradata\portlets\querycount\service\impl\QueryCountManagerImpl.java:45: cannot find symbol    [javac] symbol  : class Timestamp    [javac] location: class com.teradata.portlets.querycount.service.impl.QueryCountManagerImpl    [javac]     public List getMyQueryCountData(int systemId, Timestamp startTime, Timestamp endTime)    [javac]                                                   ^    [javac] C:\QueryCount\src\java\com\teradata\portlets\querycount\service\impl\QueryCountManagerImpl.java:45: cannot find symbol    [javac] symbol  : class Timestamp    [javac] location: class com.teradata.portlets.querycount.service.impl.QueryCountManagerImpl    [javac]     public List getMyQueryCountData(int systemId, Timestamp startTime, Timestamp endTime)    [javac]   ^    [javac] 3 errors</description><pubDate>Tue, 02 Jun 2009 11:40:48 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>I tired to redo the skewsessions and it still doesn't display anything on the summary page. It doesn't even show the columns or anything is just says its temporarily unavailable which is pretty weird.  Wonder what the problem is...Well, I'm trying to use the SystemHealthDAO with a sparkline widget and I trying to use your post as reference but now i'm stuck. How do you find out the property name and ref for both the manager implementation and the one you did prior to that?  Would I use the same property name a ref for all the DAOs I use? I also wanted to know if the Java setter you called "myJavaQueryCount" is what is actually going to be input or its something different? I looked at the skewedsessions code and it didn't that but the name of the DAO.Does all this look good so far?1. A reference to your injected DAO object:private SystemHealthDAO systemHealthDAO;2. A setter for the DAO:public void setSystemHealthDAO(SystemHealthDAO systemHealthDAO   {	this.systemHealthDAO = systemHeatlthDAO;    }3. A manager function that retrieves the data:public List getSystemHealth(int systemId, Timestamp startTime, Timestamp endTime)     {     return systemHealthDAO.getSystemHealthOverview(systemId, startTime, endTime);     }Would it be possible if you gave me an example of how to use a widget to display useful information? That way I can just follow those steps.</description><pubDate>Mon, 01 Jun 2009 09:30:12 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Thanks. I actually went through that tutorial but it bugged me that I couldn't get anything to display. Thats one of the reasons why I figured that maybe I didn't have access to a DCS so I asked for a username and password.</description><pubDate>Fri, 29 May 2009 13:38:20 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Yes, you need to add a couple of things to your manager class. You need:1. A reference to your injected DAO object:private QueryCountDAO myJavaQueryCountDAO;2. A setter for the DAO:public void setMyJavaQueryCountDAO(QueryCountDAO myJavaQueryCountDAO){    this.myJavaQueryCountDAO = myJavaQueryCountDAO;}3. A manager function that retrieves the data:public List  getMyQueryCountData(int systemId, Timestamp startTime, Timestamp endTime){    return myJavaQueryCountDAO.getQueryCountSumOverTime(systemId, startTime, endTime);}4. Some function that creates a collection of widget model objects for your desired widget type from the data your have retrieved from the DAO. Widget model objects are under the package com.teradata.tags.widgets.model.I would highly recommend you go through the skewed sessions portlet tutorial as this will give you knowledge of all the basic concepts. Let me know if you have more questions.</description><pubDate>Fri, 29 May 2009 13:15:53 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>Thanks. Ok, that made sense so far but bear with me on this because this is the first time i've used Teradata. I'm trying to implement your Query example over here. So after I follow those steps do I only have to add a few lines of code to the Manager and ManagerImpl file for it to display? I also think there might be some changes I will have to make in the summary.jsp file.</description><pubDate>Fri, 29 May 2009 12:50:59 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>The forum software really hacked up my previous post badly. It took out words and examples before posting it for some reason. I have edited and it should be good now. Let me know if you still have more questions.</description><pubDate>Fri, 29 May 2009 12:45:24 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>I was referring to the display information you were talking about in the quoted post with regards to my inquiry about "metrics".I would assume you are using the Portlet Development Kit (PDK), so the following would be the best solution:1. Take a look the API documentation (should be in tdpdk-xx.xx.xx.xx\doc\api). Find the documentation for the package com.teradata.dcs.data.model. All the classes in that package represent the metrics that are collected by the DCS and logged to PostgreSQL currently. Look through the classes and find the metrics (ie. the information you want to display) and take note of what class they are associated with. 2. Each class should have a corresponding Data Access Object (DAO) class that resides under com.teradata.data.dcs.dao. The DAO is what you use to retrieve the data from PostgreSQL.3. To use a DAO, you need to create a bean in the dataSourceiBatis.xml file that references an implementation of that DAO. For example, if you wanted to get QueryLog data, you would create your bean as follows:bean id="queryCountDAO" class="com.teradata.dcs.data.dao.ibatis.QueryCountDAOiBatis"&amp;gt;        description&amp;gt;DAO for accessing Query Count table         property name="sqlMapClient" ref="dcsSqlMapClient" /&amp;gt;    /bean&amp;gt;The class attribute references the actual implementation of the DAO. DAO implementations reside under the  package com.teradata.dcs.data.dao.ibatis. The property tag injects a sql map which allows you to retrieve data from PostgreSQL that was collected by the DCS. The sql map uses a datasource (ie. a connection) that is connected to PostgreSQL.4. Now you inject that bean into your manager implementation, which is defined in applicationContext.xml. So you would do the following:bean id="myManager" class="com.teradata.portlets.myPortletName.myManagerImpl"&amp;gt;        description&amp;gt;The business delegate for this application         property name="myJavaQueryCountDAO" ref="queryCountDAO"/&amp;gt;    /bean&amp;gt;You just need a corresponding java setter for the myJavaQueryCountDAO variable of type QueryCountDAO. Now you can access the data from PostgreSQL.The DAOs give you indirect access to PostgreSQL. If you have a working DCS instance, which it sounds like your portal does based upon your comments above, then you will be able to retrieve any/all of the data you see displayed by the viewpoint portlets. You don't need a URL/Username/Password as you can see.NOTE: I have taken out the less than from the .xml examples because it wouldn't post the .xml if i left it there.</description><pubDate>Fri, 29 May 2009 12:25:15 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>I'm not sure what you mean when you talk about metrics but if there is another method of doing this then I would like to know.  We are already receiving data on our tdviewpoint portal but now we are trying to develop a portlet which would be displaying information that is in some existing portlets but it will be displayed using graphs. i.e. CPU performance.  I just don't think we have access to that information on the dev kit. For example, I can't get the SkewedSessions tutorial to work because we don't have access to our DCS.I just wanted to make it clear what I'm trying to do.</description><pubDate>Fri, 29 May 2009 09:06:22 GMT</pubDate><dc:creator>MSkiLLz</dc:creator></item><item><title>RE: Widgets</title><link>http://www.teradata.com/teradataforum/Topic15557-53-1.aspx</link><description>The reason I ask is that we may already be logging this data into postgresql with our current collector(s). If we are, you will already have the data you are looking for. Is it possible to provide more specifically what you are looking for in terms of metrics? If not, there's another approach you can probably take, but one thing at a time...</description><pubDate>Thu, 28 May 2009 17:54:56 GMT</pubDate><dc:creator>Lewis Dawson</dc:creator></item></channel></rss>