* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-interface NodeHelper extends Helper {
+interface NodeHelper extends Helper, AddableCriteria {
/**
* Method to "bootstrap" the node. This step does also apply provided
* command-line arguments stored in the request instance. You should now
*/
function getAddressPort ();
- /**
- * Adds hub data elements to a given dataset instance
- *
- * @param $criteriaInstance An instance of a storeable criteria
- * @param $requestInstance An instance of a Requestable class
- * @return void
- */
- function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance);
-
/**
* Updates/refreshes node data (e.g. state).
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class BaseHubNode extends BaseHubSystem implements Updateable {
+class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
/**
* Node types
*/
* @param $requestInstance An instance of a Requestable class
* @return void
*/
- public function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance) {
+ public function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance = NULL) {
// Add node number and type
$criteriaInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_NR, 1);
$criteriaInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_TYPE, $requestInstance->getRequestElement('mode'));