<!--
* 
*
*  ProLinga-Repository
*
*  Copyright (C) 2002-2008 Xobas Software.
*  All rights reserved.
*  
*  This file is part of ProLinga-Repository.
*
*  ProLinga-Repository is free software: you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  ProLinga-Repository is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with ProLinga-Repository.  If not, see <http://www.gnu.org/licenses/>.
*
*  More information is available at the following addresses:
*
*  Website     : http://www.prolinga.org
*
*  Email       : prolinga-list@prolinga.org
*
*
-->
<refentry id="prolinga-repository-prolingarepclient">
  <refmeta>
    <refentrytitle>prolingarepclient</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>prolingarepclient</refname>
    <refpurpose>command line Repository network/SOAP client tool</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>prolingarepclient</command>
        <arg choice='opt'>
	  <arg choice='plain'><option>--config</option></arg>
          <arg choice='plain'><option><replaceable>config_file_name.xml</replaceable></option></arg>
        </arg>
	<arg choice='plain'><option>--in</option></arg>
        <arg choice='plain'><option><replaceable>input_RC_file_name.xml</replaceable></option></arg>
	<arg choice='plain'><option>--out</option></arg>
        <arg choice='plain'><option><replaceable>output_RC_file_name.xml</replaceable></option></arg>
  </cmdsynopsis>
    <cmdsynopsis>
      <command>prolingarepclient</command>
      <arg choice='plain'><option>--version</option></arg>
  </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="prolingarepclient_introduction">
    <title>Introduction</title>
    <para>
      The prolingarepclient program parses the input Repository Command XML file and
      sends this as a request to the Repository Web Service. The response of
      this request is placed in the output XML file as specified as the 2nd argument.
      prolingarepclient will get the information as hostname and TCP portnumber of the
      Web Service from the configuration file etc/prolingarepcfg.xml.
    </para>
  </refsect1>
  <refsect1 id="prolingarepclient_options">
    <title>Options</title>
    <variablelist>
      <varlistentry>
	<term><option>config_file_name.xml</option></term>
	<listitem>
	  <simpara>
	    The name of the XML file containing the configuration. If no file is
            specified, the default will be used.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>input_RC_filename.xml</option></term>
	<listitem>
	  <simpara>
	    The name of the XML file containing a Repository Command.
	  </simpara>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><option>output_RC_filename.xml</option></term>
	<listitem>
	  <simpara>
	    The name of the XML file containing the result of a Repository Command.
	  </simpara>
	</listitem>
      </varlistentry>

    </variablelist>
  </refsect1>
</refentry>
<refentry id="prolinga-repository-prolingarepcreate">
  <refmeta>
    <refentrytitle>prolingarepcreate</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>prolingarepcreate</refname>
    <refpurpose>command line Repository creation tool</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>prolingarepcreate</command>
        <arg choice='opt'>
	  <arg choice='plain'><option>--config</option></arg>
          <arg choice='plain'><option><replaceable>config_file_name.xml</replaceable></option></arg>
        </arg>
	<arg choice='plain'><option><replaceable>repository_name</replaceable></option></arg>
  </cmdsynopsis>
    <cmdsynopsis>
      <command>prolingarepcreate</command>
      <arg choice='plain'><option>--version</option></arg>
  </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="prolingarepcreate_introduction">
    <title>Introduction</title>
    <para>
      The prolingarepcreate program creates and initializes a new empty Repository.
      The physical file name of the Repository will be that of the argument used and
      the directory will be that as defined as <replaceable>SystemPath</replaceable>
      in the configuration file etc/prolingarepcfg.xml. If a Repository with the same
      name already exists in that directory, creation will be ignored so the current
      Repository will NOT be deleted or reset.
    </para>
  </refsect1>
  <refsect1 id="prolingarepcreate_options">
    <title>Options</title>
    <variablelist>
      <varlistentry>
	<term><option>config_file_name.xml</option></term>
	<listitem>
	  <simpara>
	    The name of the XML file containing the configuration. If no file is
            specified, the default will be used.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>repository_name</option></term>
	<listitem>
	  <simpara>
	    The physical file name of the repository to be created.
	  </simpara>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
