joynr.types.DiscoveryScope.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libjoynr-js Show documentation
Show all versions of libjoynr-js Show documentation
JOYnr JavaScript libjoynr-js
/**
* This is the generated enum type DiscoveryScope: DOCS GENERATED FROM INTERFACE DESCRIPTION
* Generation date: Thu Jul 06 08:39:56 CEST 2017
*/
(function(undefined) {
/**
* @namespace DiscoveryScope
* @classdesc
* This is the generated enum type DiscoveryScope: DOCS GENERATED FROM INTERFACE DESCRIPTION
*
Generation date: Thu Jul 06 08:39:56 CEST 2017
*
Enumeration specifying the discovery scope choices
*
* @returns {DiscoveryScope} a new instance of a DiscoveryScope
*/
var DiscoveryScope = function DiscoveryScope(settings){
if (!(this instanceof DiscoveryScope)) {
// in case someone calls constructor without new keyword (e.g. var c = Constructor({..}))
return new DiscoveryScope(settings);
}
/**
* Used for serialization.
* @name DiscoveryScope#_typeName
* @type String
* @readonly
*/
Object.defineProperty(this, "_typeName", {
configurable : false,
writable : false,
enumerable : true,
value : "joynr.types.DiscoveryScope"
});
if (settings !== undefined) {
this.name = settings.name;
this.value = settings.value;
}
};
/**
* @name DiscoveryScope#MAJOR_VERSION
* @constant {Number}
* @default 0
* @summary The MAJOR_VERSION of the enum type DiscoveryScope is GENERATED FROM THE INTERFACE DESCRIPTION
*/
Object.defineProperty(DiscoveryScope, 'MAJOR_VERSION', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: 0
});
/**
* @name DiscoveryScope#MINOR_VERSION
* @constant {Number}
* @default 0
* @summary The MINOR_VERSION of the enum type DiscoveryScope is GENERATED FROM THE INTERFACE DESCRIPTION
*/
Object.defineProperty(DiscoveryScope, 'MINOR_VERSION', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: 0
});
var preparePrototype = function() {
Object.defineProperty(DiscoveryScope.prototype, 'equals', {
enumerable: false,
configurable: false,
writable: false,
readable: true,
value: function equals(other) {
var i;
if (this === other) {
return true;
}
if (other === undefined || other === null) {
return false;
}
if (other._typeName === undefined || this._typeName !== other._typeName) {
return false;
}
if (this.name !== other.name || this.value !== other.value) {
return false;
}
return true;
}
});
};
var createLiterals = function() {
/**
* @name DiscoveryScope.LOCAL_ONLY
* @readonly
* @summary
*
Consider only entries from local cache
*/
DiscoveryScope.LOCAL_ONLY = new DiscoveryScope({
name: "LOCAL_ONLY",
value: "LOCAL_ONLY"
});
/**
* @name DiscoveryScope.LOCAL_THEN_GLOBAL
* @readonly
* @summary
*
Consider only entries from local cache, in no results are found, query
* global cache as well
*/
DiscoveryScope.LOCAL_THEN_GLOBAL = new DiscoveryScope({
name: "LOCAL_THEN_GLOBAL",
value: "LOCAL_THEN_GLOBAL"
});
/**
* @name DiscoveryScope.LOCAL_AND_GLOBAL
* @readonly
* @summary
*
Consider both local and global entries
*/
DiscoveryScope.LOCAL_AND_GLOBAL = new DiscoveryScope({
name: "LOCAL_AND_GLOBAL",
value: "LOCAL_AND_GLOBAL"
});
/**
* @name DiscoveryScope.GLOBAL_ONLY
* @readonly
* @summary
*
Consider only global entries
*/
DiscoveryScope.GLOBAL_ONLY = new DiscoveryScope({
name: "GLOBAL_ONLY",
value: "GLOBAL_ONLY"
});
};
// AMD support
if (typeof define === 'function' && define.amd) {
define("joynr/types/DiscoveryScope", ["joynr"], function (joynr) {
DiscoveryScope.prototype = new joynr.JoynrObject();
DiscoveryScope.prototype.constructor = DiscoveryScope;
preparePrototype();
createLiterals();
joynr.addType("joynr.types.DiscoveryScope", DiscoveryScope, true);
return DiscoveryScope;
});
} else if (typeof exports !== 'undefined' ) {
if ((module !== undefined) && module.exports) {
exports = module.exports = DiscoveryScope;
} else {
// support CommonJS module 1.1.1 spec (`exports` cannot be a function)
exports.DiscoveryScope = DiscoveryScope;
}
var joynr = requirejs("joynr");
DiscoveryScope.prototype = new joynr.JoynrObject();
DiscoveryScope.prototype.constructor = DiscoveryScope;
preparePrototype();
createLiterals();
joynr.addType("joynr.types.DiscoveryScope", DiscoveryScope, true);
} else {
//we assume a correct order of script loading
joynr = window.joynr;
DiscoveryScope.prototype = new joynr.JoynrObject();
DiscoveryScope.prototype.constructor = DiscoveryScope;
preparePrototype();
createLiterals();
joynr.addType("joynr.types.DiscoveryScope", DiscoveryScope, true);
window.DiscoveryScope = DiscoveryScope;
}
})();
© 2015 - 2025 Weber Informatics LLC | Privacy Policy