Business rules

Class BusinessRules

Business rules for hobbies.

Index

Constructor methods

Properties

Get accessors

Methods

Constructor methods

constructor(Data: IHobbiesData): BusinessRules

Default constructor.

Parameters

Returns

BusinessRules

Properties

public Data: IHobbiesData

public HobbiesNumberValidator: any

Hobbies number validator.

public MainValidator: any

Hobbies main validator.

public ValidationResult: any

Return all hobbies errors.

Get accessors

public Name(): string

Business rules name

Returns

string

Methods

public Validate(): Q.Promise<Validation.IValidationResult>

Executes all business rules.

Returns

Q.Promise<Validation.IValidationResult>

private createItemValidator(): Validation.IAbstractValidator<Hobbies.IHobby>

Returns

Validation.IAbstractValidator<Hobbies.IHobby>

private createMainValidator(): Validation.IAbstractValidator<Hobbies.IHobbiesData>

Returns

Validation.IAbstractValidator<Hobbies.IHobbiesData>

private createPersonValidator(): Validation.IAbstractValidator<Shared.IPerson>

Returns

Validation.IAbstractValidator<Shared.IPerson>