NAME

LS::Service::Authority - Authority service for LSID resolution

SYNOPSIS

 # Create an authority service with a metadata port
 my $location = 'http://localhost:80/authority/';

 # Create the authority service
 my $authority = new LS::Service::Authority(
					 name => 'hugo', 
					 authority => 'gene.ucl.ac.uk.lsid.myauthority.org', 
					 location => $location);
 #
 # Add a metadata port that uses SOAP
 #
 $authority->addPort(serviceName=> 'hugoSOAP',
                     port=> LS::Authority::WSDL::Simple::MetadataPort->newMetadata(portName=> 'SOAPMetadata',
                                                                                   endpoint=> "$location/authority/metadata",
                                                                                   protocol=> $LS::Authority::WSDL::Constants::Protocols::SOAP,
                                                                                  )
        );

DESCRIPTION

The LS::Service::Authority object is used to create a custom LSID Authority implementing its own getAvailableServices. Additionally, ports can be added to the service (data, metadata as well as generic ports).

CONSTRUCTORS

new ( %options )

This will construct a new authority service with the options specified.

The %options hash can contain the following keys:

     name: The name of the authority
     authority: The hostname of the authority
     location: The authority's location in the form of a URL
     auth_handler: Reserved.
    		
     getServices: A reference to a function that can add 
                  information to the WSDL decribing how to invoke the authority
                  
     getAvailableServices: A reference to a function that 
                           can add information in the authority's WSDL

METHODS

addPort ( %options )

Add a port with the specified type, such as metadata or data, and associated operations.

This method requires the following keys to be specified in %options:

    type: Can be the string metaDataPortType or dataPortType
    protocol: $LS:Authority::WSDL::Constants::Protocols::SOAP|HTTP|FTP
    location: The URL of the port
    oprations: A hash of the operations that this port supports
authenticate ( @credentials )

Reserved.

getAvailableServices ( )

Returns the default WSDL of the authority plus any custom ports and then calls a function specified in the constructor for additional customization.

COPYRIGHT

Copyright (c) 2002,2003 IBM Corporation. All rights reserved. This program and the accompanying materials are made available under the terms of the Common Public License v1.0 which accompanies this distribution, and is available at http://www.opensource.org/licenses/cpl.php