UNPKG

opennms

Version:

Client API for the OpenNMS network monitoring platform

1 lines 13.2 kB
{"remainingRequest":"/data/node_modules/babel-loader/lib/index.js!/data/node_modules/ts-loader/index.js!/data/node_modules/tslint-loader/index.js??ref--4-0!/data/src/dao/PropertiesCache.ts","dependencies":[{"path":"/data/src/dao/PropertiesCache.ts","mtime":1553611371628},{"path":"/data/node_modules/typescript-logging/dist/commonjs/typescript-logging.d.ts","mtime":1553611387808},{"path":"/data/node_modules/typescript-logging/dist/commonjs/control/LogGroupControl.d.ts","mtime":1553611387932},{"path":"/data/node_modules/typescript-logging/dist/commonjs/control/CategoryServiceControl.d.ts","mtime":1553611387932},{"path":"/data/node_modules/typescript-logging/dist/commonjs/extension/MessagesToExtensionJSON.d.ts","mtime":1553611387932},{"path":"/data/node_modules/typescript-logging/dist/commonjs/extension/MessagesFromExtensionJSON.d.ts","mtime":1553611387932},{"path":"/data/node_modules/typescript-logging/dist/commonjs/extension/ExtensionMessageJSON.d.ts","mtime":1553611387932},{"path":"/data/node_modules/typescript-logging/dist/commonjs/extension/ExtensionHelper.d.ts","mtime":1553611387932},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/category/AbstractCategoryLogger.d.ts","mtime":1553611388000},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/LoggerOptions.d.ts","mtime":1553611387932},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/category/CategoryLogger.d.ts","mtime":1553611388000},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/category/CategoryService.d.ts","mtime":1553611388000},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/category/CategoryConsoleLoggerImpl.d.ts","mtime":1553611388000},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/category/CategoryDelegateLoggerImpl.d.ts","mtime":1553611388000},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/category/CategoryMessageBufferImpl.d.ts","mtime":1553611388000},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/standard/Logger.d.ts","mtime":1553611388000},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/standard/LoggerFactory.d.ts","mtime":1553611388004},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/standard/LoggerFactoryService.d.ts","mtime":1553611388004},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/standard/LoggerFactoryRuntimeSettings.d.ts","mtime":1553611388004},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/standard/AbstractLogger.d.ts","mtime":1553611388000},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/standard/ConsoleLoggerImpl.d.ts","mtime":1553611388000},{"path":"/data/node_modules/typescript-logging/dist/commonjs/log/standard/MessageBufferLoggerImpl.d.ts","mtime":1553611388004},{"path":"/data/node_modules/typescript-logging/dist/commonjs/utils/DataStructures.d.ts","mtime":1553611387936},{"path":"/data/node_modules/typescript-logging/dist/commonjs/utils/JSONHelper.d.ts","mtime":1553611387936},{"path":"/data/node_modules/typescript-logging/dist/commonjs/utils/MessageUtils.d.ts","mtime":1553611387936},{"path":"/data/node_modules/moment/moment.d.ts","mtime":1553611386704},{"path":"/data/node_modules/axios/index.d.ts","mtime":1553611386356},{"path":"/data/typings/index.d.ts","mtime":1553611371628},{"path":"/data/node_modules/@types/fs-extra/index.d.ts","mtime":1553611386380},{"path":"/data/node_modules/@types/node/index.d.ts","mtime":1553611386380},{"path":"/data/node_modules/@types/node/inspector.d.ts","mtime":1553611386380},{"path":"/data/node_modules/@types/glob/index.d.ts","mtime":1553611386380},{"path":"/data/node_modules/@types/minimatch/index.d.ts","mtime":1553611386380},{"path":"/data/node_modules/@types/glob/node_modules/@types/minimatch/index.d.ts","mtime":1553611386368},{"path":"/data/node_modules/@types/handlebars/index.d.ts","mtime":1553611386368},{"path":"/data/node_modules/@types/highlight.js/index.d.ts","mtime":1553611386368},{"path":"/data/node_modules/@types/jest/index.d.ts","mtime":1553611386368},{"path":"/data/node_modules/@types/jquery/index.d.ts","mtime":1553611386368},{"path":"/data/node_modules/@types/lodash/index.d.ts","mtime":1553611386320},{"path":"/data/node_modules/@types/lodash/common/common.d.ts","mtime":1553611386984},{"path":"/data/node_modules/@types/lodash/common/array.d.ts","mtime":1553611386984},{"path":"/data/node_modules/@types/lodash/common/collection.d.ts","mtime":1553611386984},{"path":"/data/node_modules/@types/lodash/common/date.d.ts","mtime":1553611386984},{"path":"/data/node_modules/@types/lodash/common/function.d.ts","mtime":1553611386984},{"path":"/data/node_modules/@types/lodash/common/lang.d.ts","mtime":1553611386984},{"path":"/data/node_modules/@types/lodash/common/math.d.ts","mtime":1553611386984},{"path":"/data/node_modules/@types/lodash/common/number.d.ts","mtime":1553611386984},{"path":"/data/node_modules/@types/lodash/common/object.d.ts","mtime":1553611386984},{"path":"/data/node_modules/@types/lodash/common/seq.d.ts","mtime":1553611386984},{"path":"/data/node_modules/@types/lodash/common/string.d.ts","mtime":1553611386984},{"path":"/data/node_modules/@types/lodash/common/util.d.ts","mtime":1553611386984},{"path":"/data/node_modules/@types/marked/index.d.ts","mtime":1553611386368},{"path":"/data/node_modules/@types/shelljs/index.d.ts","mtime":1553611386380},{"path":"/data/node_modules/@types/urijs/index.d.ts","mtime":1553611386380},{"path":"/data/node_modules/typescript/lib/lib.es2015.d.ts","mtime":1553611387384},{"path":"/data/node_modules/typescript/lib/lib.es2015.core.d.ts","mtime":1553611387384},{"path":"/data/node_modules/typescript/lib/lib.es2015.collection.d.ts","mtime":1553611387384},{"path":"/data/node_modules/typescript/lib/lib.es2015.generator.d.ts","mtime":1553611387384},{"path":"/data/node_modules/typescript/lib/lib.es2015.promise.d.ts","mtime":1553611387384},{"path":"/data/node_modules/typescript/lib/lib.es2015.iterable.d.ts","mtime":1553611387384},{"path":"/data/node_modules/typescript/lib/lib.es2015.symbol.d.ts","mtime":1553611387384},{"path":"/data/node_modules/typescript/lib/lib.es2015.proxy.d.ts","mtime":1553611387384},{"path":"/data/node_modules/typescript/lib/lib.es2015.reflect.d.ts","mtime":1553611387384},{"path":"/data/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","mtime":1553611387384},{"path":"/data/node_modules/typescript/lib/lib.es5.d.ts","mtime":1553611387388},{"path":"/data/node_modules/typescript/lib/lib.dom.d.ts","mtime":1553611387384},{"path":"/data/src/dao/AbstractDAO.ts","mtime":1553611371628},{"path":"/data/src/dao/ISearchPropertyAccessor.ts","mtime":1553611371628},{"path":"/data/src/api/SearchProperty.ts","mtime":1553611371628},{"path":"/data/.babelrc","mtime":1553611371556},{"path":"/data/node_modules/cache-loader/dist/cjs.js","mtime":1553611387012},{"path":"/data/node_modules/babel-loader/lib/index.js","mtime":1553611386992},{"path":"/data/node_modules/ts-loader/index.js","mtime":1553611386824},{"path":"/data/node_modules/tslint-loader/index.js","mtime":1553611386824}],"contextDependencies":[],"result":["\"use strict\";\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * The Properties Cache persists all properties for each [[AbstractDAO]].\n */\n\nvar PropertiesCache = function () {\n function PropertiesCache(properties) {\n _classCallCheck(this, PropertiesCache);\n\n this.properties = properties;\n }\n /**\n * Returns the cache for the given dao if exists.\n *\n * @param {AbstractDAO<any, any>} dao The dao to get the cache for.\n * @returns {any} The cache if it exists.\n */\n\n\n _createClass(PropertiesCache, [{\n key: \"getProperty\",\n\n /**\n * Returns the property identified by id, if it exists.\n * @param {string} id The property id to find the property for.\n * @returns {SearchProperty} The property\n */\n value: function getProperty(id) {\n var result = this.getProperties().find(function (property) {\n return property.id === id;\n });\n return result;\n }\n /**\n * Returns all existing properties in the cache.\n *\n * @returns {SearchProperty[]} All existing properties in the cache.\n */\n\n }, {\n key: \"getProperties\",\n value: function getProperties() {\n return this.properties;\n }\n }], [{\n key: \"get\",\n value: function get(dao) {\n var className = dao.constructor.name;\n return this.caches[className];\n }\n /**\n * Stores the search properties for the given dao.\n *\n * @param {AbstractDAO<any, any>} dao The dao to persist the properties for.\n * @param {SearchProperty[]} searchProperties The properties to persist.\n */\n\n }, {\n key: \"put\",\n value: function put(dao, searchProperties) {\n var className = dao.constructor.name;\n this.caches[className] = new PropertiesCache(searchProperties);\n }\n }]);\n\n return PropertiesCache;\n}();\n/** The cache persistence. */\n\n\nPropertiesCache.caches = new Map();\nexports.PropertiesCache = PropertiesCache;",{"version":3,"file":"/data/src/dao/PropertiesCache.ts","sourceRoot":"","sources":["/data/node_modules/tslint-loader/index.js??ref--4-0!/data/src/dao/PropertiesCache.ts"],"names":[],"mappings":";;;;;;;AAIA,AAEG,AACH;;;;;AA8BI,6BAAY,AAA4B;;;AACpC,AAAI,aAAC,AAAU,aAAG,AAAU,AAAC,AACjC;AAAC;AA9BD,AAKG,AACI,AAAM,AAAC,AAAG;;;;;;;;;;;AA0BjB,AAIG,AACI,AAAW;;;;;oCAAC,AAAU;AACzB,gBAAM,AAAM,cAAQ,AAAa,AAAE,gBAAC,AAAI,KAAC,UAAC,AAAQ,AAAE,AAAE;AAClD,AAAM,uBAAC,AAAQ,SAAC,AAAE,OAAK,AAAE,AAAC,AAC9B;AAAC,AAAC,AAAC,aAFY,AAAI;AAGnB,AAAM,mBAAC,AAAM,AAAC,AAClB;AAAC;AAED,AAIG,AACI,AAAa;;;;;;;;;AAChB,AAAM,mBAAC,AAAI,KAAC,AAAU,AAAC,AAC3B;AAAC;;;4BA7CiB,AAA0B;AACxC,gBAAM,AAAS,YAAG,AAAG,IAAC,AAAW,YAAC,AAAI,AAAC;AACvC,AAAM,mBAAC,AAAI,KAAC,AAAM,OAAC,AAAS,AAAC,AAAC,AAClC;AAAC;AAED,AAKG,AACI,AAAM,AAAC,AAAG;;;;;;;;;4BAAC,AAA0B,KAAE,AAAkC;AAC5E,gBAAM,AAAS,YAAG,AAAG,IAAC,AAAW,YAAC,AAAI,AAAC;AACvC,AAAI,iBAAC,AAAM,OAAC,AAAS,AAAC,aAAG,IAAI,AAAe,gBAAC,AAAgB,AAAC,AAAC,AACnE;AAAC;;;;;AAED,AAA6B;;;AACd,gBAAM,SAAG,IAAI,AAAG,AAA2B,AAAC;AAzB/D,0BAsDC","sourcesContent":["import {AbstractDAO} from './AbstractDAO';\nimport {ISearchPropertyAccessor} from './ISearchPropertyAccessor';\nimport {SearchProperty} from '../api/SearchProperty';\n\n/**\n * The Properties Cache persists all properties for each [[AbstractDAO]].\n */\nexport class PropertiesCache implements ISearchPropertyAccessor {\n\n /**\n * Returns the cache for the given dao if exists.\n *\n * @param {AbstractDAO<any, any>} dao The dao to get the cache for.\n * @returns {any} The cache if it exists.\n */\n public static get(dao: AbstractDAO<any, any>): PropertiesCache {\n const className = dao.constructor.name;\n return this.caches[className];\n }\n\n /**\n * Stores the search properties for the given dao.\n *\n * @param {AbstractDAO<any, any>} dao The dao to persist the properties for.\n * @param {SearchProperty[]} searchProperties The properties to persist.\n */\n public static put(dao: AbstractDAO<any, any>, searchProperties: SearchProperty[]) {\n const className = dao.constructor.name;\n this.caches[className] = new PropertiesCache(searchProperties);\n }\n\n /** The cache persistence. */\n private static caches = new Map<string, PropertiesCache>();\n\n /** The properties for each cache. */\n private properties: SearchProperty[];\n\n constructor(properties: SearchProperty[]) {\n this.properties = properties;\n }\n\n /**\n * Returns the property identified by id, if it exists.\n * @param {string} id The property id to find the property for.\n * @returns {SearchProperty} The property\n */\n public getProperty(id: string): SearchProperty {\n const result = this.getProperties().find((property) => {\n return property.id === id;\n });\n return result;\n }\n\n /**\n * Returns all existing properties in the cache.\n *\n * @returns {SearchProperty[]} All existing properties in the cache.\n */\n public getProperties(): SearchProperty[] {\n return this.properties;\n }\n}\n"]}]}