-package OpenILS::DomainObject::oilsMessage;
-use base 'OpenILS::DomainObject';
-use OpenILS::AppSession;
-use OpenILS::DomainObject::oilsResponse qw/:status/;
-use OpenILS::Utils::Logger qw/:level/;
+package OpenSRF::DomainObject::oilsMessage;
+use base 'OpenSRF::DomainObject';
+use OpenSRF::AppSession;
+use OpenSRF::DomainObject::oilsResponse qw/:status/;
+use OpenSRF::Utils::Logger qw/:level/;
use warnings; use strict;
-use OpenILS::EX qw/:try/;
+use OpenSRF::EX qw/:try/;
=head1 NAME
-OpenILS::DomainObject::oilsMessage
+OpenSRF::DomainObject::oilsMessage
=head1
-use OpenILS::DomainObject::oilsMessage;
+use OpenSRF::DomainObject::oilsMessage;
-my $msg = OpenILS::DomainObject::oilsMessage->new( type => 'CONNECT' );
+my $msg = OpenSRF::DomainObject::oilsMessage->new( type => 'CONNECT' );
$msg->userAuth( $userAuth_element );
=head1 ABSTRACT
-OpenILS::DomainObject::oilsMessage is used internally to wrap data sent
+OpenSRF::DomainObject::oilsMessage is used internally to wrap data sent
between client and server. It provides the structure needed to authenticate
session data, and also provides the logic needed to unwrap session data and
pass this information along to the Application Layer.
=cut
-my $log = 'OpenILS::Utils::Logger';
+my $log = 'OpenSRF::Utils::Logger';
=head1 METHODS
-=head2 OpenILS::DomainObject::oilsMessage->type( [$new_type] )
+=head2 OpenSRF::DomainObject::oilsMessage->type( [$new_type] )
=over 4
return $self->_attr_get_set( type => shift );
}
-=head2 OpenILS::DomainObject::oilsMessage->protocol( [$new_protocol_number] )
+=head2 OpenSRF::DomainObject::oilsMessage->protocol( [$new_protocol_number] )
=over 4
return $self->_attr_get_set( protocol => shift );
}
-=head2 OpenILS::DomainObject::oilsMessage->threadTrace( [$new_threadTrace] );
+=head2 OpenSRF::DomainObject::oilsMessage->threadTrace( [$new_threadTrace] );
=over 4
return $self->_attr_get_set( threadTrace => shift );
}
-=head2 OpenILS::DomainObject::oilsMessage->update_threadTrace
+=head2 OpenSRF::DomainObject::oilsMessage->update_threadTrace
=over 4
return $tT;
}
-=head2 OpenILS::DomainObject::oilsMessage->payload( [$new_payload] )
+=head2 OpenSRF::DomainObject::oilsMessage->payload( [$new_payload] )
=over 4
return $new_pl unless ($payload);
}
- return OpenILS::DOM::upcast($payload)->upcast if ($payload);
+ return OpenSRF::DOM::upcast($payload)->upcast if ($payload);
}
-=head2 OpenILS::DomainObject::oilsMessage->userAuth( [$new_userAuth_element] )
+=head2 OpenSRF::DomainObject::oilsMessage->userAuth( [$new_userAuth_element] )
=over 4
return $ua;
}
-=head2 OpenILS::DomainObject::oilsMessage->handler( $session_id )
+=head2 OpenSRF::DomainObject::oilsMessage->handler( $session_id )
=over 4
$log->debug(" Received protocol => [$protocol], MType => [$mtype], ".
"from [".$session->remote_id."], threadTrace[".$self->threadTrace."]", INFO);
$log->debug("endpoint => [".$session->endpoint."]", DEBUG);
- $log->debug("OpenILS::AppSession->SERVER => [".$session->SERVER()."]", DEBUG);
+ $log->debug("OpenSRF::AppSession->SERVER => [".$session->SERVER()."]", DEBUG);
$log->debug("Before ALL", DEBUG);
}
if( $val ) {
- return OpenILS::Application->handler($session, $self->payload);
+ return OpenSRF::Application->handler($session, $self->payload);
}
return 1;
unless ($mtype eq 'CONNECT') {
$log->error("Connection seems to be mangled: Got $mtype instead of CONNECT");
- my $res = OpenILS::DomainObject::oilsBrokenSession->new(
+ my $res = OpenSRF::DomainObject::oilsBrokenSession->new(
status => "Connection seems to be mangled: Got $mtype instead of CONNECT",
);
#unless ($self->userAuth ) {
# $log->debug( "No Authentication information was provided with the initial packet", ERROR );
- # my $res = OpenILS::DomainObject::oilsConnectException->new(
+ # my $res = OpenSRF::DomainObject::oilsConnectException->new(
# status => "No Authentication info was provided with initial message" );
# $session->status($res);
# $session->kill_me;
#}
#unless( $self->userAuth->authenticate( $session ) ) {
- # my $res = OpenILS::DomainObject::oilsAuthException->new(
+ # my $res = OpenSRF::DomainObject::oilsAuthException->new(
# status => "Authentication Failed for " . $self->userAuth->getAttribute('username') );
# $session->status($res) if $res;
# $session->kill_me;
$log->debug("We're a server and the user is authenticated",DEBUG);
- my $res = OpenILS::DomainObject::oilsConnectStatus->new;
+ my $res = OpenSRF::DomainObject::oilsConnectStatus->new;
$session->status($res);
$session->state( $session->CONNECTED );
# This should be changed to check the type of response (is it a connectException?, etc.)
}
- if( $self->payload->class->isa( "OpenILS::EX" ) ) {
+ if( $self->payload->class->isa( "OpenSRF::EX" ) ) {
$self->payload->throw();
}
- $log->debug("Passing to OpenILS::Application::handler()\n" . $self->payload->toString(1), INTERNAL);
+ $log->debug("Passing to OpenSRF::Application::handler()\n" . $self->payload->toString(1), INTERNAL);
$log->debug("oilsMessage passing to Application: " . $self->type." : ".$session->remote_id, INFO );
return 1;
-package OpenILS::DomainObject::oilsMethod;
-use OpenILS::DOM::Element::params;
-use OpenILS::DOM::Element::param;
+package OpenSRF::DomainObject::oilsMethod;
+use OpenSRF::DOM::Element::params;
+use OpenSRF::DOM::Element::param;
use JSON;
-use base 'OpenILS::DomainObject';
+use base 'OpenSRF::DomainObject';
=head1 NAME
-OpenILS::DomainObject::oilsMethod
+OpenSRF::DomainObject::oilsMethod
=head1 SYNOPSIS
-use OpenILS::DomainObject::oilsMethod;
+use OpenSRF::DomainObject::oilsMethod;
-my $method = OpenILS::DomainObject::oilsMethod->new( method => 'search' );
+my $method = OpenSRF::DomainObject::oilsMethod->new( method => 'search' );
$method->return_type( 'mods' );
=head1 METHODS
-=head2 OpenILS::DomainObject::oilsMethod->method( [$new_method_name] )
+=head2 OpenSRF::DomainObject::oilsMethod->method( [$new_method_name] )
=over 4
return $self->_attr_get_set( method => shift );
}
-=head2 OpenILS::DomainObject::oilsMethod->return_type( [$new_return_type] )
+=head2 OpenSRF::DomainObject::oilsMethod->return_type( [$new_return_type] )
=over 4
return $self->_attr_get_set( return_type => shift );
}
-=head2 OpenILS::DomainObject::oilsMethod->params( [@new_params] )
+=head2 OpenSRF::DomainObject::oilsMethod->params( [@new_params] )
=over 4
$self->removeChild($old_params) if ($old_params);
- my $params = OpenILS::DOM::Element::params->new;
+ my $params = OpenSRF::DOM::Element::params->new;
$self->appendChild($params);
- $params->appendTextNode( JSON->perl2JSON( \@args );
+ $params->appendTextNode( JSON->perl2JSON( \@args ) );
$old_params = $params unless ($old_params);
}
-package OpenILS::DomainObjectCollection::oilsMultiSearch;
-use OpenILS::DomainObjectCollection;
-use OpenILS::DomainObject::oilsPrimitive;
-use OpenILS::DomainObject::oilsSearch;
-use OpenILS::DOM::Element::searchCriteria;
-use OpenILS::DOM::Element::searchCriterium;
-use base 'OpenILS::DomainObjectCollection::oilsHash';
+package OpenSRF::DomainObjectCollection::oilsMultiSearch;
+use OpenSRF::DomainObjectCollection;
+use OpenSRF::DomainObject::oilsPrimitive;
+use OpenSRF::DomainObject::oilsSearch;
+use OpenSRF::DOM::Element::searchCriteria;
+use OpenSRF::DOM::Element::searchCriterium;
+use base 'OpenSRF::DomainObjectCollection::oilsHash';
sub new {
my $class = shift;
my $self = $class->SUPER::new;
- tie my %hash, 'OpenILS::DomainObjectCollection::oilsHash', $self;
+ tie my %hash, 'OpenSRF::DomainObjectCollection::oilsHash', $self;
$self->set( bind_count => 1 );
- $self->set( searches => new OpenILS::DomainObjectCollection::oilsHash );
- $self->set( relators => new OpenILS::DomainObjectCollection::oilsArray );
- $self->set( fields => new OpenILS::DomainObjectCollection::oilsArray );
- $self->set( group_by => new OpenILS::DomainObjectCollection::oilsArray );
- $self->set( order_by => new OpenILS::DomainObjectCollection::oilsArray );
+ $self->set( searches => new OpenSRF::DomainObjectCollection::oilsHash );
+ $self->set( relators => new OpenSRF::DomainObjectCollection::oilsArray );
+ $self->set( fields => new OpenSRF::DomainObjectCollection::oilsArray );
+ $self->set( group_by => new OpenSRF::DomainObjectCollection::oilsArray );
+ $self->set( order_by => new OpenSRF::DomainObjectCollection::oilsArray );
return $self;
}
my $search = shift;
my $relator = shift;
- $search = OpenILS::DomainObject::oilsSearch->new($search) if (ref($search) eq 'ARRAY');
+ $search = OpenSRF::DomainObject::oilsSearch->new($search) if (ref($search) eq 'ARRAY');
$self->searches->set( $alias => $search );
if ($self->searches->size > 1) {
- throw OpenILS::EX::InvalidArg ('You need to pass a relator searchCriterium')
+ throw OpenSRF::EX::InvalidArg ('You need to pass a relator searchCriterium')
unless (defined $relator);
}
- $relator = OpenILS::DOM::Element::searchCriterium->new( @$relator )
+ $relator = OpenSRF::DOM::Element::searchCriterium->new( @$relator )
if (ref($relator) eq 'ARRAY');
$self->relators->push( $relator ) if (defined $relator);
my $self = shift;
my @parts = @_;
if (@parts) {
- $self->set( fields => OpenILS::DomainObjectCollection::oilsArray->new(@_) );
+ $self->set( fields => OpenSRF::DomainObjectCollection::oilsArray->new(@_) );
}
return $self->_accessor('fields')->list;
}
my $self = shift;
my @parts = @_;
if (@parts) {
- $self->set( order_by => OpenILS::DomainObjectCollection::oilsArray->new(@_) );
+ $self->set( order_by => OpenSRF::DomainObjectCollection::oilsArray->new(@_) );
}
return $self->_accessor('order_by')->list;
}
my $self = shift;
my @parts = @_;
if (@parts) {
- $self->set( group_by => OpenILS::DomainObjectCollection::oilsArray->new(@_) );
+ $self->set( group_by => OpenSRF::DomainObjectCollection::oilsArray->new(@_) );
}
return $self->_accessor('group_by')->list;
}
}
#this is just to allow DomainObject to "upcast" nicely
-package OpenILS::DomainObject::oilsMultiSearch;
-use base OpenILS::DomainObjectCollection::oilsMultiSearch;
+package OpenSRF::DomainObject::oilsMultiSearch;
+use base OpenSRF::DomainObjectCollection::oilsMultiSearch;
1;
-package OpenILS::DomainObject::oilsScalar;
-use base 'OpenILS::DomainObject';
-use OpenILS::DomainObject;
+package OpenSRF::DomainObject::oilsScalar;
+use base 'OpenSRF::DomainObject';
+use OpenSRF::DomainObject;
=head1 NAME
-OpenILS::DomainObject::oilsScalar
+OpenSRF::DomainObject::oilsScalar
=head1 SYNOPSIS
- use OpenILS::DomainObject::oilsScalar;
+ use OpenSRF::DomainObject::oilsScalar;
- my $text = OpenILS::DomainObject::oilsScalar->new( 'a string or number' );
+ my $text = OpenSRF::DomainObject::oilsScalar->new( 'a string or number' );
$text->value( 'replacement value' );
print "$text"; # stringify
Or, using the TIE interface:
my $scalar;
- my $real_object = tie($scalar, 'OpenILS::DomainObject::oilsScalar', "a string to store...");
+ my $real_object = tie($scalar, 'OpenSRF::DomainObject::oilsScalar', "a string to store...");
$scalar = "a new string";
print $scalar . "\n";
=head1 METHODS
-=head2 OpenILS::DomainObject::oilsScalar->value( [$new_value] )
+=head2 OpenSRF::DomainObject::oilsScalar->value( [$new_value] )
=over 4
if ( defined $value ) {
$self->removeChild($_) for ($self->childNodes);
if (ref($value) && $value->isa('XML::LibXML::Node')) {
- #throw OpenILS::EX::NotADomainObject
+ #throw OpenSRF::EX::NotADomainObject
# unless ($value->nodeName =~ /^oils:domainObject/o);
$self->appendChild($value);
} elsif (defined $value) {
sub FETCH { $_[0]->value }
sub STORE { $_[0]->value($_[1]) }
-package OpenILS::DomainObject::oilsPair;
-use base 'OpenILS::DomainObject::oilsScalar';
+package OpenSRF::DomainObject::oilsPair;
+use base 'OpenSRF::DomainObject::oilsScalar';
=head1 NAME
-OpenILS::DomainObject::oilsPair
+OpenSRF::DomainObject::oilsPair
=head1 SYNOPSIS
- use OpenILS::DomainObject::oilsPair;
+ use OpenSRF::DomainObject::oilsPair;
- my $pair = OpenILS::DomainObject::oilsPair->new( 'key_for_pair' => 'a string or number' );
+ my $pair = OpenSRF::DomainObject::oilsPair->new( 'key_for_pair' => 'a string or number' );
$pair->key( 'replacement key' );
$pair->value( 'replacement value' );
=head1 METHODS
-=head2 OpenILS::DomainObject::oilsPair->value( [$new_value] )
+=head2 OpenSRF::DomainObject::oilsPair->value( [$new_value] )
=over 4
=back
-=head2 OpenILS::DomainObject::oilsPair->key( [$new_key] )
+=head2 OpenSRF::DomainObject::oilsPair->key( [$new_key] )
=over 4
return $self->getAttribute( 'key' );
}
-package OpenILS::DomainObjectCollection::oilsArray;
-use base qw/OpenILS::DomainObjectCollection Tie::Array/;
-use OpenILS::DomainObjectCollection;
+package OpenSRF::DomainObjectCollection::oilsArray;
+use base qw/OpenSRF::DomainObjectCollection Tie::Array/;
+use OpenSRF::DomainObjectCollection;
=head1 NAME
-OpenILS::DomainObjectCollection::oilsArray
+OpenSRF::DomainObjectCollection::oilsArray
=head1 SYNOPSIS
- use OpenILS::DomainObject::oilsPrimitive;
+ use OpenSRF::DomainObject::oilsPrimitive;
- my $collection = OpenILS::DomainObjectCollection::oilsArray->new( $domain_object, $another_domain_object, ...);
+ my $collection = OpenSRF::DomainObjectCollection::oilsArray->new( $domain_object, $another_domain_object, ...);
$collection->push( 'appended value' );
$collection->unshift( 'prepended vaule' );
Or, using the TIE interface:
my @array;
- my $real_object = tie(@array, 'OpenILS::DomainObjectCollection::oilsArray', $domain, $objects, 'to', $store);
+ my $real_object = tie(@array, 'OpenSRF::DomainObjectCollection::oilsArray', $domain, $objects, 'to', $store);
or to tie an existing $collection object
my @array;
- tie(@array, 'OpenILS::DomainObjectCollection::oilsArray', $collection);
+ tie(@array, 'OpenSRF::DomainObjectCollection::oilsArray', $collection);
or even....
tie(@array, ref($collection), $collection);
- $array[2] = $DomainObject; # replaces 'to' (which is now an OpenILS::DomainObject::oilsScalar) above
+ $array[2] = $DomainObject; # replaces 'to' (which is now an OpenSRF::DomainObject::oilsScalar) above
delete( $array[3] ); # removes '$store' above.
my $size = scalar( @array );
=head1 METHODS
-=head2 OpenILS::DomainObjectCollection::oilsArray->list()
+=head2 OpenSRF::DomainObjectCollection::oilsArray->list()
=over 4
-Returns the array of 'OpenILS::DomainObject's that this collection contains.
+Returns the array of 'OpenSRF::DomainObject's that this collection contains.
=back
my $self = CORE::shift;
my ($index, $value) = @_;
- $value = OpenILS::DomainObject::oilsScalar->new($value)
+ $value = OpenSRF::DomainObject::oilsScalar->new($value)
unless ( ref $value and $value->nodeName =~ /^oils:domainObject/o );
$self->_expand($index) unless ($self->EXISTS($index));
my $count = CORE::shift;
my $size = $self->FETCHSIZE;
for ($size..$count) {
- $self->SUPER::push( new OpenILS::DomainObject::oilsScalar );
+ $self->SUPER::push( new OpenSRF::DomainObject::oilsScalar );
}
}
return $self->removeChild( ($self->childNodes)[$index] );
}
-package OpenILS::DomainObjectCollection::oilsHash;
-use base qw/OpenILS::DomainObjectCollection Tie::Hash/;
+package OpenSRF::DomainObjectCollection::oilsHash;
+use base qw/OpenSRF::DomainObjectCollection Tie::Hash/;
=head1 NAME
-OpenILS::DomainObjectCollection::oilsHash
+OpenSRF::DomainObjectCollection::oilsHash
=head1 SYNOPSIS
- use OpenILS::DomainObject::oilsPrimitive;
+ use OpenSRF::DomainObject::oilsPrimitive;
- my $collection = OpenILS::DomainObjectCollection::oilsHash->new( key1 => $domain_object, key2 => $another_domain_object, ...);
+ my $collection = OpenSRF::DomainObjectCollection::oilsHash->new( key1 => $domain_object, key2 => $another_domain_object, ...);
$collection->set( key =>'value' );
my $value = $collection->find( $key );
Or, using the TIE interface:
my %hash;
- my $real_object = tie(%hash, 'OpenILS::DomainObjectCollection::oilsHash', domain => $objects, to => $store);
+ my $real_object = tie(%hash, 'OpenSRF::DomainObjectCollection::oilsHash', domain => $objects, to => $store);
or to tie an existing $collection object
my %hash;
- tie(%hash, 'OpenILS::DomainObjectCollection::oilsHash', $collection);
+ tie(%hash, 'OpenSRF::DomainObjectCollection::oilsHash', $collection);
or even....
my $node = $self->find_node($key);
return $node->value( $value ) if (defined $node);
- return $self->appendChild( OpenILS::DomainObject::oilsPair->new($key => $value) );
+ return $self->appendChild( OpenSRF::DomainObject::oilsPair->new($key => $value) );
}
sub _accessor {
}
}
-package OpenILS::DomainObject::oilsHash;
-use base qw/OpenILS::DomainObjectCollection::oilsHash/;
+package OpenSRF::DomainObject::oilsHash;
+use base qw/OpenSRF::DomainObjectCollection::oilsHash/;
-package OpenILS::DomainObject::oilsArray;
-use base qw/OpenILS::DomainObjectCollection::oilsArray/;
+package OpenSRF::DomainObject::oilsArray;
+use base qw/OpenSRF::DomainObjectCollection::oilsArray/;
1;
-package OpenILS::DomainObject::oilsResponse;
+package OpenSRF::DomainObject::oilsResponse;
use vars qw/@EXPORT_OK %EXPORT_TAGS/;
use Exporter;
use JSON;
-use base qw/OpenILS::DomainObject Exporter/;
-use OpenILS::Utils::Logger qw/:level/;
+use base qw/OpenSRF::DomainObject Exporter/;
+use OpenSRF::Utils::Logger qw/:level/;
BEGIN {
@EXPORT_OK = qw/STATUS_CONTINUE STATUS_OK STATUS_ACCEPTED
=head1 NAME
-OpenILS::DomainObject::oilsResponse
+OpenSRF::DomainObject::oilsResponse
=head1 SYNOPSIS
-use OpenILS::DomainObject::oilsResponse qw/:status/;
+use OpenSRF::DomainObject::oilsResponse qw/:status/;
-my $resp = OpenILS::DomainObject::oilsResponse->new;
+my $resp = OpenSRF::DomainObject::oilsResponse->new;
$resp->status( 'a status message' );
=head1 ABSTRACT
-OpenILS::DomainObject::oilsResponse implements the base class for all Application
+OpenSRF::DomainObject::oilsResponse implements the base class for all Application
layer messages send between the client and server.
=cut
sub STATUS_NOTIMPLEMENTED { return 501 }
sub STATUS_VERSIONNOTSUPPORTED { return 505 }
-my $log = 'OpenILS::Utils::Logger';
+my $log = 'OpenSRF::Utils::Logger';
sub new {
my $class = shift;
-package OpenILS::DomainObject::oilsStatus;
-use OpenILS::DomainObject::oilsResponse qw/:status/;
-use base 'OpenILS::DomainObject::oilsResponse';
+package OpenSRF::DomainObject::oilsStatus;
+use OpenSRF::DomainObject::oilsResponse qw/:status/;
+use base 'OpenSRF::DomainObject::oilsResponse';
use vars qw/$status $statusCode/;
=head1 NAME
-OpenILS::DomainObject::oilsException
+OpenSRF::DomainObject::oilsException
=head1 SYNOPSIS
-use OpenILS::DomainObject::oilsResponse;
+use OpenSRF::DomainObject::oilsResponse;
...
# something happens.
-$client->status( OpenILS::DomainObject::oilsStatus->new );
+$client->status( OpenSRF::DomainObject::oilsStatus->new );
=head1 ABSTRACT
The base class for Status messages sent between client and server. This
-is implemented on top of the C<OpenILS::DomainObject::oilsResponse> class, and
+is implemented on top of the C<OpenSRF::DomainObject::oilsResponse> class, and
sets the default B<status> to C<Status> and B<statusCode> to C<STATUS_OK>.
=cut
$status = 'Status';
$statusCode = STATUS_OK;
-package OpenILS::DomainObject::oilsConnectStatus;
-use OpenILS::DomainObject::oilsResponse qw/:status/;
-use base 'OpenILS::DomainObject::oilsStatus';
+package OpenSRF::DomainObject::oilsConnectStatus;
+use OpenSRF::DomainObject::oilsResponse qw/:status/;
+use base 'OpenSRF::DomainObject::oilsStatus';
use vars qw/$status $statusCode/;
=head1 NAME
-OpenILS::DomainObject::oilsConnectStatus
+OpenSRF::DomainObject::oilsConnectStatus
=head1 SYNOPSIS
-use OpenILS::DomainObject::oilsResponse;
+use OpenSRF::DomainObject::oilsResponse;
...
# something happens.
-$client->status( new OpenILS::DomainObject::oilsConnectStatus );
+$client->status( new OpenSRF::DomainObject::oilsConnectStatus );
=head1 ABSTRACT
The class for Stati relating to the connection status of a session. This
-is implemented on top of the C<OpenILS::DomainObject::oilsStatus> class, and
+is implemented on top of the C<OpenSRF::DomainObject::oilsStatus> class, and
sets the default B<status> to C<Connection Successful> and B<statusCode> to C<STATUS_OK>.
=head1 SEE ALSO
-B<OpenILS::DomainObject::oilsStatus>
+B<OpenSRF::DomainObject::oilsStatus>
=cut
-package OpenILS::DomainObject::oilsResult;
-use OpenILS::DomainObject::oilsResponse qw/:status/;
-use OpenILS::DomainObject::oilsPrimitive;
-use base 'OpenILS::DomainObject::oilsResponse';
+package OpenSRF::DomainObject::oilsResult;
+use OpenSRF::DomainObject::oilsResponse qw/:status/;
+use OpenSRF::DomainObject::oilsPrimitive;
+use base 'OpenSRF::DomainObject::oilsResponse';
use vars qw/$status $statusCode/;
=head1 NAME
-OpenILS::DomainObject::oilsResult
+OpenSRF::DomainObject::oilsResult
=head1 SYNOPSIS
-use OpenILS::DomainObject::oilsResponse;
+use OpenSRF::DomainObject::oilsResponse;
.... do stuff, create $object ...
-my $res = OpenILS::DomainObject::oilsResult->new;
+my $res = OpenSRF::DomainObject::oilsResult->new;
$res->content($object)
=head1 ABSTRACT
This is the base class for encapuslating RESULT messages send from the server
-to a client. It is a subclass of B<OpenILS::DomainObject::oilsResponse>, and
+to a client. It is a subclass of B<OpenSRF::DomainObject::oilsResponse>, and
sets B<status> to C<OK> and B<statusCode> to C<STATUS_OK>.
=head1 METHODS
-=head2 OpenILS::DomainObject::oilsMessage->content( [$new_content] )
+=head2 OpenSRF::DomainObject::oilsMessage->content( [$new_content] )
=over 4
my ($content) = $self->getChildrenByTagName('oils:domainObject');
if ($new_content) {
- $new_content = OpenILS::DomainObject::oilsScalar->new( JSON->perl2JSON( $new_content ) );
+ $new_content = OpenSRF::DomainObject::oilsScalar->new( JSON->perl2JSON( $new_content ) );
$self->removeChild($content) if ($content);
$self->appendChild($new_content);
=head1 SEE ALSO
-B<OpenILS::DomainObject::oilsResponse>
+B<OpenSRF::DomainObject::oilsResponse>
=cut
-package OpenILS::DomainObject::oilsException;
-use OpenILS::DomainObject::oilsResponse qw/:status/;
-use OpenILS::EX;
-use base qw/OpenILS::EX OpenILS::DomainObject::oilsResponse/;
+package OpenSRF::DomainObject::oilsException;
+use OpenSRF::DomainObject::oilsResponse qw/:status/;
+use OpenSRF::EX;
+use base qw/OpenSRF::EX OpenSRF::DomainObject::oilsResponse/;
use vars qw/$status $statusCode/;
use Error;
sub new {
my $class = shift;
- return $class->OpenILS::DomainObject::oilsResponse::new( @_ );
+ return $class->OpenSRF::DomainObject::oilsResponse::new( @_ );
}
=head1 NAME
-OpenILS::DomainObject::oilsException
+OpenSRF::DomainObject::oilsException
=head1 SYNOPSIS
-use OpenILS::DomainObject::oilsResponse;
+use OpenSRF::DomainObject::oilsResponse;
...
# something breaks.
-$client->send( 'ERROR', OpenILS::DomainObject::oilsException->new( status => "ARRRRRRG!" ) );
+$client->send( 'ERROR', OpenSRF::DomainObject::oilsException->new( status => "ARRRRRRG!" ) );
=head1 ABSTRACT
The base class for Exception messages sent between client and server. This
-is implemented on top of the C<OpenILS::DomainObject::oilsResponse> class, and
+is implemented on top of the C<OpenSRF::DomainObject::oilsResponse> class, and
sets the default B<status> to C<Exception occured> and B<statusCode> to C<STATUS_BADREQUEST>.
=cut
$status = 'Exception occured';
$statusCode = STATUS_INTERNALSERVERERROR;
-package OpenILS::DomainObject::oilsConnectException;
-use OpenILS::DomainObject::oilsResponse qw/:status/;
-use OpenILS::EX;
-use base qw/OpenILS::DomainObject::oilsException OpenILS::EX::ERROR/;
+package OpenSRF::DomainObject::oilsConnectException;
+use OpenSRF::DomainObject::oilsResponse qw/:status/;
+use OpenSRF::EX;
+use base qw/OpenSRF::DomainObject::oilsException OpenSRF::EX::ERROR/;
use vars qw/$status $statusCode/;
=head1 NAME
-OpenILS::DomainObject::oilsConnectException
+OpenSRF::DomainObject::oilsConnectException
=head1 SYNOPSIS
-use OpenILS::DomainObject::oilsResponse;
+use OpenSRF::DomainObject::oilsResponse;
...
# something breaks while connecting.
-$client->send( 'ERROR', new OpenILS::DomainObject::oilsConnectException );
+$client->send( 'ERROR', new OpenSRF::DomainObject::oilsConnectException );
=head1 ABSTRACT
The class for Exceptions that occur durring the B<CONNECT> phase of a session. This
-is implemented on top of the C<OpenILS::DomainObject::oilsException> class, and
+is implemented on top of the C<OpenSRF::DomainObject::oilsException> class, and
sets the default B<status> to C<Connect Request Failed> and B<statusCode> to C<STATUS_FORBIDDEN>.
=head1 SEE ALSO
-B<OpenILS::DomainObject::oilsException>
+B<OpenSRF::DomainObject::oilsException>
=cut
$status = 'Connect Request Failed';
$statusCode = STATUS_FORBIDDEN;
-package OpenILS::DomainObject::oilsMethodException;
-use OpenILS::DomainObject::oilsResponse qw/:status/;
-use base 'OpenILS::DomainObject::oilsException';
+package OpenSRF::DomainObject::oilsMethodException;
+use OpenSRF::DomainObject::oilsResponse qw/:status/;
+use base 'OpenSRF::DomainObject::oilsException';
use vars qw/$status $statusCode/;
=head1 NAME
-OpenILS::DomainObject::oilsMehtodException
+OpenSRF::DomainObject::oilsMehtodException
=head1 SYNOPSIS
-use OpenILS::DomainObject::oilsResponse;
+use OpenSRF::DomainObject::oilsResponse;
...
# something breaks while looking up or starting
# a method call.
-$client->send( 'ERROR', new OpenILS::DomainObject::oilsMethodException );
+$client->send( 'ERROR', new OpenSRF::DomainObject::oilsMethodException );
=head1 ABSTRACT
The class for Exceptions that occur durring the B<CONNECT> phase of a session. This
-is implemented on top of the C<OpenILS::DomainObject::oilsException> class, and
+is implemented on top of the C<OpenSRF::DomainObject::oilsException> class, and
sets the default B<status> to C<Connect Request Failed> and B<statusCode> to C<STATUS_NOTFOUND>.
=head1 SEE ALSO
-B<OpenILS::DomainObject::oilsException>
+B<OpenSRF::DomainObject::oilsException>
=cut
# -------------------------------------------
-package OpenILS::DomainObject::oilsServerError;
-use OpenILS::DomainObject::oilsResponse qw/:status/;
-use base 'OpenILS::DomainObject::oilsException';
+package OpenSRF::DomainObject::oilsServerError;
+use OpenSRF::DomainObject::oilsResponse qw/:status/;
+use base 'OpenSRF::DomainObject::oilsException';
use vars qw/$status $statusCode/;
$status = 'Internal Server Error';
-package OpenILS::DomainObject::oilsBrokenSession;
-use OpenILS::DomainObject::oilsResponse qw/:status/;
-use OpenILS::EX;
-use base qw/OpenILS::DomainObject::oilsException OpenILS::EX::ERROR/;
+package OpenSRF::DomainObject::oilsBrokenSession;
+use OpenSRF::DomainObject::oilsResponse qw/:status/;
+use OpenSRF::EX;
+use base qw/OpenSRF::DomainObject::oilsException OpenSRF::EX::ERROR/;
use vars qw/$status $statusCode/;
$status = "Request on Disconnected Session";
$statusCode = STATUS_EXPFAILED;
-package OpenILS::DomainObject::oilsXMLParseError;
-use OpenILS::DomainObject::oilsResponse qw/:status/;
-use OpenILS::EX;
-use base qw/OpenILS::DomainObject::oilsException OpenILS::EX::ERROR/;
+package OpenSRF::DomainObject::oilsXMLParseError;
+use OpenSRF::DomainObject::oilsResponse qw/:status/;
+use OpenSRF::EX;
+use base qw/OpenSRF::DomainObject::oilsException OpenSRF::EX::ERROR/;
use vars qw/$status $statusCode/;
$status = "XML Parse Error";
$statusCode = STATUS_EXPFAILED;
-package OpenILS::DomainObject::oilsAuthException;
-use OpenILS::DomainObject::oilsResponse qw/:status/;
-use OpenILS::EX;
-use base qw/OpenILS::DomainObject::oilsException OpenILS::EX::ERROR/;
+package OpenSRF::DomainObject::oilsAuthException;
+use OpenSRF::DomainObject::oilsResponse qw/:status/;
+use OpenSRF::EX;
+use base qw/OpenSRF::DomainObject::oilsException OpenSRF::EX::ERROR/;
use vars qw/$status $statusCode/;
$status = "Authentication Failure";
$statusCode = STATUS_FORBIDDEN;
-package OpenILS::DomainObject::oilsSearch;
-use OpenILS::DomainObject;
-use OpenILS::DomainObject::oilsPrimitive;
-use OpenILS::DOM::Element::searchCriteria;
-use base 'OpenILS::DomainObject';
+package OpenSRF::DomainObject::oilsSearch;
+use OpenSRF::DomainObject;
+use OpenSRF::DomainObject::oilsPrimitive;
+use OpenSRF::DOM::Element::searchCriteria;
+use base 'OpenSRF::DomainObject';
sub new {
my $class = shift;
$self->$part( $args{$part} );
next;
}
- $self->criteria( OpenILS::DOM::Element::searchCriteria->new( @{$args{$part}} ) );
+ $self->criteria( OpenSRF::DOM::Element::searchCriteria->new( @{$args{$part}} ) );
}
return $self;
}
my ($old_fields) = $self->getChildrenByTagName("oils:domainObjectCollection");
if ($new_fields_ref) {
- my $do = OpenILS::DomainObjectCollection::oilsArray->new( @$new_fields_ref );
+ my $do = OpenSRF::DomainObjectCollection::oilsArray->new( @$new_fields_ref );
if (defined $old_fields) {
$old_fields->replaceNode($do);
} else {
if (@_) {
unshift @_, $new_crit;
- $new_crit = OpenILS::DOM::Element::searchCriteria->new(@_);
+ $new_crit = OpenSRF::DOM::Element::searchCriteria->new(@_);
}
my ($old_crit) = $self->getChildrenByTagName("oils:searchCriteria");