#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package RPS::Publisher::BaseAdminList;

use strict;
use warnings;
use Carp;

use lib '/app/tools/common/lib';
use Common::Assert;

use Common::FormObject;
use base 'Common::FormObject';

sub _init {
    my ( $self, %args ) = @_;

    $self->SUPER::_init(%args);

    $self->{Admin} = [];
    my $collection = $self->_publisherDB()->GetAllAdmins();

    while ( $collection->hasNext() ) {
        my $obj = $collection->next();
        push @{ $self->{Admin} }, $self->_publisherSimple()->new( _dbItem => $obj );
    }

    return $self;
}

sub _listProperties {
    return { Admin => 1 };
}

1;

