Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4121266
ReferencesGateway.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ReferencesGateway.js
View Options
/**
* Abstract base class
* Gateway for retrieving references
*
* @class module:mobile.startup/references~Gateway
* @abstract
*
* @param {mw.Api} api
*/
function
ReferencesGateway
(
api
)
{
this
.
api
=
api
;
}
/**
* Return the matched reference via API or DOM query
*
* @memberof module:mobile.startup/references~Gateway
* @instance
* @param {string} id CSS selector
* @param {Page} page to find reference for
* @param {module:mobile.startup/PageHTMLParser} pageHTMLParser
* @return {jQuery.Promise} resolves with an Object representing reference
* with a `text` property
* The promise should be rejected with ReferenceGateway.ERROR_NOT_EXIST:
* if the reference is not found.
* If for some reason locating the reference fails return ReferenceGateway.ERROR_OTHER.
*/
ReferencesGateway
.
prototype
.
getReference
=
null
;
/**
* ERROR_NOT_EXIST error code to be returned by getReference
* when a reference does not exist.
*
* @memberof module:mobile.startup/references~Gateway
* @type string
*/
ReferencesGateway
.
ERROR_NOT_EXIST
=
'NOT_EXIST_ERROR'
;
/**
* ERROR_OTHER error code to be returned by getReference
* under any other circumstance not covered
* by ERROR_NOT_EXIST. It should be used if it is unclear whether a reference exists or not.
*
* @memberof module:mobile.startup/references~Gateway
* @type string
*/
ReferencesGateway
.
ERROR_OTHER
=
'OTHER_ERROR'
;
module
.
exports
=
ReferencesGateway
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 19, 04:31 (11 h, 55 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a7/22/4075e240afc140bf4e42175e6172
Default Alt Text
ReferencesGateway.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment