From: erickson Date: Mon, 11 Jun 2007 20:12:38 +0000 (+0000) Subject: Deleting OpenSRF from repository. OpenSRF has its own repository now. Bye, bye... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=77f200a55dfe8c2cbcb91f788626a7875d49b10e;p=Evergreen.git Deleting OpenSRF from repository. OpenSRF has its own repository now. Bye, bye, OpenSRF! git-svn-id: svn://svn.open-ils.org/ILS/trunk@7413 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/OpenSRF/bin/osrf_ctl.sh b/OpenSRF/bin/osrf_ctl.sh deleted file mode 100755 index 89bb4a5305..0000000000 --- a/OpenSRF/bin/osrf_ctl.sh +++ /dev/null @@ -1,180 +0,0 @@ -#!/bin/bash - -OPT_ACTION="" -OPT_PERL_CONFIG="" -OPT_C_CONFIG="" -OPT_PID_DIR="" - -# --------------------------------------------------------------------------- -# Make sure we're running as the correct user -# --------------------------------------------------------------------------- -[ $(whoami) != 'opensrf' ] && echo 'Must run as user "opensrf"' && exit; - - -# NOTE: Eventually, there will be one OpenSRF config file format -# When this happens, we will only need a single OPT_CONFIG variable - -function usage { - echo ""; - echo "usage: $0 -d -p -c -a "; - echo ""; - echo "Actions include:" - echo -e "\tstart_router" - echo -e "\tstop_router" - echo -e "\trestart_router" - echo -e "\tstart_perl" - echo -e "\tstop_perl" - echo -e "\trestart_perl" - echo -e "\tstart_c" - echo -e "\tstop_c" - echo -e "\trestart_c" - echo -e "\tstart_osrf" - echo -e "\tstop_osrf" - echo -e "\trestart_osrf" - echo -e "\tstop_all" - echo -e "\tstart_all" - echo -e "\trestart_all" - echo ""; - echo "Example:"; - echo " $0 -p bootstrap.conf -c opensrf_core.xml -a restart_all"; - echo ""; - exit; -} - - -# --------------------------------------------------------------------------- -# Load the command line options and set the global vars -# --------------------------------------------------------------------------- -while getopts "p:c:a:d:h" flag; do - case $flag in - "a") OPT_ACTION="$OPTARG";; - "c") OPT_C_CONFIG="$OPTARG";; - "p") OPT_PERL_CONFIG="$OPTARG";; - "d") OPT_PID_DIR="$OPTARG";; - "h"|*) usage;; - esac; -done - - -[ -z "$OPT_PID_DIR" ] && OPT_PID_DIR=/tmp; -[ -z "$OPT_ACTION" ] && usage; - -PID_ROUTER="$OPT_PID_DIR/router.pid"; -PID_OSRF_PERL="$OPT_PID_DIR/osrf_perl.pid"; -PID_OSRF_C="$OPT_PID_DIR/osrf_c.pid"; - - -# --------------------------------------------------------------------------- -# Utility code for checking the PID files -# --------------------------------------------------------------------------- -function do_action { - - action="$1"; - pidfile="$2"; - item="$3"; - - if [ $action == "start" ]; then - - if [ -e $pidfile ]; then - pid=$(cat $pidfile); - echo "$item already started : $pid"; - return 0; - fi; - echo "Starting $item"; - fi; - - if [ $action == "stop" ]; then - - if [ ! -e $pidfile ]; then - echo "$item not running"; - return 0; - fi; - - pid=$(cat $pidfile); - echo "Stopping $item : $pid"; - kill -s INT $pid 2> /dev/null; - sleep 1; - kill -9 $pid 2> /dev/null; - rm -f $pidfile; - - fi; - - return 0; -} - - -# --------------------------------------------------------------------------- -# Start / Stop functions -# --------------------------------------------------------------------------- - - -function start_router { - do_action "start" $PID_ROUTER "OpenSRF Router"; - opensrf_router $OPT_C_CONFIG router - pid=$(ps ax | grep "OpenSRF Router" | grep -v grep | awk '{print $1}') - echo $pid > $PID_ROUTER; - return 0; -} - -function stop_router { - do_action "stop" $PID_ROUTER "OpenSRF Router"; - return 0; -} - -function start_perl { - do_action "start" $PID_OSRF_PERL "OpenSRF Perl"; - perl -MOpenSRF::System="$OPT_PERL_CONFIG" -e 'OpenSRF::System->bootstrap()' & - pid=$!; - echo $pid > $PID_OSRF_PERL; - sleep 5; - return 0; -} - -function stop_perl { - do_action "stop" $PID_OSRF_PERL "OpenSRF Perl"; - sleep 1; - return 0; -} - -function start_c { - host=$(perl -MNet::Domain=hostfqdn -e 'print hostfqdn()') - do_action "start" $PID_OSRF_C "OpenSRF C (host=$host)"; - opensrf-c $host $OPT_C_CONFIG opensrf; - pid=$(ps ax | grep "OpenSRF System-C" | grep -v grep | awk '{print $1}') - echo $pid > "$PID_OSRF_C"; - return 0; -} - -function stop_c { - do_action "stop" $PID_OSRF_C "OpenSRF C"; - killall -9 opensrf-c # hack for now to force kill all C services - sleep 1; - return 0; -} - - - -# --------------------------------------------------------------------------- -# Do the requested action -# --------------------------------------------------------------------------- -case $OPT_ACTION in - "start_router") start_router;; - "stop_router") stop_router;; - "restart_router") stop_router; start_router;; - "start_perl") start_perl;; - "stop_perl") stop_perl;; - "restart_perl") stop_perl; start_perl;; - "start_c") start_c;; - "stop_c") stop_c;; - "restart_c") stop_c; start_c;; - "start_osrf") start_perl; start_c;; - "stop_osrf") stop_perl; stop_c;; - "restart_osrf") stop_perl; stop_c; start_perl; start_c;; - "stop_all") stop_c; stop_perl; stop_router;; - "start_all") start_router; start_perl; start_c;; - "restart_all") stop_c; stop_perl; stop_router; start_router; start_perl; start_c;; - *) usage;; -esac; - - - diff --git a/OpenSRF/doc/Application-HOWTO.txt b/OpenSRF/doc/Application-HOWTO.txt deleted file mode 100644 index 41deae11d9..0000000000 --- a/OpenSRF/doc/Application-HOWTO.txt +++ /dev/null @@ -1,95 +0,0 @@ -OpenSRF Application development API ------------------------------------ - -OpenSRF offers a very simple Application development API to users of the -framework. All that is required is to create a Perl module that subclasses -the OpenSRF::Application package and register it's methods with the -Method Dispatcher framework. - -Each method executes in the OpenSRF::Application namespace as an instance of -the custom Application. There are some instance methods on this object which -can be used by the method to alter the behavior or response that the method -sends to the client: - - $self->api_name # returns the name of the method as called by the client - - $self->method # returns the actual perl name of the sub implementing the - # method - - my $meth = $self->method_lookup( 'api_name' ) - # constructs a new instance object implementing another - # method in the same Application package as a subrequest - - my ($subresult) = $meth->run( @params ) - # runs the subrequest method and returns the array of - # results - - -The method is also handed an OpenSRF::AppRequest object that has been -constructed for the client request that generated the call to the method. -This OpenSRF::AppRequest object is used to communicate back to the client, -passing status messages or streaming response packets. - -All that is required to register an Application with OpenSRF is to place a -setting in the configuration file that names the module that implements the -new Application, and to add the new Application's symbolic name to the list of -servers that should be started by OpenSRF. - - Example Application - ------------------- - - # Perl module and package implementing an math server. - package MyMathServer; - use OpenSRF::Application; - use base 'OpenSRF::Application'; - - sub do_math { - my $self = shift; # instance of MyMathServer - - my $client = shift; # instance of OpenSRF::AppRequest connected - # to the client - - my $left_side = shift; - my $op = shift; - my $right_side = shift; - - return eval "$left_side $op $right_side"; - } - - __PACKAGE__->register_method( - api_name => 'useless.do_math', - argc => 3, - method => 'do_math' - ); - - 1; - - - - # Another Perl module and package implementing a square-root server on top - # of the previous math server - package MySquareRootServer; - use OpenSRF::Application; - use base 'OpenSRF::Application'; - use MyMathServer; - - sub sqrt_math { - my $self = shift; # instance of MySquareRootServer - - my $client = shift; # instance of OpenSRF::AppRequest connected - # to the client - - my $math_method = $self->method_lookup('useless.do_math'); - my ($result) = $math_method->run( @_ ); - - return sqrt( $result ); - } - - __PACKAGE__->register_method( - api_name => 'simple.sqrt', - argc => 3, - method => 'sqrt_math' - ); - - 1; - diff --git a/OpenSRF/doc/OpenSRF-Messaging-Protocol.html b/OpenSRF/doc/OpenSRF-Messaging-Protocol.html deleted file mode 100644 index 1eeff04c43..0000000000 --- a/OpenSRF/doc/OpenSRF-Messaging-Protocol.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - OILS Messaging - - - - - - -

