# WebReports.Api.Roles

## DataObject Class

The DataObject class can allow or deny access to specific Data Objects for a particular user session.

A DataObject object has the following property:

- Name The name (non-mnemonic) of the Data Object to include or exclude.
  - A DataObject in the DataObjectCollection will be excluded if the property IncludeAll is True and included if it is False.

A DataObject object has no available methods.

## DataObjectCollection Class

This collection should not be instantiated; there is a single DataObjectCollection object that is accessed through the DataObjects property of the Security object.

The DataObjectCollection has the following property:

- IncludeAll Boolean indicating whether to include all of the Data Objects (default) or none of the Data Objects.

The DataObjects property of a Security object has the following method:

#### GetDataObject (string dataObjectName)

Description | Returns the DataObject object or null if not found.

#### NewDataObject ( )

Description | Returns a new DataObject object and adds it to the collection.
Remarks | The returned DataObject object needs to have all of its properties filled or an error will occur.

## DataObjectRow Class

The DataObjectRow class can set Row Level filters to Data Objects for a particular user session.

A DataObjectRow object has the following properties:

- ObjectName The name (non-mnemonic) of the Data Object.
- FilterString The filter string for the Data Object. The filter string will be placed into the SQL WHERE clause.

A DataObjectRow object has no available methods.

## DataObjectRowCollection Class

This collection should not be instantiated; there is a single DataObjectRowCollection object that is accessed through the DataObjectRoles property of the Security object.

The DataObjectRoles property of a Security object has the following method:

#### GetDataObject (string dataObjectRowName)

Description | Returns the DataObjectRow object or null if not found.

#### NewDataObjectRow ( )

Description | Returns a new DataObjectRow object and adds it to the collection.
Remarks | The returned DataObjectRow object needs to have all of its properties filled or an error will occur.

## Folder Class

The Folder class is used to allow or deny access to folders or sets folders as execute-only for a particular user session.

A Folder object has the following properties:

- Name The name (non-mnemonic) of the folder to include/exclude.
  - The folder in the FolderCollection will be excluded if the property IncludeAll is True and included if it is False.
- ReadOnly Boolean indicating whether a folder is read only. Default is False.
- Propagate Not used: Parameters set for a folder are always propagated down to all of its subfolders unless parameters for specific child folder are set.

A Folder object has no available methods.

## FolderCollection Class

This collection should not be instantiated; there is a single FolderCollection object that is accessed through the Folders property of the Security object.

A FolderCollection object has the following property:

- IncludeAll Boolean indicating whether to include all of the folders (default) or none.
- ReadOnly Global read-only for all of the folders in the collection. Individual Folder objects can be set with a different ReadOnly property.
- AllowManagement Boolean indicating whether or not to allow users to manage folders. Set to False to hide the Manage Folder Icon.

The Folders property of a Security object has the following method:

#### GetFolder (string folderName)

Description | Returns the Folder object or null if not found.

#### NewFolder ( )

Description | Returns a new Folder object and adds it to the collection.
Remarks | The returned Folder object needs to have all of its properties filled or an error will occur.

## General Class

The General class is utilized to overwrite the General Settings of the Administration Console. This collection should not be instantiated; there is a single General object that is accessed through the General property of the Role object.

The General property of the Role object has the following properties:

- DbTimeout The amount of time (in seconds) to allow the database to execute a query before returning to Exago.
- DateFormat Used to format dates on a report output.
- CurrencySymbol The symbol prepended to currency numbers on a report output.
- SeparatorSymbol The symbol used to separate 3 digits of number on a report output.
- ReadFilterValues Boolean value that indicates whether to show a list of data values associated with a specific filter in the Report Filters window. In certain cases, allowing this can result in a lengthy delay of showing filter values, however, this depends on the amount of data, the complexity of data object, etc. If the delay is unacceptable, setting this value to false will disable the feature.
- ShowGrid Boolean value that indicates whether to show the grid in the Report Designer. Also sets the Show Grid Lines default HTML in Report Options.
- ReportVirtualPath IIS virtual path for the location of the report path.

The General property of the Role object does not have any available methods.

## Parameter Class

The Parameter class is used to create and modify Parameters.

A Parameter object has the following properties:

- Id Name of the parameter.

> NOTE. Parameter names ARE case sensitive.

- Value The value being stored in the parameter.

A Parameter object has the following available methods:

#### Constructor (string paramId, string paramValue )

Description | Instantiates a Parameter object with the specified Id and Value.

## ParameterCollection Class

This collection should not be instantiated; there is a single ParameterCollection object that is accessed through the Parameters property of the Api object.

The Parameter property of an Api object has the following method:

#### GetParameter(string parameterId)

Description | Returns the Parameter object or null if not found.

## Role Class

The Role class contains all of the information concerning General and Security parameters. A Role can be created at runtime and used for a single session or loaded from the roles that have been created through the Administration Console. For more information see Roles.

This collection should not be instantiated; there is a single RoleCollection object that is accessed through the Role property of the Api object.

A Role object may have the following properties:

- General Access to all of the General Parameters. See General Class.
- Security Access to all of the Security Parameters. See Security Class.

A Role object has one available method:

#### Activate( )

Description | Makes this role active.

## RoleCollection Class

This collection should not be instantiated; there is a single RoleCollection object that is accessed through the Roles property of the Api object.

#### GetRole(string roleId)

Description | Returns the Role object or null if not found.

#### NewRole( )

Description | Returns a new Role object and adds it to the collection.
Remarks | The returned Role object needs to have all of its properties filled or an error will occur.

## Security Class

The Security class contains all of the security parameters for a user session.

This collection should not be instantiated; there is a single Security object that is accessed through the Security property of the Role object.

The Security object has the following properties:

- Folders Controls access to all of the FolderCollection parameters. See FolderCollection
- DataObjects Controls access to all of the DataObjectCollection parameters. See DataObjectCollection
- DataObjectRows Controls access to all of the DataObjectRowCollection parameters. See DataObjectRowCollection

There are no available methods for a Security object.