<?php
/**
 * @version $Id: AbstractListAction.class.php 673 2011-12-16 00:26:41Z hodaka $
 * @package myuploader
 */

if(!defined('XOOPS_ROOT_PATH'))
{
    exit;
}

require_once XOOPS_ROOT_PATH . '/core/XCube_PageNavigator.class.php';

/**
 * Myuploader_AbstractListAction
 */
class Myuploader_AbstractListAction extends Myuploader_AbstractAction
{
    /**
     * @var  XoopsSimpleObject[]
     *
     * @public
    **/
    var $mObjects = null;

    /**
     * @var  Myuploader_AbstractFilterForm
     *
     * @public
    **/
    var $mFilter = null;

    /**
     * &_getHandler
     *
     * @param   void
     *
     * @return  &XoopsObjectGenericHandler
     *
     * @protected
    **/
    function &_getHandler()
    {
    }

    /**
     * &_getFilterForm
     *
     * @param   void
     *
     * @return  &MyuploaderAbstractFilterForm
     *
     * @protected
    **/
    function &_getFilterForm()
    {
    }

    /**
     * _getBaseUrl
     *
     * @param   void
     *
     * @return  string
     *
     * @protected
    **/
    function _getBaseUrl()
    {
    }

    /**
     * &_getPageNavi
     *
     * @param   void
     *
     * @return  &XCube_PageNavigator
     *
     * @protected
    **/
    function &_getPageNavi()
    {
        $navi = new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START);
        return $navi;
    }

    /**
     * getDefaultView
     *
     * @param   void
     *
     * @return  Enum
     *
     * @public
    **/
    function getDefaultView()
    {
        $this->mFilter =& $this->_getFilterForm();
        $this->mFilter->fetch();

        $handler =& $this->_getHandler();
        $this->mObjects =& $handler->getObjects($this->mFilter->getCriteria());

        return MYUPLOADER_FRAME_VIEW_INDEX;
    }

    /**
     * execute
     *
     * @param   void
     *
     * @return  Enum
     *
     * @public
    **/
    function execute()
    {
        return $this->getDefaultView();
    }
}

?>