Abstract

- -

- - The OpenSRF messaging system works on two different primary layers: the transport layer and the - application layer. The transport layer manages virtual connections between client and server, - while the application layer manages user/application level messages. - - All messages must declare which protocol version they are requesting. The current protocol level - is 1. - -

Transport Layer

- -

- There are currently three types of messages in the transport layer: CONNECT, STATUS, and - DISCONNECT. - -

- STATUS messages provide general information to the transport layer and are used in different - ways throughout the system. They are sent primarily by the server in response to client requests. - Each message comes with - a status and statusCode. The actual status part of the STATUS message is just a helpful message - (mostly for debugging). The - statusCode is an integer representing the exact status this message represents. The status codes - are modeled after HTTP status codes. Currently used codes consist of the following: - -

-		100	STATUS_CONTINUE
-		200	STATUS_OK	
-		205	STATUS_COMPLETE
-		307	STATUS_REDIRECTED
-		400	STATUS_BADREQUEST
-		404	STATUS_NOTFOUND
-		408	STATUS_TIMEOUT
-		417	STATUS_EXPFAILED
-		
- -

- This list is likely to change at least a little. - - -

- The CONNECT message initiates the virtual connection for a client and expects a STATUS - in return. If the connection is successful, the statusCode for the STATUS message shall be - STATUS_OK. - -

- If at any point the client sends a non-connect message to the server when the client is not connected or the - connection has timed out, the STATUS that is returned shall have statusCode STATUS_EXPFAILED. - -

- The DISCONNECT message is sent by the client to the server to end the virtual session. The server - shall not respond to any disconnect messages. - - -

Message Layer

- -

- There are currently two types of message layer messages: REQUEST and RESULT. REQUEST - messages represent application layer requests made by a client and RESULT messages are the servers - response to such REQUEST's. - -

- By design, all CONNECT and REQUEST messages sent by a client will be acknowledged by one or - more responses from the server. This is much like the SYN-ACK philosophy of TCP, however different in many - ways. The only guarantees made by the server are 1. you will know that we received your request and 2. you - will know the final outcome of your request. It is the responsibility of the actual application to send - the requested application data (e.g. RESULT messages, intermediate STATUS messages). - - -

- The server responses are matched to client requests by a threadTrace. A threadTrace is simply a - number and all application layer messages and STATUS messages are required to have one. (Note that the - threadTrace contained within a STATUS message sent in response to a CONNECT will be ignored). Currently, - there is no restriction on the number other than it shall be unique within a given virtual connection. - When the server receives a REQUEST message, it extracts the threadTrace from the message - and all responses to that request will contain the same threadTrace. - -

- As mentioned above, every CONNECT message will be acknowledged by a single - STATUS message. REQUEST's are a little more complex, however. A REQUEST - will receive one or more RESULT's if the REQUEST warrants such a response. A REQUEST - may even receive one or more intermediate STATUS's (e.g. STATUS_CONTINUE). (Consult the - documentation on the application request the client is requesting for more information on the number and - type of responses to that request). All REQUEST's, however, regardless of other response types, - shall receieve as the last response a STATUS message with statusCode STATUS_COMPLETE. This - allows the client to wait for REQUEST "completeness" as opposed to waiting on or calculating individual - responses. - - -

Client Pseudocode

