MinimalComponent
================

This component is an example of a minimal UNO component, in order to extend
the OpenOffice.org functionality.
In general, a component can be devided into two main parts and therefore into
two classes:
- The component as a concrete implementation of the service description: in
  order to provide the functional specification all required interfaces have
  to be implemented. 
- The factory and the service info: The factory instantiates the component on
  demand. It must be an implemetation of the interface
  com.sun.star.lang.XSingleServiceFactory. 
In this example, there are the nested classes "MinimalComponent" and
"MinimalComponent.MinimalComponentImplementation".

The class MinimalComponent should provide two methods which are called by the
Java Loader. One method (__getServiceFactory()) returns a XSingleServiceFactory
for creating the component. Every component should be registered with its
implementation name for the service. Therefore the method
__writeRegistryServiceInfo is responsible for writing the service information
into the registry.

Every component should implement the following interfaces: XInitialization,
XTypeProvider, and XServiceInfo. Furthermore, it must contain the variable
__serviceName, that must be used to get an instance of this service.

You can use this minimal component, to realize your own components.

Compile the java samples
===========================

A GNU make version 1.79.1 or later is required in order to build the examples. GNU make
is available from

http://www.gnu.org,

it can be ftped via 

ftp://ftp.gnu.org/gnu/make


Make sure, the gnu-make-executable and java is included in your PATH variable. Switch
to e.g. the MinimalComponent subdirectory and type make. You will then get help what to do to
build the examples on your platform.


Run the java samples
-------------------------

- Connecting to StarOffice : 

  The Office must be started in advance using the following command line option :
  
	soffice -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager

	or on unix

	soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager"

  The portnumber and the host can be modified if you like.

  Start the java example using the following connection string

  On Windows:
  java -classpath .;<Office path>/program/classes/jurt.jar;<Office path>/program/classes/ridl.jar;<Office path>/program/classes/sandbox.jar;<Office path>/program/classes/unoil.jar;<Office path>/program/classes/juh.jar TestMinimalComponent
  e.g.:
  java -classpath .;d:/office60/program/classes/jurt.jar;d:/office60/program/classes/ridl.jar;d:/office60/program/classes/sandbox.jar;d:/office60/program/classes/unoil.jar;d:/office60/program/classes/juh.jar TestMinimalComponent
  
  On Unix:
  java -classpath <Office path>/program/classes/juh.jar:<Office path>/program/classes/ridl.jar:<Office path>/program/classes/jurt.jar:<Office path>/program/classes/sandbox.jar:<Office path>/program/classes/unoil.jar:. TestMinimalComponent
  e.g.:
  java -classpath /local/user/office60/program/classes/juh.jar:/local/user/office60/program/classes/ridl.jar:/local/user/office60/program/classes/jurt.jar:/local/user/office60/program/classes/sandbox.jar:/local/user/office60/program/classes/unoil.jar:. TestMinimalComponent


- Connecting to a Sun ONE Webtop

  1. The file 'daemons2.jar' and 'portalapi.jar' must be part of the CLASSPATH when executing the example.
     It can be found at <WebtopDir>/program/classes .

  2. Start a portal client.
  
  3. Start a Java sample

     java <classpath> TestMinimalComponent "portal,type=http,host=<portalhost>,port=<port>,service=soffice,user=<username>,password=<passwd>"

     The Port can be found in the file <WebtopDir>/share/etc/configrc
     (value GRIPServicesExternalPlainPort).

     You have to choose the SimplePort as default port on the administration pages
     in the webtop installation (this port defaults to 8090).
     Additionally, you have to modify the login.ini in the client 
     ( ConnectionType=plain ).
