org.jboss.dashboard.showcase
Class SalesDashboardData
java.lang.Object
org.jboss.dashboard.showcase.SalesDashboardData
public class SalesDashboardData
- extends Object
Simple tool for generating random sales dashboard data
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SalesDashboardData
public SalesDashboardData()
generateRandomOpportunities
public List<SalesDashboardData.Opportunity> generateRandomOpportunities(int nOpportunitiesPerMonth,
int yearStart,
int yearEnd)
- Generates a list of random opportunities in a range of years
- Parameters:
nOpportunitiesPerMonth - Number of opportunities to create per monthyearStart - Start yearyearEnd - End year
- Returns:
buildCSV
public String buildCSV(List<SalesDashboardData.Opportunity> opportunities)
- Generate a CSV representing a list of sales opportunities
- Parameters:
opportunities -
- Returns:
actionGenerateCSV
public org.jboss.dashboard.ui.controller.CommandResponse actionGenerateCSV(org.jboss.dashboard.ui.controller.CommandRequest request)
throws Exception
- Generates CSV corresponding to a random sales dashboard demo. It outputs the generated CSV through the response
stream. It can receive some optional parameters:
opMonth - Number of opportunities per month to generale - default: 50
startYear - Initial year to generate random data - default: current year - 2
endYear - End year to generate random data - default: current year + 2
- Parameters:
request -
- Returns:
-
- Throws:
Exception
Copyright © 2012-2013 JBoss by Red Hat. All Rights Reserved.