---
title: "SafetyLineViolation | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/SafetyLineViolation/"
---

# SafetyLineViolation

> - [`Violation`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#abstract-violation)

## Classes

### SafetyLineViolation

#### Extends

#### Constructors

##### Constructor

```ts
new SafetyLineViolation(
   productHandler, 
   messages, 
   conf): SafetyLineViolation;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `productHandler` | [`ProductHandler`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ProductHandler.md#producthandler) |
| `messages` | [`IViewerMessagesConfig`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/IViewerMessagesConfig.md#iviewermessagesconfig) |
| `conf` | [`IViolationServiceConfiguration`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/IViolationServiceConfiguration.md#iviolationserviceconfiguration) |

###### Returns

[`SafetyLineViolation`](#safetylineviolation)

###### Overrides

[`Violation`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#abstract-violation).[`constructor`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#constructor)

#### Properties

##### prepareItem

```ts
prepareItem: (item) => void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `item` | `Item` |

###### Returns

`void`

###### Inherited from

[`Violation`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#abstract-violation).[`prepareItem`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#prepareitem)

##### statePropertyName

```ts
static statePropertyName: string = "safetyLineViolationState";
```

#### Methods

##### getDataPropertyName()

```ts
getDataPropertyName(): string;
```

###### Returns

`string`

###### Inherited from

[`Violation`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#abstract-violation).[`getDataPropertyName`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#getdatapropertyname)

##### getStatePropertyName()

```ts
getStatePropertyName(): string;
```

###### Returns

`string`

###### Overrides

[`Violation`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#abstract-violation).[`getStatePropertyName`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#getstatepropertyname)

##### getViolationInfo()

```ts
getViolationInfo(item): IViolationInfo;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `item` | `Item` |

###### Returns

[`IViolationInfo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#iviolationinfo)

###### Overrides

[`Violation`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#abstract-violation).[`getViolationInfo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#getviolationinfo)

##### isAvailableFor()

```ts
isAvailableFor(item): boolean;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `item` | `Item` |

###### Returns

`boolean`

###### Overrides

[`Violation`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#abstract-violation).[`isAvailableFor`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#isavailablefor)

##### computeTotalViolationInfo()

```ts
static computeTotalViolationInfo(
   violations, 
   item, 
   oldViolationInfo): ITotalViolationInfo;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `violations` | [`Violation`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#abstract-violation)[] |
| `item` | `Item` |
| `oldViolationInfo` | [`ITotalViolationInfo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#itotalviolationinfo) |

###### Returns

[`ITotalViolationInfo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#itotalviolationinfo)

###### Inherited from

[`Violation`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#abstract-violation).[`computeTotalViolationInfo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Violation.md#computetotalviolationinfo)