- -
-
-send CONNECT
-
-msg = recv()
-
-if ( msg.statusCode == STATUS_OK ) 
-
-	OK. continue
-
-while ( more requests ) {
-
-	/* you may send multiple requests before processing any responses.  For the sake
-		of this example, we will only walk through a single client request */
-
-	send REQUEST with threadTrace X 
-
-	while ( response = recv ) { 
-
-		if (  response.threadTrace != X ) 
-
-			continue/ignore
-
-		if ( response.type == STATUS )
-		
-			if (  response.statusCode == STATUS_TIMEOUT		or
-					response.statusCode == STATUS_REDIRECTED	or
-					response.statusCode == STATUS_EXPFAILED)
-
-				resend the the request with threadTrace X because it was not honored.
-
-			if ( response.statusCode == STATUS_COMPLETE ) 
-
-				the request is now complete, nothing more to be done with this request
-				break out of loop
-	
-		if ( response.typ == RESULT )
-
-			pass result to the application layer for processing
-
-	} // receiving
-
-} // sending
-
-
-		
- -
-

Server Pseudocode

- -
-
-while( message = recv() ) {
-
-	if( message.type != CONNECT )
-
-		return a STATUS with statusCode STATUS_EXPFAILED
-		start loop over
-
-	if ( message.type == CONNECT )
-
-		return STATUS with statusCode STATUS_OK and continue
-
-	while ( msg = recv() and virtual session is active ) {
-
-
-		if ( msg.type == REQUEST )
-
-			Record the threadTrace.  Pass the REQUEST to the application layer for processing.
-			When the application layer has completed processing, respond to the client
-			with a STATUS message with statusCode STATUS_COMPLETE and threadTrace matching
-			the threadTrace of the REQUEST.  Once the final STATUS_COMPLETE message is sent,
-			the session is over.  Return to outer server loop. 
-
-			/* Note: during REQUEST processing by the application layer, the application may 
-				opt to send RESULT and/or STATUS messages to the client.  The server side
-				transport mechanism is not concerned with these messages.  The server only 
-				needs to be notified when the REQUEST has been sucessfully completed. */
-
-		if( message.type == DISCONNECT )
-
-			Virtual session has ended. Return to outer loop.
-
-
-	} // Sessin loop
-
-} // Main server loop
-
-
-
-		
- - -
-

XML Examples

-
- - -

Protocol Element

- -
-
-<oils:domainObjectAttr value="1" name="protocol"/>
-
-		
- -

threadTrace Element

- -
-
-<oils:domainObjectAttr value="1" name="threadTrace"/>
-
-		
- -

CONNECT Message

- -
-
-<oils:domainObject name="oilsMessage">
-	<oils:domainObjectAttr value="CONNECT" name="type"/>
-	<oils:domainObjectAttr value="1" name="threadTrace"/>
-	<oils:domainObjectAttr value="1" name="protocol"/>
-</oils:domainObject>
-
-		
- - -

DISCONNECT Message

- -
-
-<oils:domainObject name="oilsMessage">
-	<oils:domainObjectAttr value="DISCONNECT" name="type"/>
-	<oils:domainObjectAttr value="0" name="threadTrace"/>
-	<oils:domainObjectAttr value="1" name="protocol"/>
-</oils:domainObject>
-
-		
- -

STATUS Message

- -
-
-<oils:domainObject name="oilsMessage">
-	<oils:domainObjectAttr value="STATUS" name="type"/>
-	<oils:domainObjectAttr value="0" name="threadTrace"/>
-	<oils:domainObjectAttr value="1" name="protocol"/>
-	<oils:domainObject name="oilsConnectStatus">
-		<oils:domainObjectAttr value="Connection Successful" name="status"/>
-		<oils:domainObjectAttr value="200" name="statusCode"/>
-	</oils:domainObject>
-</oils:domainObject>
-
-		
- -

REQUEST Message

- -
-
-<oils:domainObject name="oilsMessage">
-	<oils:domainObjectAttr value="REQUEST" name="type"/>
-	<oils:domainObjectAttr value="4" name="threadTrace"/>
-	<oils:domainObjectAttr value="1" name="protocol"/>
-	<oils:domainObject name="oilsMethod">
-		<oils:domainObjectAttr value="mult" name="method"/>
-		<oils:params>[1, 2]</oils:params>
-	</oils:domainObject>
-</oils:domainObject>
-
-		
- -

RESULT Message

- -
-
-<oils:domainObject name="oilsMessage">
-	<oils:domainObjectAttr value="RESULT" name="type"/>
-	<oils:domainObjectAttr value="4" name="threadTrace"/>
-	<oils:domainObjectAttr value="1" name="protocol"/>
-	<oils:domainObject name="oilsResult">
-		<oils:domainObjectAttr value="OK" name="status"/>
-		<oils:domainObjectAttr value="200" name="statusCode"/>
-		<oils:domainObject name="oilsScalar">2</oils:domainObject>
-	</oils:domainObject>
-</oils:domainObject>
-
-		
- - - - - - - diff --git a/OpenSRF/doc/Persist-API.html b/OpenSRF/doc/Persist-API.html deleted file mode 100644 index 657e206c03..0000000000 --- a/OpenSRF/doc/Persist-API.html +++ /dev/null @@ -1,651 +0,0 @@ - - - OpenSRF Persistence Application API-Namespace - - - - -
-

OpenSRF Persistence Application API-Namespace

