IAction.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Joas Schilling <coding@schilljs.com>
  6. *
  7. * @license AGPL-3.0
  8. *
  9. * This code is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU Affero General Public License, version 3,
  11. * as published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Affero General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public License, version 3,
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>
  20. *
  21. */
  22. namespace OCP\Notification;
  23. /**
  24. * Interface IAction
  25. *
  26. * @package OCP\Notification
  27. * @since 9.0.0
  28. */
  29. interface IAction {
  30. /**
  31. * @param string $label
  32. * @return $this
  33. * @throws \InvalidArgumentException if the label is invalid
  34. * @since 9.0.0
  35. */
  36. public function setLabel($label);
  37. /**
  38. * @return string
  39. * @since 9.0.0
  40. */
  41. public function getLabel();
  42. /**
  43. * @param string $label
  44. * @return $this
  45. * @throws \InvalidArgumentException if the label is invalid
  46. * @since 9.0.0
  47. */
  48. public function setParsedLabel($label);
  49. /**
  50. * @return string
  51. * @since 9.0.0
  52. */
  53. public function getParsedLabel();
  54. /**
  55. * @param $primary bool
  56. * @return $this
  57. * @throws \InvalidArgumentException if $primary is invalid
  58. * @since 9.0.0
  59. */
  60. public function setPrimary($primary);
  61. /**
  62. * @return bool
  63. * @since 9.0.0
  64. */
  65. public function isPrimary();
  66. /**
  67. * @param string $link
  68. * @param string $requestType
  69. * @return $this
  70. * @throws \InvalidArgumentException if the link is invalid
  71. * @since 9.0.0
  72. */
  73. public function setLink($link, $requestType);
  74. /**
  75. * @return string
  76. * @since 9.0.0
  77. */
  78. public function getLink();
  79. /**
  80. * @return string
  81. * @since 9.0.0
  82. */
  83. public function getRequestType();
  84. /**
  85. * @return bool
  86. * @since 9.0.0
  87. */
  88. public function isValid();
  89. /**
  90. * @return bool
  91. * @since 9.0.0
  92. */
  93. public function isValidParsed();
  94. }