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


lsid-perl documentation  | view source Contained in the lsid-perl distribution.

Index


NAME

Top

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

SYNOPSIS

Top

 # 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

Top

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

Top

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

Top

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

Top


lsid-perl documentation  | view source Contained in the lsid-perl distribution.