]> git.mxchange.org Git - hub.git/blobdiff - application/hub/interfaces/package/class_Deliverable.php
Copyright notice updated
[hub.git] / application / hub / interfaces / package / class_Deliverable.php
index 072bcd765d6cd5e1c412cdcb2c2fa88877b72e42..3e0fbf9b5ed1b073febc3ac69c61544959664e73 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
 interface Deliverable extends FrameworkInterface {
        /**
         * "Enqueues" raw content into this delivery class by reading the raw content
-        * from given template instance.
+        * from given helper's template instance and pushing it on the 'undeclared'
+        * stack.
         *
-        * @param       $helperInstance         A BaseHubHelper instance
+        * @param       $helperInstance         An instance of a HelpableHub class
         * @return      void
         */
-       function enqueueRawDataFromTemplate (BaseHubHelper $helperInstance);
+       function enqueueRawDataFromTemplate (HelpableHub $helperInstance);
+
+       /**
+        * Checks whether a package has been enqueued for delivery.
+        *
+        * @return      $isEnqueued             Whether a package is enqueued
+        */
+       function isPackageEnqueued ();
+
+       /**
+        * Checks whether a package has been declared
+        *
+        * @return      $isDeclared             Whether a package is declared
+        */
+       function isPackageDeclared ();
+
+       /**
+        * Checks whether a package should be sent out
+        *
+        * @return      $isWaitingDelivery      Whether a package is waiting for delivery
+        */
+       function isPackageWaitingForDelivery ();
+
+       /**
+        * Delivers an enqueued package to the stated destination. If a non-session
+        * id is provided, recipient resolver is being asked (and instanced once).
+        * This allows that a single package is being delivered to multiple targets
+        * without enqueueing it for every target. If no target is provided or it
+        * can't be determined a NoTargetException is being thrown.
+        *
+        * @return      void
+        * @throws      NoTargetException       If no target can't be determined
+        */
+       function declareEnqueuedPackage ();
+
+       /**
+        * Delivers the next declared package. Only one package per time will be sent
+        * because this may take time and slows down the whole delivery
+        * infrastructure.
+        *
+        * @return      void
+        */
+       function deliverDeclaredPackage ();
+
+       /**
+        * Sends waiting packages out for delivery
+        *
+        * @return      void
+        */
+       function sendWaitingPackage ();
+
+       /**
+        * Clears all stacker
+        *
+        * @return      void
+        */
+       function clearAllStacker ();
 }
 
 // [EOF]