head	1.3;
access;
symbols
	REL7_2_8:1.2
	REL7_2_7:1.2
	REL7_2_6:1.2
	REL7_2_5:1.2
	REL7_2_4:1.2
	REL7_2_3:1.2
	REL7_3_STABLE:1.2.0.6
	REL7_2_STABLE:1.2.0.4
	REL7_2:1.2
	REL7_2_RC2:1.2
	REL7_2_RC1:1.2
	REL7_2_BETA5:1.2
	REL7_2_BETA4:1.2
	REL7_2_BETA3:1.2
	REL7_2_BETA2:1.2
	REL7_2_BETA1:1.2
	REL7_1_2:1.2
	REL7_1_STABLE:1.2.0.2
	REL7_1:1.2;
locks; strict;
comment	@# @;


1.3
date	2002.10.21.00.35.40;	author momjian;	state dead;
branches;
next	1.2;

1.2
date	2001.03.05.09.15.35;	author peter;	state Exp;
branches
	1.2.6.1;
next	1.1;

1.1
date	2001.01.18.14.50.14;	author peter;	state Exp;
branches;
next	;

1.2.6.1
date	2002.11.04.21.24.28;	author tgl;	state dead;
branches;
next	;


desc
@@


1.3
log
@Completely remove /contrib/retep, with Peter's approval;  now on Source
Forge.
@
text
@Retep Tools Implementation
--------------------------


The tools are designed to be put into a single jar file, but each one is
executable either individually or part of one single application.

To run the big application, you can either:

  java -jar retepTools.jar

or with the retepTools.jar in the classpath run:

  java uk.org.retep.tools.Main

Windows users: For you you can also double click the retepTools.jar as windows
will automatically run javac for you.

To run the individual tools, you must have the .jar file in your classpath and
then run the relevant Main class.

Tool                          Type        Class
------------------------------------------------------------------------------
pg_hba.conf Editor/repairer   Editor      uk.org.retep.util.hba.Main
Properties Editor             Editor      uk.org.retep.util.proped.Main


Layout of the classes
---------------------

Simply, tools that work on property files (Java properties, resource files,
configuration settings - pg_hba.conf for example) go under uk.org.retep.util in
their own package. Other utility classes (like PropertyIO) go in to the
uk.org.retep.util.misc package except for certain ones where they are related.

ie: TableModels. In swing you have JTable which uses a TableModel to display
(and possibly update) some data. These go under uk.org.retep.util.models where
you will find PropertiesTableModel for example. This one allows a Properties
object to be displayed & updated.

Come core classes like Logger, ExceptionDialog etc go into the main
uk.org.retep.util package.

Directory/Package                   Contents
------------------------------------------------------------------------------
uk.org.retep                        Home of the tools.properties file
uk.org.retep.tools                  The main all-in-one application
uk.org.retep.dtu                    The Data Transform Unit
uk.org.retep.util                   Core utility classes
uk.org.retep.util.hba               pg_hba.conf editor/repairer
uk.org.retep.util.misc              Misc utility classes
uk.org.retep.util.models            Swing table models
uk.org.retep.util.proped            Property Editor
uk.org.retep.util.xml.core          Basic XML Factory
uk.org.retep.util.xml.jdbc          JDBC/XML interface
uk.org.retep.util.xml.parser        Simple SAX parser

Structure of a tool
-------------------

Each tool has at least 2 base classes, and an entry in the tools.properties
file. For this example, I'll show you the Properties Editor:

Base package      uk.org.retep.util.proped
Main tool class   uk.org.retep.util.proped.PropertyEditor
Standalone class  uk.org.retep.util.proped.Main

The main tool class is the entry point used by the main application. Because
they are used in a GUI, this class must extend javax.swing.JComponent and
implement the uk.org.retep.tools.Tool interface. (NB: You will find I always
use JPanel, but JComponent is used here so that any swing class can be used
you are not limited to JPanel.)

The standalone class is a basic static class that implements the main method.
It should extend the uk.org.retep.misc.StandaloneApp class and be written along
the lines of the following example:

      import uk.org.retep.util.StandaloneApp;
      import javax.swing.JComponent;

      public class Main extends StandaloneApp
      {
        public Main(String[] args)
        throws Exception
        {
          super(args);
        }

        public JComponent init()
        throws Exception
        {
          // Your initialisation here. In this case the PropertyEditor
          PropertyEditor panel = new PropertyEditor();

          // do stuff here, ie load a file if supplied

          // return the tool
          return panel;
        }

        public static void main(String[] args)
        throws Exception
        {
          Main main = new Main(args);
          main.pack();
          main.setVisible(true);
        }
      }

you will find a template in the uk.org.retep.util.Main class. Simply copy this
classes source, as it gives you the basic stub. Just add your own implementation
if init() like the one above. Look at the full Main class for the
PropertiesEditor to see how to get at the command line args.

By convention, the standalone class is named Main.

@


1.2
log
@First batch of the tools merged in...
@
text
@@


1.2.6.1
log
@Back-patch recent file removals into REL7_3_STABLE branch.
@
text
@@


1.1
log
@Thu Jan 18 12:24:00 GMT 2001 peter@@retep.org.uk
        - These methods in org.postgresql.jdbc2.ResultSet are now implemented:
            getBigDecimal(int) ie: without a scale (why did this get missed?)
            getBlob(int)
            getCharacterStream(int)
            getConcurrency()
            getDate(int,Calendar)
            getFetchDirection()
            getFetchSize()
            getTime(int,Calendar)
            getTimestamp(int,Calendar)
            getType()
          NB: Where int represents the column name, the associated version
              taking a String were already implemented by calling the int
              version.
        - These methods no longer throw the not implemented but the new noupdate
          error. This is in preparation for the Updateable ResultSet support
          which will overide these methods by extending the existing class to
          implement that functionality, but needed to show something other than
          notimplemented:
            cancelRowUpdates()
            deleteRow()
        - Added new error message into errors.properties "postgresql.noupdate"
          This is used by jdbc2.ResultSet when an update method is called and
          the ResultSet is not updateable. A new method notUpdateable() has been
          added to that class to throw this exception, keeping the binary size
          down.
        - Added new error message into errors.properties "postgresql.psqlnotimp"
          This is used instead of unimplemented when it's a feature in the
          backend that is preventing this method from being implemented.
        - Removed getKeysetSize() as its not part of the ResultSet API

Thu Jan 18 09:46:00 GMT 2001 peter@@retep.org.uk
        - Applied modified patch from Richard Bullington-McGuire
          <rbulling@@microstate.com>. I had to modify it as some of the code
          patched now exists in different classes, and some of it actually
          patched obsolete code.

Wed Jan 17 10:19:00 GMT 2001 peter@@retep.org.uk
        - Updated Implementation to include both ANT & JBuilder
        - Updated README to reflect the changes since 7.0
	- Created jdbc.jpr file which allows JBuilder to be used to edit the
          source. JBuilder _CAN_NOT_ be used to compile. You must use ANT for
          that. It's only to allow JBuilders syntax checking to improve the
          drivers source. Refer to Implementation for more details
@
text
@d1 116
@
