API Docs for: 0.9.1
Show:

File: lib/service/container.js

  1. var ServiceObject = require('./abstract/serviceObject');
  2.  
  3. /**
  4. * @class ServiceContainer
  5. * @extends ServiceObject
  6. *
  7. * @property {object} _moduleList
  8. */
  9. var ServiceContainer = ServiceObject.extend(
  10.  
  11. /**
  12. * @constructor
  13. * @param {object} moduleList
  14. * @param {object} options
  15. */
  16. function (moduleList, options) {
  17. this._moduleList = moduleList;
  18. this.__super(options);
  19. },
  20.  
  21. {
  22. /**
  23. * Gets an item-list by moduleName
  24. *
  25. * @method getModuleList
  26. * @param {string} moduleName
  27. * @return {ServiceList}
  28. */
  29. getModuleList: function (moduleName) {
  30. return this._moduleList[moduleName];
  31. },
  32.  
  33. /**
  34. * Does the container have a module?
  35. *
  36. * @method hasModuleList
  37. * @param {string} moduleName
  38. * @return {boolean}
  39. */
  40. hasModuleList: function (moduleName) {
  41. return (this.getModuleList(moduleName) !== undefined);
  42. }
  43. },
  44. {
  45. /**
  46. * @property TYPE
  47. * @type {string}
  48. * @static
  49. */
  50. TYPE: 'ServiceContainer'
  51. }
  52. );
  53.  
  54. module.exports = ServiceContainer;
  55.