</refentry>
<refentry id="prolinga-repository-prolingarepd">
  <refmeta>
    <refentrytitle>prolingarepd</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>prolingarepd</refname>
    <refpurpose>Repository Web Service daemon</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>prolingarepd</command>
  </cmdsynopsis>
  <cmdsynopsis>
      <command>prolingarepd</command>
      <arg choice='plain'><option>--version</option></arg>
  </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="prolingarepd-introduction">
    <title>Introduction</title>
    <para>
      The prolingarepd program can be called from the command line without any arguments.
      The program will then initialize and run as a daemon in memory waiting for Repository
      Command requests to arrive. Since the process
      is a fork, the prompt will return. Programs like
      <link linkend="prolinga-repository-prolingarepclient">prolingarepclient</link> can
      now be used to send requests to this Web Service. prolingarepd will get the information 
      as hostname and TCP portnumber where the service needs to bind to 
      from the configuration file etc/prolingarepcfg.xml.</para>

      <para>Before running the prolingarepd for the first time, a Repository needs to be present.
      A Repository can be created using
      <link linkend="prolinga-repository-prolingarepcreate">prolingarepcreate</link>. 
      After running for the first time
      files starting with "__" will be created in the Repository database directory. You may
      need chown/chgrp on these files to allow
      <link linkend="prolinga-repository-prolingarepexec">prolingarepexec</link> 
      to access the Repository as a
      different user than the user starting up the Web Service (= most likely root).</para>

      <para>An example automatic Repository startup script for Linux is available as 
      file <parameter>prolingarepd.init</parameter>. This file can be copied and renamed to
      <parameter>/etc/rc.d/init.d/prolingarepd</parameter> and initialized using /sbin/chkconfig.
      Make sure all paths are correct in this file.
      The Web Service can then be started as <parameter>/etc/rc.d/init.d/prolingarepd
      start</parameter>. To stop the 
      argument <parameter>stop</parameter> can be used.
      You need to have root access for this. The binary rpm installation will perform
      all these steps automatically.</para>

  </refsect1>
  <refsect1 id="prolingarepd_options">
    <title>Options</title>
    <variablelist>
      <varlistentry>
	<term><option></option></term>
	<listitem>
	  <simpara>
	  </simpara>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
</refentry>
<refentry id="prolinga-repository-prolingarepexec">
  <refmeta>
    <refentrytitle>prolingarepexec</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>prolingarepexec</refname>
    <refpurpose>command line Repository access tool</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>prolingarepexec</command>
        <arg choice='opt'>
	  <arg choice='plain'><option>--config</option></arg>
          <arg choice='plain'><option><replaceable>config_file_name.xml</replaceable></option></arg>
        </arg>
	<arg choice='plain'><option>--in</option></arg>
        <arg choice='plain'><option><replaceable>input_RC_file_name.xml</replaceable></option></arg>
	<arg choice='plain'><option>--out</option></arg>
        <arg choice='plain'><option><replaceable>output_RC_file_name.xml</replaceable></option></arg>
  </cmdsynopsis>
    <cmdsynopsis>
      <command>prolingarepexec</command>
      <arg choice='plain'><option>--version</option></arg>
  </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="prolingarepexec_introduction">
    <title>Introduction</title>
    <para>
      The prolingarepclient program parses the input Repository Command XML file and
      presents this as a request to the Repository engine. The response of
      this request is placed in the output XML file as specified as the 2nd argument.
      prolingarepexec will get the information as Repository name and directory
      from the configuration file etc/prolingarepcfg.xml.
    </para>
  </refsect1>
  <refsect1 id="prolingarepexec_options">
    <title>Options</title>
    <variablelist>
      <varlistentry>
	<term><option>config_file_name.xml</option></term>
	<listitem>
	  <simpara>
	    The name of the XML file containing the configuration. If no file is
            specified, the default will be used.
	  </simpara>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><option>input_RC_filename.xml</option></term>
	<listitem>
	  <simpara>
	    The name of the XML file containing a Repository Command.
	  </simpara>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><option>output_RC_filename.xml</option></term>
	<listitem>
	  <simpara>
	    The name of the XML file containing the result of a Repository Command.
	  </simpara>
	</listitem>
      </varlistentry>

    </variablelist>
  </refsect1>
</refentry>

