UNPKG

flysh

Version:

DOM Document Object Artifact Collector

67 lines 2.52 kB
import { FlyshException } from "../exception/FlyshException"; import { DomElement } from "./DomElement"; /** * 'NavPane' ('Paginator') class model */ export class NavPane extends DomElement { /** * Constructor * * @param fsignature Defines the filter signature * @param attribute Contains the attribute (i.e : 'href') */ constructor(fsignature, attribute) { super(NavPane.DOM_ELEMENT_PRIMITIVE_IDENTIFICATION_NAME_VALUE, ''); this._filterselectorsignature = fsignature; this._attribute = attribute; } /** * Getter 'attribute' property string * * @returns Returns the '_attribute' class property */ get attribute() { return this._attribute; } /** * Get the object properties (overridden) * * @returns Returns a 'string' that contains all the class properties */ get getEntry() { return super.getEntry + "Filter Selector Signature : " + this._filterselectorsignature + "\n" + "Attribute : " + this._attribute + "\n"; } /** * Getter 'filterSelectorSignature' property 'string' * * @returns Returns the '_filterselectorsignature' class property */ get getFilterSelectorSignature() { return this._filterselectorsignature; } /** * Validates the current class instance */ validate() { if (this.getFilterSelectorSignature == '') throw new FlyshException(5100000100, new Error, NavPane.EXCEPTION_ID_5100000100_MESSAGE_VALUE); if (this.getFilterSelectorSignature.split(" ").length < NavPane.DOM_VALIDATION_FILTER_SELECTOR_MIN_PARAMETERS_VALUE) throw new FlyshException(5100000200, new Error, NavPane.EXCEPTION_ID_5100000200_MESSAGE_VALUE); if (this.attribute == '') throw new FlyshException(5100000300, new Error, NavPane.EXCEPTION_ID_5100000300_MESSAGE_VALUE); } } /** * Public class constants */ NavPane.EXCEPTION_ID_5100000100_MESSAGE_VALUE = "A 'Paginator' must have a filter selector value, i.e : 'table tr td'"; NavPane.EXCEPTION_ID_5100000200_MESSAGE_VALUE = "A 'Paginator' filter selector must have 2 elements at least"; NavPane.EXCEPTION_ID_5100000300_MESSAGE_VALUE = "A 'Paginator' must have an attribute, i.e : 'href'"; /** * Private class constants */ NavPane.DOM_ELEMENT_PRIMITIVE_IDENTIFICATION_NAME_VALUE = "navpane"; NavPane.DOM_VALIDATION_FILTER_SELECTOR_MIN_PARAMETERS_VALUE = 2; //# sourceMappingURL=NavPane.js.map