-
-
- -
- The Persistence Application provides other OpenSRF Applications with a standard API for - sharing and caching data. These data are stored in Slots, and there are three basic - interfaces for interacting with Slots: QUEUEs, STACKs and OBJECTs. -
- -
    -
  • General Persistence Slot methods

    - - Methods used to create, set up and destroy slots. -

    - -
    -
    opensrf.persist.slot.create( slot_name )
    - - Creates a Persistence Slot. - -
    Parameters:
    -
    slot_name (optional)
    -
    - The name of the Persistence Slot to create. If a name is not specified - then the Slot is given a generic, unique name. Automatically named Slots - are destroyed as soon as they are empty. -
    - - -
    Returns:
    - -
    Success
    -
    The name of the Slot that was created.
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.slot.create_expirable( slot_name, expire_interval )
    - - Creates a Persistence Slot that is automatically destroyed after the specified interval. - -
    Parameters:
    -
    slot_name
    -
    The name of the Persistence Slot to create.
    -
    expire_interval
    -
    - An interval describing how long to wait after an access has - occured on the Slot before automatically destroying it. The interval - can be specified using a fairly complex, human readable format, or as - a number of seconds. For example: -
      -
    • 1 day, 2 hours and 35 minutes
    • -
    • +2h
    • -
    • 1 week
    • -
    • 300
    • -
    - - A setting of 0 (zero) disables automatic expiration for a Slot. -
    - - -
    Returns:
    - -
    Success
    -
    The name of the Slot that was created.
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.slot.set_expire( slot_name, expire_interval )
    - - Sets or disables the expiration interval on an existing Persistence Slot. - -
    Parameters:
    -
    slot_name
    -
    The name of the Persistence Slot to update.
    -
    expire_interval
    -
    - An interval describing how long to wait after an access has - occured on the Slot before automatically destroying it. The interval - can be specified using a fairly complex, human readable format, or as - a number of seconds. For example: -
      -
    • 1 day, 2 hours and 35 minutes
    • -
    • +2h
    • -
    • 1 week
    • -
    • 300
    • -
    - - A setting of 0 (zero) disables automatic expiration for a Slot. -
    - - -
    Returns:
    - -
    Success
    -
    The number of seconds the requested interval represents.
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.slot.destroy( slot_name )
    - - Destroys a Persistence Slot. - -
    Parameters:
    -
    slot_name
    -
    The name of the Persistence Slot to destroy.
    - - -
    Returns:
    - -
    Success
    -
    The name of the Slot that was destroyed.
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
  • - -
  • QUEUE API-Namespace Slot methods

    - - Uses the Slot in FIFO mode, pushing values onto one end an pulling them off the other. - The QUEUE API-Namespace is useful for creating an ordered message passing access point. - -

    - -
    -
    opensrf.persist.queue.push( slot_name, object )
    - - Adds an object to a Slot in FIFO order. - -
    Parameters:
    - -
    slot_name
    -
    The name of the Persistence Slot to use for storing the object.
    - -
    object
    -
    The object that should be pushed onto the front of the QUEUE.
    - - -
    Returns:
    - -
    Success
    -
    The name of the Slot that was used.
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.queue.pop( slot_name )
    - - Removes and returns the next value in a QUEUE type Slot. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot from which an object should be retrieved. -
    - - -
    Returns:
    - -
    Success
    -
    - The next object on the QUEUE Slot, or an empty - (NULL) result if the Slot is empty. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.queue.peek( slot_name )
    - - Returns the next value in a QUEUE type Slot without removing it. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot from which an object should be retrieved. -
    - - -
    Returns:
    - -
    Success
    -
    - The next object on the QUEUE Slot, or an empty - (NULL) result if the Slot is empty. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.queue.peek.all( slot_name )
    - - Returns all values in a QUEUE type Slot without removing them. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot from which the objects should be retrieved. -
    - - -
    Returns:
    - -
    Success
    -
    - A stream of all objects on the QUEUE Slot, or an empty - (NULL) result if the Slot is empty. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.queue.peek.all.atomic( slot_name )
    - - Returns all values in a QUEUE type Slot without removing them. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot from which the objects should be retrieved. -
    - - -
    Returns:
    - -
    Success
    -
    - A single array of all objects on the QUEUE Slot, or an empty - array if the Slot is empty. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.queue.length( slot_name )
    - - Returns the number of objects in the QUEUE type Slot. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot in question. -
    - - -
    Returns:
    - -
    Success
    -
    The number of objects in the Persistence Slot.
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.queue.size( slot_name )
    - - Returns the number bytes taken up by the JSON encoded version of - the objects in the QUEUE type Slot. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot in question. -
    - - -
    Returns:
    - -
    Success
    -
    - The space, in bytes, used by the JSON encoded - objects in the Persistence Slot. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
  • - -
  • STACK style Slot methods

    - - Uses the Slot in FILO mode, pushing and pulling objects at the same end of a list. - The STACK API-Namespace is useful for creating a global Application context stack. - -

    - -
    -
    opensrf.persist.stack.push( slot_name, object )
    - - Adds an object to a Slot in FILO order. - -
    Parameters:
    - -
    slot_name
    -
    The name of the Persistence Slot to use for storing the object.
    - -
    object
    -
    The object that should be pushed onto the front of the STACK.
    - - -
    Returns:
    - -
    Success
    -
    The name of the Slot that was used.
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.stack.pop( slot_name )
    - - Removes and returns the next value in a STACK type Slot. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot from which an object should be retrieved. -
    - - -
    Returns:
    - -
    Success
    -
    - The next object on the STACK Slot, or an empty - (NULL) result if the Slot is empty. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.stack.peek( slot_name )
    - - Returns the next value in a STACK type Slot without removing it. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot from which an object should be retrieved. -
    - - -
    Returns:
    - -
    Success
    -
    - The next object on the STACK Slot, or an empty - (NULL) result if the Slot is empty. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.stack.peek.all( slot_name )
    - - Returns all values in a STACK type Slot without removing them. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot from which the objects should be retrieved. -
    - - -
    Returns:
    - -
    Success
    -
    - A stream of all objects on the STACK Slot, or an empty - (NULL) result if the Slot is empty. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.stack.peek.all.atomic( slot_name )
    - - Returns all values in a STACK type Slot without removing them. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot from which the objects should be retrieved. -
    - - -
    Returns:
    - -
    Success
    -
    - A single array of all objects on the STACK Slot, or an empty - array if the Slot is empty. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.stack.depth( slot_name )
    - - Returns the number of objects in the STACK type Slot. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot in question. -
    - - -
    Returns:
    - -
    Success
    -
    The number of objects in the Persistence Slot.
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.stack.size( slot_name )
    - - Returns the number bytes taken up by the JSON encoded version of - the objects in the STACK type Slot. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot in question. -
    - - -
    Returns:
    - -
    Success
    -
    - The space, in bytes, used by the JSON encoded - objects in the Persistence Slot. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
  • - -
  • OBJECT style Slot methods

    - - Uses the Slot in Single Object mode, storing a single object in the Slot. - -

    - - The OBJECT API-Namespace is useful for globally caching unique objects. - -

    - -
    -
    opensrf.persist.object.set( slot_name, object )
    - - Sets the value of a Slot. If the Slot has been used in STACK or QUEUE - mode and opensrf.persist.object.set is called then all objects currently - in the Slot will be lost. - -
    Parameters:
    - -
    slot_name
    -
    The name of the Persistence Slot to use for storing the object.
    - -
    object
    -
    The object that should be set as the one object in the Slot.
    - - -
    Returns:
    - -
    Success
    -
    The name of the Slot that was used.
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.object.get( slot_name )
    - - Removes and returns the value in an OBJECT type Slot. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot from which the object should be retrieved. -
    - - -
    Returns:
    - -
    Success
    -
    - The object in the OBJECT Slot, or an empty - (NULL) result if the Slot is empty. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.object.peek( slot_name )
    - - Returns the value in an OBJECT type Slot without removing it. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot from which the object should be retrieved. -
    - - -
    Returns:
    - -
    Success
    -
    - The object on the OBJECT Slot, or an empty - (NULL) result if the Slot is empty. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
    -
    opensrf.persist.object.size( slot_name )
    - - Returns the number bytes taken up by the JSON encoded version of - the object in the OBJECT type Slot. - -
    Parameters:
    - -
    slot_name
    -
    - The name of the Persistence Slot in question. -
    - - -
    Returns:
    - -
    Success
    -
    - The space, in bytes, used by the JSON encoded - object in the Persistence Slot. -
    - -
    Failure
    -
    An empty (NULL) result.
    -
    - -
  • -