<refentry id="prolinga-repository-configuration_file">
  <refmeta>
    <refentrytitle>Configuration File</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>
                                                                                                                                             
  <refnamediv>
    <refname>Configuration File</refname>
    <refpurpose>File containing settings for the Repository</refpurpose>
  </refnamediv>

  <refsect1 id="prolinga-repository-conf_file_introduction">
    <title>Introduction</title>
    <para>
      ProLinga-Repository comes with a configuration file where various variable settings
      can be entered. Variables like the name of the Language Definition file and 
      the name of the host where the Repository Web Service is running for instance.
      Default installation of ProLinga-Repository will put the default configuration file 
      <parameter>prolingarepcfg.xml</parameter> in the etc directory.</para>

      <para>A default configuration file looks like this:</para>

<programlisting><![CDATA[
<?xml version="1.0" encoding="utf-8" ?>
                                                                                                                                             
<!-- ProLinga Configuration File -->
<!-- Copyright (C) 2002-2008 The ProLinga Team. -->
<!-- All Rights Reserved. -->
                                                                                                                                             
<ProLinga>
        <Configuration>
                <Service Name="Repository">
                        <!-- Settings for prolingarepclient. -->
                        <Client>
                                <ClientHost>localhost</ClientHost>
                                <ClientPort>8001</ClientPort>
                                <ClientCompressionLevel>6</ClientCompressionLevel>
                        </Client>
                                                                                                                                             
                        <!-- Settings for prolingarepd. -->
                        <!-- Path/Log Settings for prolingarepexec, prolingarepcreate and prolingareparchive. -->
                        <Server>
                                <ServiceId>ProLinga-Repository on localhost</ServiceId>
                                <ServerHost>localhost</ServerHost>
                                <ServerPort>8001</ServerPort>
                                <SystemPath>/usr/local/var/prolinga/system</SystemPath>
                                <NumberOfThreads>3</NumberOfThreads>
                                <LogFile>/tmp/prolingarep.log</LogFile>
                                <LogLevel>5</LogLevel>
                                <ServerCompressionLevel>6</ServerCompressionLevel>
                        </Server>
                </Service>
        </Configuration>
</ProLinga>
]]></programlisting>

      <para>
        There is a main section for the client program and for the local/stand alone
        programs. The setup of this configuration file is such that it can be combined with
        configuration files from other ProLinga projects.
      </para>

  </refsect1>

  <refsect1 id="prolinga-repository-client_configuration_options">
    <title>Client Options</title>
    <para/>
    <variablelist>
      <varlistentry>
	<term><option>ClientHost</option></term>
	<listitem>
	  <simpara>
	    The name or IP number of the host where to connect to, to present
            a Repository Command.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>ClientPort</option></term>
	<listitem>
	  <simpara>
	    The TCP port of the host where to connect to, to present
            a Repository Command.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>ClientCompressionLevel</option></term>
	<listitem>
	  <simpara>
	    Level of compression to be used on the Repository Command XML
            document before it is send off over the network to the 
            Repository Web Service. 0=No Compression, 9=Best Compression. 
	  </simpara>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1 id="prolinga-repository-server_configuration_options">
    <title>Server Options</title>
    <para/>
    <variablelist>
      <varlistentry>
	<term><option>ServerHost</option></term>
	<listitem>
	  <simpara>
	    The name or IP number of the host where to bind to when
            starting <parameter>prolingarepd</parameter> as a Web Service.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>ServerPort</option></term>
	<listitem>
	  <simpara>
	    The TCP port of the host where to bind to when starting
            <parameter>prolingarepd</parameter> as a Web Service.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>SystemPath</option></term>
	<listitem>
	  <simpara>
	    The path containing the physical XML database files.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>NumberOfThreads</option></term>
	<listitem>
	  <simpara>
            Number of threads when starting <parameter>prolingarepd</parameter>
            as a Web Service. This means that up to <parameter>NumberOfThreads</parameter>
            requests can be served simultanously, before they are queued.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>LogFile</option></term>
	<listitem>
	  <simpara>
            Name of the file where logging and debug info will be written to.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>LogLevel</option></term>
	<listitem>
	  <simpara>
            The level of logging. 0=No Logging, 2= +Messages/Errors, 3= +Soap request/response info.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>ServerCompressionLevel</option></term>
	<listitem>
	  <simpara>
	    Level of compression to be used on the Repository Command XML
            document before it is returned over the network to the 
            Repository caller/client. 0=No Compression, 9=Best Compression. 
	  </simpara>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
</refentry>

