IStyleServiceSave Method (Style, String, Guid, EntityCreationOptions)

Saves the specified entity.

Namespace:  Dundas.BI.Entities.Views.Styles
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.3.0.1000)
Syntax
void Save(
	Style instance,
	string name,
	Guid parentId,
	EntityCreationOptions options
)

Parameters

instance
Type: Dundas.BI.Entities.Views.StylesStyle
The entity to save.
name
Type: SystemString
The name of the entity.
parentId
Type: SystemGuid
The ID of the parent.
options
Type: Dundas.BI.EntitiesEntityCreationOptions
Options for saving the new entity; or to use the default options.

Implements

IEntityServiceTSave(T, String, Guid, EntityCreationOptions)
Exceptions
ExceptionCondition
InvalidOperationException

An existing style is being overwritten, but it could not be checked out to the caller.

-or-

An existing style is not being overwritten, but the provided instance has already been saved at least once.

ArgumentException

name is , empty, only consists of whitespace, or contains invalid characters.

-or-

parentId is Empty.

ArgumentNullExceptioninstance is .
ArgumentOutOfRangeExceptionname is longer than MaxNameLength.
NotFoundExceptionThe specified parent does not exist.
DuplicateItemException An item with the same name already exists in the specified location, the overwrite option has not been specified, and automatic name generation has not been specified.
QuotaExceededExceptionThe quota limit for the corresponding entity type was exceeded.
ReferencedItemException The overwrite or automatic name generation options have not been specified, and an item with the same name already exists at the specified location, but that item could not be automatically deleted because it is referenced by other items.
FeatureNotEnabledExceptionA required feature of the application is not enabled.
NoPrivilegeException

The caller does not have access to overwrite or save to the specified location.

-or-

The entity being saved is not a dashboard and the caller's seat kind is not PowerUser or better.

InvalidSessionExceptionThe caller context is not associated with a valid session.
Remarks
This overload is intended to be used for saving an entity which has never been saved before. After saving, the entity's properties (Id, LastModifiedTime, etc.) will be updated.

Note Note
When overwriting an existing style, this method behaves in a special way. Rather than the existing style being deleted and replaced, it will instead be updated. In order for this to work, the following logic takes place: If the existing style is already checked out to the caller, it is simply updated; if the existing style is checked out to another user, an exception is thrown; otherwise, the existing style is automatically checked-out to the caller and then checked in again once the update is complete.
See Also