/* Copyright (c) Citrix Systems, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Xml;
using XenAPI;
using XenAdmin.Core;
using XenAdmin.Wlb;
using XenAdmin.Dialogs;
using XenAdmin.Actions;
using XenAdmin.Help;
using System.Windows.Forms;
namespace XenAdmin.Wlb
{
///
/// ReportInfo describes the essential pieces required to successfully render a report
/// within the ReportView control.
///
public class WlbReportInfo
{
#region Variables
private string _reportName;
private string _reportFile;
private string _reportDefinition;
private bool _displayHosts;
private bool _displayFilter;
private bool _displayUsers;
private bool _displayAuditObjects;
private OrderedDictionary _reportQueryParameterNames;
#endregion
#region Properties
///
/// ReportInfo constructor
///
/// The name of the report to be rendered
/// The RDLC file name for the report
/// Whether or not the report requires a host parameter value
/// Whether or not the report requires a user parameter value
/// Whether or not the report requires a audit object parameter value
/// List of user names whose values are required for the SQL query
/// List of audit object names whose values are required for the SQL query
/// List of parameter names whose values are required for the SQL query
public WlbReportInfo(string reportName,
string reportFile,
string reportDefinition,
bool DisplayHosts,
bool DisplayFilter,
bool DisplayUsers,
bool DisplayAuditObjects,
OrderedDictionary reportQueryParameterNames)
{
this._reportName = reportName;
this._reportFile = reportFile;
this._reportDefinition = reportDefinition;
this._displayHosts = DisplayHosts;
this._displayFilter = DisplayFilter;
this._displayUsers = DisplayUsers;
this._displayAuditObjects = DisplayAuditObjects;
this._reportQueryParameterNames = reportQueryParameterNames;
}
///
/// The name of the report to be rendered
///
public string ReportName
{
get { return _reportName; }
}
///
/// The RDLC file name for the report
///
public string ReportFile
{
get { return _reportFile; }
}
///
/// Definition for the current report
///
public string ReportDefinition
{
get { return _reportDefinition; }
}
///
/// Whether or not the report requires a host parameter value
///
public bool DisplayHosts
{
get { return _displayHosts; }
}
///
/// Whether or not the report requires a filter parameter value
///
public bool DisplayFilter
{
get { return _displayFilter; }
}
///
/// Whether or not the report requires a user parameter value
///
public bool DisplayUsers
{
get { return _displayUsers; }
}
///
/// Whether or not the report requires an audit object parameter value
///
public bool DisplayAuditObjects
{
get { return _displayAuditObjects; }
}
///
/// List of parameter names whose values are required for the SQL query
///
public OrderedDictionary ReportQueryParameterNames
{
get { return _reportQueryParameterNames; }
}
#endregion
}
}