- - diff --git a/OpenSRF/doc/Roadmap.txt b/OpenSRF/doc/Roadmap.txt deleted file mode 100644 index f86ccd06b7..0000000000 --- a/OpenSRF/doc/Roadmap.txt +++ /dev/null @@ -1,51 +0,0 @@ -Roadmap for OpenSRF === The high points as of Febuary 2005 ----------------------------------------------------------- - -We will attempt to keep this file up to date as requirements for -Open-ILS change over time, as they are certain to... - -========== - -# Version 0.1 (January 2005) -- Evolving CVS version ... stay tuned - - * Session failure recovery - * Initial specification for Application API - * Basic Application support - * Sub-requests within one Application - -# Version 0.2 (Febuary/March 2005) -- First full release as a package - - * Centralized Application configuration management - * Automatic cross-server API discovery - * Transparent remote server sub-requests - * Object Persistence Application implementing Stacks, Queues - and Object Stores based on SQLite - -# Version 0.3 (March/April 2005) -- Version for use in the Alpha - release of Open-ILS - - * Partial implementation of a BROADCAST mode for addressing all - Servers of a particular Class on one Router - * Distributed version of the Object Persistence Application - -# Version 0.5 (July/August 2005) - - * Full implementation of a BROADCAST mode for addressing all - Servers of any number of Classes on any number of Routers - * Client side use of transparent API discovery; the client - libraries will automatically discover and use the correct - Server for any valid method request - -# Version 0.7 (October/November 2005) - - * Basic inter-server session migration support in addition - to session failure recovery due to server failure - -# Version 0.9 (Some time in 2006) - - * Built in distributed transaction support. - -# Version 1.0 (in the future) - - * Who knows? - diff --git a/OpenSRF/doc/dokuwiki-doc-stubber.pl b/OpenSRF/doc/dokuwiki-doc-stubber.pl deleted file mode 100755 index fcdd03dcd6..0000000000 --- a/OpenSRF/doc/dokuwiki-doc-stubber.pl +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/perl -w -use OpenSRF::System qw(/pines/conf/bootstrap.conf); -use Getopt::Long - -$| = 1; - -my $cvs_base = 'http://open-ils.org/cgi-bin/viewcvs.cgi/ILS/Open-ILS/src/perlmods/'; -my $nest = 0; -my $service; -my $filter; -my $sort_ignore; - -GetOptions( 'cvs_base=s' => \$cvs_base, - 'nest' => \$nest, - 'service=s' => \$service, - 'ignore=s' => \$sort_ignore, - 'filter=s' => \$filter, -); - -unless( $service ) { - print "usage: $0 -s [-c -f -n]\n"; - exit; -} - -OpenSRF::System->bootstrap_client(); -my $session = OpenSRF::AppSession->create( $service ); - -my $req; -if ($filter) { - $req = $session->request('opensrf.system.method', $filter); -} else { - $req = $session->request('opensrf.system.method.all'); -} - -my $count = 1; -my %m; -while( my $meth = $req->recv(60) ) { - $meth = $meth->content; - - $api_name = $meth->{api_name}; - - $m{$api_name}{api_name} = $meth->{api_name}; - - $m{$api_name}{package} = $meth->{package}; - $m{$api_name}{method} = $meth->{method}; - - $m{$api_name}{api_level} = int $meth->{api_level}; - $m{$api_name}{server_class} = $meth->{server_class} || '**ALL**'; - $m{$api_name}{stream} = int($meth->{stream} || 0); - $m{$api_name}{cachable} = int($meth->{cachable} || 0); - - $m{$api_name}{note} = $meth->{note} || 'what I do'; - ($m{$api_name}{cvs} = $m{$api_name}{package}) =~ s/::/\//go; - - $m{$api_name}{stream} = $m{$api_name}{stream}?'Yes':'No'; - $m{$api_name}{cachable} = $m{$api_name}{cachable}?'Yes':'No'; - - print STDERR "." unless ($count % 10); - - $count++; -} - -warn "\nThere are ".scalar(keys %m)." methods published by $service\n"; - -my @m_list; -if (!$sort_ignore) { - @m_list = sort keys %m; -} else { - @m_list = - map { ($$_[0]) } - sort { - $$a[1] cmp $$b[1] - || - length($$b[0]) <=> length($$a[0]) - } map { - [$_ => - do { - (my $x = $_) =~ s/^$sort_ignore//go; - $x; - } ] - } keys %m; -} - -for my $meth ( @m_list ) { - - my $pad = 0; - my $header = '====='; - if ($nest) { - no warnings; - (my $x = $meth) =~ s/\./$pad++;$1/eg; - } - $pad = ' 'x$pad; - - print <<" METHOD"; -$pad$header $meth $header - -$m{$meth}{note} - - * [[osrf-devel:terms#opensrf_api-level|API Level]]: $m{$meth}{api_level} - * [[osrf-devel:terms#opensrf_server_class|Server Class]]: $m{$meth}{server_class} - * Implementation Method: [[$cvs_base/$m{$meth}{cvs}.pm|$m{$meth}{package}\::$m{$meth}{method}]] - * Streaming [[osrf-devel:terms#opensrf_method|Method]]: $m{$meth}{stream} - * Cachable [[osrf-devel:terms#opensrf_method|Method]]: $m{$meth}{cachable} - - * **Parameters:** - * //param1//\\\\ what it is... - * **Returns:** - * //Success//\\\\ successful format - * //Failure//\\\\ failure format (exception, etc) - - - METHOD -} - diff --git a/OpenSRF/examples/bootstrap.conf.example b/OpenSRF/examples/bootstrap.conf.example deleted file mode 100644 index ce445f73cb..0000000000 --- a/OpenSRF/examples/bootstrap.conf.example +++ /dev/null @@ -1,44 +0,0 @@ -# ---------------------------------------------------------- -# bootstrap config file -# ---------------------------------------------------------- -[bootstrap] - -# location of the opensrf.xml config file -settings_config = /path/to/opensrf.xml - -# log files directory -log_dir = /path/to/log - -## Log file is either a file name or syslog: -#logfile = osrfysys.log -logfile = syslog:local0 - -# defines the syslog facility for the activity log -#actlog = activity.log -actlog = syslog:local1 - -# log level -debug = ERROR -#debug = INFO -#debug = DEBUG -#debug = INTERNAL - -# the jabber login of the router (changing this will likely cause problems) -router_name = router - -# all jabber domains we want our app to connect to -list:domains = router1.domain.com, router2.domain.com - -# jabber login -username = jabber_username - -# jabber password -passwd = jabber_password - -# if port is non-numeric (e.g. /tmp/mysock.sock) then we will attempt to -# connect to the specified string as a unix socket file -# This works with Chop Chop jabber only (opensrf custom jabber server) -port = 5222 - -# -------------------------------------- - diff --git a/OpenSRF/examples/fieldmapper2cdbi.xsl b/OpenSRF/examples/fieldmapper2cdbi.xsl deleted file mode 100644 index f6ad904909..0000000000 --- a/OpenSRF/examples/fieldmapper2cdbi.xsl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - -1; - - - - - - - - - - - - - - - - - #------------------------------------------------------------------------------- - # Class definition for "" () - #------------------------------------------------------------------------------- - package ; - use base ''; - - __PACKAGE__->table(""); - - __PACKCAGE__->sequence(""); - - - __PACKAGE__->columns(Primary => ); - - __PACKAGE__->columns( - Essential => - ); - - - __PACKAGE__->columns( - Others => - ); - - - - - - - - - - - - '', - - - - - - - ->( - => '' - ); - - - - diff --git a/OpenSRF/examples/fieldmapper2javascript.xsl b/OpenSRF/examples/fieldmapper2javascript.xsl deleted file mode 100644 index e2f8e1dc81..0000000000 --- a/OpenSRF/examples/fieldmapper2javascript.xsl +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -// support functions - -var IE = false; -var unit_test = false; - -function instanceOf(object, constructorFunction) { - if(!IE) { - while (object != null) { - if (object == constructorFunction.prototype) - return true; - object = object.__proto__; - } - } else { - while(object != null) { - if( object instanceof constructorFunction ) - return true; - object = object.__proto__; - } - } - return false; -} - -// Top level superclass -function Fieldmapper(array) { - this.array = []; - if(array) { - if (array.constructor == Array) { - this.array = array; - } else if ( instanceOf( array, String ) || instanceOf( array, Number ) ) { - - var obj = null; - if (this.cacheable) { - try { - obj = this.baseClass.obj_cache[this.classname][array]; - } catch (E) {}; - } - - if (!obj) { - obj = user_request( - 'open-ils.proxy', - 'open-ils.proxy.proxy', - [ - mw.G.auth_ses[0], - 'open-ils.storage', - 'open-ils.storage.direct.' + this.db_type + '.retrieve', - array - ] - )[0]; - - if (this.cacheable) { - if (this.baseClass.obj_cache[this.classname] == null) - this.baseClass.obj_cache[this.classname] = {}; - - this.baseClass.obj_cache[this.classname][obj.id()] = obj; - } - } - this.array = obj.array; - - } else { - throw new FieldmapperException( "Attempt to build fieldmapper object with something wierd"); - } - } -} -Fieldmapper.prototype.baseClass = Fieldmapper; -Fieldmapper.prototype.obj_cache = {}; - -Fieldmapper.prototype.search function (type,field,value) { - - var list = user_request( - 'open-ils.proxy', - 'open-ils.proxy.proxy', - [ - mw.G.auth_ses[0], - 'open-ils.storage', - 'open-ils.storage.direct.' + type.db_type + '.search.' + field, - array - ] - )[0]; - if (type.cacheable) { - if (type.baseClass.obj_cache[type.classname] == null) - type.baseClass.obj_cache[type.classname] = {}; - for (var i in list) { - type.baseClass.obj_cache[type.classname][list[i].id()] = list[i]; - } - } - return list; -} - -Fieldmapper.prototype.clone = function() { - var obj = new this.constructor(); - - for( var i in this.array ) { - var thing = this.array[i]; - if(thing == null) continue; - - if( thing._isfieldmapper ) { - obj.array[i] = thing.clone(); - } else { - - if(instanceOf(thing, Array)) { - obj.array[i] = new Array(); - - for( var j in thing ) { - - if( thing[j]._isfieldmapper ) - obj.array[i][j] = thing[j].clone(); - else - obj.array[i][j] = thing[j]; - } - } else { - obj.array[i] = thing; - } - } - } - return obj; -} - -function FieldmapperException(message) { - this.message = message; -} - -FieldmapperException.toString = function() { - return "FieldmapperException: " + this.message + "\n"; - -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Class definition for "" - -function (array) { - - if (!instanceOf(this, )) - return new (array); - - this.baseClass.call(this,array); - this.classname = ""; - this._isfieldmapper = true; - this.uber = .baseClass.prototype; -} - -.prototype = new (); -.prototype.constructor = ; -.baseClass = ; -.prototype.cachable = true; -.prototype.fields = []; -.last_real_field = 2; - - -.prototype.db_type = ""; - -.prototype.isnew = function(new_value) { - if(arguments.length == 1) { this.array[0] = new_value; } - return this.array[0]; -} - -.prototype.ischanged = function(new_value) { - if(arguments.length == 1) { this.array[1] = new_value; } - return this.array[1]; -} - -.prototype.isdeleted = function(new_value) { - if(arguments.length == 1) { this.array[2] = new_value; } - return this.array[2]; -} - - - - - - - - - - - - - - - -// Accessor/mutator for .: -.last_real_field++; -.prototype.fields.push(""); -.prototype. = function (new_value) { - if(arguments.length == 1) { this.array[] = new_value; } - - - - - - var val = this.array[]; - - if (!instanceOf(this.array[], )) { - if (this.array[] != null) { - this.array[] = new (val); - } - } - - return this.array[]; -} - - - - - - - - - - - - - - - -// accessor for : -.prototype. = function () { - - var _pos = .last_real_field + ; - - if (!instanceOf(this.array[_pos], Array)) { - this.array[_pos] = []; - - if (this.array[_pos].length == 0) { - /* get the real thing. - * search where .() - * equals this.(); - */ - this.array[_pos] = this.uber.search( - , - "", - this.() - ); - } - - return this.array[_pos]; -} - - - - - - - - diff --git a/OpenSRF/examples/fieldmapper2perl.xsl b/OpenSRF/examples/fieldmapper2perl.xsl deleted file mode 100644 index 4d3a8a5964..0000000000 --- a/OpenSRF/examples/fieldmapper2perl.xsl +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - -package Fieldmapper; -use JSON; -use Data::Dumper; -use base 'OpenSRF::Application'; - -use OpenSRF::Utils::Logger; -my $log = 'OpenSRF::Utils::Logger'; - -sub new { - my $self = shift; - my $value = shift; - if (defined $value) { - if (!ref($value) or ref($value) ne 'ARRAY') { - # go fetch the object by id... - } - } else { - $value = []; - } - return bless $value => $self->class_name; -} - -sub decast { - my $self = shift; - return [ @$self ]; -} - -sub DESTROY {} - -sub class_name { - my $class_name = shift; - return ref($class_name) || $class_name; -} - -sub isnew { return $_[0][0]; } -sub ischanged { return $_[0][1]; } -sub isdeleted { return $_[0][2]; } - - - - -1; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#------------------------------------------------------------------------------- -# Class definition for "" -#------------------------------------------------------------------------------- - -package ; -use base ""; - -{ my @real; - sub real_fields { - push @real, @_ if (@_); - return @real; - } -} - -{ my $last_real; - sub last_real_field : lvalue { - $last_real; - } -} - - -sub cdbi { - return ""; -} - - -sub json_hint { - return ""; -} - - -sub is_virtual { - - - return 1; - - - return 0; - - -} - - - - - - - - - - - - - - - - -# Accessor/mutator for ::: -__PACKAGE__->last_real_field()++; -__PACKAGE__->real_fields(""); -sub { - my $self = shift; - my $new_val = shift; - $self->[] = $new_val if (defined $new_val); - - - - - - - my $val = $self->[]; - - if (defined $self->[]) { - if (!UNIVERSAL::isa($self->[], )) { - $self->[] = ->new($val); - } - } - - - return $self->[]; -} - - -sub clear_ { - my $self = shift; - $self->[] = undef; - return 1; -} - - - - - - - - - - - - - - - - - - -# accessor for ::: -sub { - my $self = shift; - - my $_pos = ->last_real_field + ; - - if (!ref($self->[$_pos]) ne 'ARRAY') { - $self->[$_pos] = []; - - if (@{$self->[$_pos]} == 0) { - # get the real thing. - # search where -> == $self->; - } - - return $self->[$_pos]; -} - - - - - - - - diff --git a/OpenSRF/examples/gen-fieldmapper.xml b/OpenSRF/examples/gen-fieldmapper.xml deleted file mode 100644 index 26950305d5..0000000000 --- a/OpenSRF/examples/gen-fieldmapper.xml +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - - - - - action.survey_response - action.survey_response_id_seq - - - action_survey_response - - - Fieldmapper - Fieldmapper - OpenILS::Storage::CDBI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - action.survey_question - action.survey_question_id_seq - - - action_survey_question - - - Fieldmapper - Fieldmapper - OpenILS::Storage::CDBI - - - - - - - - - - - - - - - - - - - action.survey_answer - action.survey_answer_id_seq - - - action_survey_answer - - - Fieldmapper - Fieldmapper - OpenILS::Storage::CDBI - - - - - - - - - - - - - - - - - - - actor.org_unit - actor.org_unit_id_seq - - - actor_org_unit - - - Fieldmapper - Fieldmapper - OpenILS::Storage::CDBI - - - - - - - - - - action.survey - action.survey_id_seq - - - action_survey - - - Fieldmapper - Fieldmapper - OpenILS::Storage::CDBI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OpenSRF/examples/math_bench.pl b/OpenSRF/examples/math_bench.pl deleted file mode 100755 index c3a504cfc6..0000000000 --- a/OpenSRF/examples/math_bench.pl +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/perl -use strict; use warnings; -use OpenSRF::System; -use Time::HiRes qw/time/; -use OpenSRF::Utils::Logger; -my $log = "OpenSRF::Utils::Logger"; - -# Test script which runs queries agains the opensrf.math service and reports on -# the average round trip time of the requests. - -# how many batches of 4 requests do we send -my $count = $ARGV[0]; -print "usage: $0 \n" and exit unless $count; - -# * connect to the Jabber network -OpenSRF::System->bootstrap_client( config_file => "/openils/conf/bootstrap.conf" ); -$log->set_service('math_bench'); - -# * create a new application session for the opensrf.math service -my $session = OpenSRF::AppSession->create( "opensrf.math" ); - -my @times; # "delta" times for each round trip - -# we're gonna call methods "add", "sub", "mult", and "div" with -# params 1, 2. The hash below maps the method name to the -# expected response value -my %vals = ( add => 3, sub => -1, mult => 2, div => 0.5 ); - -# print the counter grid -for my $x (1..100) { - if( $x % 10 ) { print ".";} - else{ print $x/10; }; -} -print "\n"; - -my $c = 0; - -for my $scale ( 1..$count ) { - for my $mname ( keys %vals ) { # cycle through add, sub, mult, and div - - my $starttime = time(); - - # * Fires the request and gathers the response object, which in this case - # is just a string - my $resp = $session->request( $mname, 1, 2 )->gather(1); - push @times, time() - $starttime; - - - if( "$resp" eq $vals{$mname} ) { - # we got the response we expected - print "+"; - - } elsif($resp) { - # we got some other response - print "\n* BAD Data: $resp\n"; - - } else { - # we got no data - print "Received nothing\n"; - } - - $c++; - - } - - print " [$c] \n" unless $scale % 25; -} - -my $total = 0; - -$total += $_ for (@times); - -$total /= scalar(@times); - -print "\n\n\tAverage Round Trip Time: $total Seconds\n"; - - diff --git a/OpenSRF/examples/math_xul_client/Makefile b/OpenSRF/examples/math_xul_client/Makefile deleted file mode 100644 index 41ac95cfb9..0000000000 --- a/OpenSRF/examples/math_xul_client/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -all: clean client - @echo - -client: - @echo We need the OpenSRF javascript code... - mkdir math/content/OpenSRF/ - cp ../../src/javascript/*.js math/content/OpenSRF/ - @echo We need a log directory... - mkdir math/content/log - touch math/content/log/preserve.directory.when.zipping - @echo We also need a math/content/conf/client_config.xml pointing to a running OpenSRF Math application. - @echo Then we package this into a Mozilla XPI file... - zip -q -r math.xpi install.js math/ - @echo After installing the XPI, use the chrome URL: - @echo chrome://math/content/ - -clean: - @echo Removing the OpenSRF javascript code, the log directory, and math.xpi... - rm -rf math/content/OpenSRF/ math/content/log math.xpi diff --git a/OpenSRF/examples/math_xul_client/install.js b/OpenSRF/examples/math_xul_client/install.js deleted file mode 100644 index 0b10d3d733..0000000000 --- a/OpenSRF/examples/math_xul_client/install.js +++ /dev/null @@ -1,98 +0,0 @@ -// ripped from Evergreen installation file - -/* We'll want to make this more flexible later */ - -install(); - -// ---------------------------------------------------------------------------- -// Performs the install -// ---------------------------------------------------------------------------- -function install() { - - // ---------------------------------------------------------------------------- - var _authors = "PINES"; - var _package = "math"; - var _packg_l = "math"; - var _version = "0.0.1"; - // ---------------------------------------------------------------------------- - - var err; // track the error - - err = initInstall( _package, "/"+_authors+"/"+_package, _version ); - if( err != 0 ) { return warn( "initInstall: " + err );} - - // ---------------------------------------------------------------------------- - // Discovers the path to the install directory - // ---------------------------------------------------------------------------- - install_dir = getFolder("Chrome", _packg_l ); - logComment( "Installing to: " + install_dir ); - - // ---------------------------------------------------------------------------- - // Directory where the 'content' is stored - // ---------------------------------------------------------------------------- - content_dir = getFolder( install_dir, "content" ); - if( err != 0 ) { return warn("getFolder:content_dir: " + err);} - - // ---------------------------------------------------------------------------- - // Directory where the skins are stored - // ---------------------------------------------------------------------------- - skin_dir = getFolder( install_dir, "skin" ); - if( err != 0 ) { return warn("getFolder:skin: " + err);} - - // ---------------------------------------------------------------------------- - // Directory where the local data is stored - // ---------------------------------------------------------------------------- - locale_dir = getFolder( install_dir, "locale" ); - if( err != 0 ) { return warn("getFolder:locale: " + err);} - - // ---------------------------------------------------------------------------- - // Sets the install directory for Evergreen - // ---------------------------------------------------------------------------- - err = setPackageFolder(install_dir); - if( err != 0 ) { return warn("setPackageFolder: " + err);} - - // ---------------------------------------------------------------------------- - // Searches the .xpi file for the directory name stored in _packg_l and - // copies that directory from the .xpi into Mozilla's chrome directory. - // In this case, we are copying over the entire evergreen folder - // ---------------------------------------------------------------------------- - err = addDirectory( _packg_l ) - if( err != 0 ) { return warn("addDirectory: " + err);} - - - // ---------------------------------------------------------------------------- - // Register the content directory - // The final argument is where Mozilla should expect to find the contents.rdf - // file *after* installation for the CONTENT portion of the package - // ---------------------------------------------------------------------------- - err = registerChrome( Install.CONTENT, content_dir ); - if( err != 0 ) { return warn("registerChrome:content " + err );} - - // ---------------------------------------------------------------------------- - // Register the skin directory - // ---------------------------------------------------------------------------- - err = registerChrome( Install.SKIN, skin_dir ); - if( err != 0 ) { return warn("registerChrome:skin " + err );} - - // ---------------------------------------------------------------------------- - // Register the locale directory - // ---------------------------------------------------------------------------- - //err = registerChrome( Install.LOCALE, locale_dir ); - //if( err != 0 ) { return warn("registerChrome:locale " + err );} - - err = registerChrome( Install.LOCALE, getFolder(locale_dir, "en-US") ); - if( err != 0 ) { return warn("registerChrome:locale " + err );} - - // ---------------------------------------------------------------------------- - // Do it. - // ---------------------------------------------------------------------------- - performInstall(); - -} - -function warn( message ) { - alert( message ); - logComment( message ); - return; -} - diff --git a/OpenSRF/examples/math_xul_client/math/content/conf/client_config.xml b/OpenSRF/examples/math_xul_client/math/content/conf/client_config.xml deleted file mode 100644 index 0dc75a9d4c..0000000000 --- a/OpenSRF/examples/math_xul_client/math/content/conf/client_config.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - myhostname - - - 0 - - - 0 - - - - - - - debug.log - transport.log - error.log - - - - - - router@localhost/math - router@localhost/mathdb - router@localhost/storage - - - - - - jabber_connection - - - 15 - math_user - math_user_password - localhost - 5222 - 0 - - - diff --git a/OpenSRF/examples/math_xul_client/math/content/contents.rdf b/OpenSRF/examples/math_xul_client/math/content/contents.rdf deleted file mode 100644 index 7a8fb13cca..0000000000 --- a/OpenSRF/examples/math_xul_client/math/content/contents.rdf +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - diff --git a/OpenSRF/examples/math_xul_client/math/content/math.xul b/OpenSRF/examples/math_xul_client/math/content/math.xul deleted file mode 100644 index 1396a0b581..0000000000 --- a/OpenSRF/examples/math_xul_client/math/content/math.xul +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - -