Bric::Util::FTP::Server(3)

NAME
Bric::Util::FTP::Server - Virtual FTP Server

VERSION
$LastChangedRevision$

DATE
$LastChangedDate: 2004-07-06 22:55:36 -0700 (Tue, 06 Jul 2004) $

SYNOPSIS
  use Bric::Util::FTP::Server;
  Bric::Util::FTP::Server->run;

DESCRIPTION
This module provides an FTP interface to Bricolage templates. The directory tree is the category tree created in Bricolage. The first directory level selects the output channel. The files are the template files in the output channels and categories. When a user downloads a template file they recieve the most recent checked-in version of the template. When a file is uploaded it is automatically checked-in and deployed.

For installation and configuration instructions see Bric::Admin.

LIMITATIONS
Only GET, PUT and DELETE are implemented for templates. No modification of categories is supported.

The system doesn't deal with the possibility of having more than one active template for a given filename. This probably won't be fixed here - rather, Bricolage will soon prevent this situation.

INTERFACE
This module inherits from Net::FTPServer and doesn't override any public methods. See Net::FTPServer for details.

PRIVATE

  Private Instance Methods

pre_configuration_hook()
    This is called by Net:FTPServer before configuration begins. It's used in this class to add our name and version to the version string displayed by the server.

authenticaton_hook($user, $pass, $user_is_anon)
    When a user logs in authentication_hook() is called to check their username and password. This method calls Bric::Biz::Person::User->lookup() using the given username and then checks the password. Returns -1 on login failure or 0 on success. As a side-effect this method stashes the Bric::Biz::Person::User object into $self->{user_obj}.

root_directory_hook()
    Net::FTPServer calls this method to get a DirHandle for the root directory. This method just calls Bric::Util::FTP::DirHandle->new().

system_error_hook()
    This method is called when an error is signaled elsewhere in the server. It looks for a key called "error" in $self and returns that if it's available. This allows for an OO version of the ever-popular $! mechanism. (Or, at least, that's the idea. As far as I can tell it never really gets called!)

AUTHOR
Sam Tregar <stregar@about-inc.com>

SEE ALSO
Net::FTPServer

Bric::Util::FTP::DirHandle

Bric::Util::FTP::FileHandle