NAME

OpenFrame::WebApp::Segment::User::Loader - abstract segment to load users.

SYNOPSIS

  # abstract class - cannot be used directly

  use Pipeline;
  use OpenFrame::WebApp;

  my $pipe = new Pipeline;

  my $ufactory = new OpenFrame::WebApp::User::Factory()->type('webapp');
  $pipe->store->set( $ufactory );

  # abstract - must use a sub-class:
  my $uloader = new OpenFrame::WebApp::Segment::User::EnvLoader;
  $pipe->add_segment( $uloader );

  ...

  $pipe->dispatch;

DESCRIPTION

The OpenFrame::WebApp::Segment::User::Loader class is an abstract user loading segment. It inherits its interface from Pipeline::Segment.

On dispatch() if a user id is found a new user is created using the Pipeline's stored OpenFrame::WebApp::User::Factory.

METHODS

$user = $obj->dispatch()

dispatch this segment.

$user = $obj->get_user()

finds user id, and uses stored OpenFrame::WebApp::User::Factory to create a new user and set it's id.

$id = $obj->find_user_id()

abstract method to find user id.

AUTHOR

Steve Purkis <spurkis@epn.nu>

COPYRIGHT

Copyright (c) 2003 Steve Purkis. All rights reserved. Released under the same license as Perl itself.

SEE ALSO

OpenFrame::WebApp::User, OpenFrame::WebApp::User::Factory