CViewerHelper.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *| IBM Cognos Products: Viewer
  5. *| (C) Copyright IBM Corp. 2001, 2011
  6. *|
  7. *| US Government Users Restricted Rights - Use, duplication or
  8. *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9. *|
  10. *+------------------------------------------------------------------------+
  11. */
  12. /**
  13. Contains function specific to Cognos Viewer managers.
  14. */
  15. function CViewerHelper()
  16. {
  17. this.m_oCV = null;
  18. }
  19. /**
  20. @type string
  21. @return Reference (name of the javascript variable) for the CCognosViewer object associated to this helper
  22. */
  23. CViewerHelper.prototype.getCVObjectRef = function()
  24. {
  25. return this.getCV().getObjectId();
  26. };
  27. /**
  28. @type CCognosViewer
  29. @return CCognosViewer object associated to this helper
  30. */
  31. CViewerHelper.prototype.getCV = function()
  32. {
  33. if (this.m_oCV)
  34. {
  35. return this.m_oCV;
  36. }
  37. return window;
  38. };
  39. /**
  40. @type string
  41. @return Id of the CCognosViewer object associated to this helper
  42. */
  43. CViewerHelper.prototype.getCVId = function()
  44. {
  45. var sId = "";
  46. if (this.m_oCV) {
  47. sId = this.m_oCV.getId();
  48. }
  49. return sId;
  50. };
  51. /**
  52. @param {CCognosViewer} oCV CCognosViewer object associated to this helper
  53. */
  54. CViewerHelper.prototype.setCV = function(oCV)
  55. {
  56. this.m_oCV = oCV;
  57. };