Home Identifier Source Test Repository
public class | source

BrokenUrls

Model for holding broken links information and methods for working with this data

Static Method Summary

Static Public Methods
public static

create(): BrokenLinks

Static initializer for BrokenLinks instance

Constructor Summary

Public Constructor
public

Constructor function

Member Summary

Private Members
private

Array of broken urls infos

Method Summary

Public Methods
public

add(url: String, advanced: Obect, code: Number): exports

Add url with given response status code to model of broken links

public

clear(): exports

Clears broken links model

public

get404(): Object[]

Returns broken urls with response status equals to 404.

public

get500(): Object[]

Returns broken urls with response status equals to 500.

public

getAll(): Object[]

Return all broken url items

public

getByCode(code: Number): Object[]

Return broken url items with given status code

Static Public Methods

public static create(): BrokenLinks source

Static initializer for BrokenLinks instance

Return:

BrokenLinks

Public Constructors

public constructor source

Constructor function

Private Members

private _urls: Array source

Array of broken urls infos

Public Methods

public add(url: String, advanced: Obect, code: Number): exports source

Add url with given response status code to model of broken links

Params:

NameTypeAttributeDescription
url String

link url

advanced Obect

advanced data hash

code Number

response status code

Return:

exports

public clear(): exports source

Clears broken links model

Return:

exports

public get404(): Object[] source

Returns broken urls with response status equals to 404. Page not found error

Return:

Object[]

public get500(): Object[] source

Returns broken urls with response status equals to 500. Server error

Return:

Object[]

public getAll(): Object[] source

Return all broken url items

Return:

Object[]

public getByCode(code: Number): Object[] source

Return broken url items with given status code

Params:

NameTypeAttributeDescription
code Number

response status code

Return:

Object[]