adding doc
authorgrok <grok>
Sat, 13 Aug 2005 14:32:34 +0000 (14:32 +0000)
committergrok <grok>
Sat, 13 Aug 2005 14:32:34 +0000 (14:32 +0000)
etc/config.properties-dist
source/default.properties
source/mir/bundle/Bundle.java
source/mir/generator/WriterEngine.java
source/mir/producer/reader/ScriptedProducerNode.java
source/mir/util/ExecFunctions.java
source/mircoders/localizer/MirCachingLocalizerDecorator.java

index ea638ab..c3ed9a2 100755 (executable)
@@ -3,6 +3,12 @@
 # by Matthias <mjordan@code-fu.de> 2001-09-12
 # reorganized by <init@nadir.org>  2003-02-12
 #
+# The options shown here are the more frequently used options.  A full
+# list    of   all    default    options   is    available   in    the
+# source/default.properties file. If you  need to change any of those,
+# just  override   the  values  in  *this*  file   (don't  change  the
+# source/default.properties file
+#
 # The Mir software realizes a semi-dynamic web service:
 # The web server that is accessed by readers has pure static
 # pages. These pages are generated by the Mir software that
@@ -69,6 +75,17 @@ Mir.DefaultDateTimeFormat = yyyy-MM-dd HH:mm
 #
 Mir.Admin.FallbackLanguage=en
 
+# warning: advanced feature. Don't change unless you know
+# Localizers provide  a customization framework  that allows different
+# mir sites to  behave differently. Each site can  write it's own bits
+# of  java  code  that   override  default  behavior.   The  localizer
+# framework  provides "hooks" where  admins can  plug in  their custom
+# code.
+#
+# example setup:
+# Mir.Localizer=org.indymedia.de.DeLocalizer
+
+
 #################################
 # admin interface configuration #
 #################################
index e560915..5c15359 100755 (executable)
@@ -1,6 +1,10 @@
 #
 # GENERAL SETUP
 #
+# This is a full list of defaults options. To configure your site
+# do NOT change this file. You can override all of these values in 
+# your etc/config.properties
+#
 
 ### mir/imc information
 Mir.Name=mir.indymedia.org
index 3e46b85..0492375 100755 (executable)
@@ -32,8 +32,13 @@ package mir.bundle;
 import java.util.List;
 
 /**
- * bundles are key/value pairs in a text file, used for config 
- * and internationalization
+ * A Bundle represents a set  key/value pairs stored in a ".properties"
+ * text  file.  Bundles  are used  for  internationalization (language
+ * translations)  and for  configuration files  (config.properties and
+ * source/default.properties). 
+ *
+ * The argument list is used  for formating the returned value (FIXME:
+ * how?)
  */
 public interface Bundle {
   public String getValue(String aKey, List anArguments);
index d20788a..d26b8ff 100755 (executable)
 
 package mir.generator;
 
+/**
+ * <p>A WriterEngine creates  a java PrinterWriter object for writing
+ * formated output to a file.   The openWriter method creates a Writer
+ * given a  filename and an  encoding.  The closeWriter  method closes
+ * the writer.</p>
+ * 
+ * <p>      This      interface      allows     customization  via the
+ * MirGeneratorLocalizer.makeWriterEngine() method. The created writer is 
+ * used for 
+ * specifying where the output of a Generator should go.</p>
+ */
 public interface WriterEngine {
   public Object openWriter(String anIdentifier, String aParameter) throws GeneratorExc, GeneratorFailure;
   public void closeWriter(Object aWriter) throws GeneratorExc, GeneratorFailure;
index 047f27a..aa08052 100755 (executable)
@@ -38,7 +38,15 @@ import mir.producer.ProducerExc;
 import mir.producer.ProducerFailure;
 import mir.producer.ProducerNode;
 import mir.util.ParameterExpander;
-
+/**
+ * <p> A  ScriptedProducerNode is a  ProducerNode which is  defined in
+ * producers.xml file by the &lt;nodedefinition&gt; statement.  </p>
+ *
+ * <p>It  Acts as  a  "function"  (or "macro")  that  can be  "called"
+ * elsewhere in a  producer.  More precisely, it is a  way to define a
+ * new producer  node type inside the producers.xml  file.  (check the
+ * Language node in that file for an example).</p>
+ */
 public class ScriptedProducerNode implements ProducerNode {
   private ScriptedProducerNodeDefinition definition;
   private Map integerParameterValues;
index 9192207..5dc23f4 100755 (executable)
@@ -30,9 +30,7 @@
 package mir.util;
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
-import java.io.OutputStream;
 
 /**
  * Execute system commands. Warning: the current implementation is
@@ -54,8 +52,8 @@ public class ExecFunctions
   /**
    * Executes a full command (including arguments) in a subshell
    * and returns the output of the command in an array of
-   * bytes. Output is redirected into a temporary fil which is then
-   * read into the string
+   * bytes. Output is redirected into a temporary file which is then
+   * read into an array of bytes
    */
   public static byte[] execIntoByteArray(String command)
     throws IOException
index 759a881..14450ba 100755 (executable)
@@ -34,6 +34,11 @@ import mir.entity.adapter.EntityAdapterModel;
 import mir.generator.Generator;
 import mir.generator.WriterEngine;
 
+/**
+ * This was used to prevent localizers from being created
+ * all the time. It might be obsolete.
+ * 
+ */
 public class MirCachingLocalizerDecorator implements MirLocalizer {
   private MirLocalizer localizer;
   private MirProducerLocalizer producerLocalizer;