You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by eg...@apache.org on 2003/07/04 16:25:51 UTC

cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/authoring ParentChildCreatorInterface.java DefaultCreator.java

egli        2003/07/04 07:25:51

  Modified:    src/java/org/apache/lenya/cms/authoring
                        ParentChildCreatorInterface.java
                        DefaultCreator.java
  Log:
  Added complete Javadocs.
  
  Revision  Changes    Path
  1.9       +6 -4      cocoon-lenya/src/java/org/apache/lenya/cms/authoring/ParentChildCreatorInterface.java
  
  Index: ParentChildCreatorInterface.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/authoring/ParentChildCreatorInterface.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ParentChildCreatorInterface.java	30 Jun 2003 11:43:33 -0000	1.8
  +++ ParentChildCreatorInterface.java	4 Jul 2003 14:25:50 -0000	1.9
  @@ -1,5 +1,5 @@
   /*
  -$Id
  +$Id$
   <License>
   
    ============================================================================
  @@ -74,7 +74,7 @@
        * however.
        *
        */
  -    public final short BRANCH_NODE = 1;
  +    short BRANCH_NODE = 1;
   
       /**
        * Constant for a leaf node. Leaf nodes are somewhat related to
  @@ -82,14 +82,14 @@
        * however.
        *
        */
  -    public final short LEAF_NODE = 0;
  +    short LEAF_NODE = 0;
   
       /**
        * DOCUMENT ME!
        *
        * @param doctypeConf DOCUMENT ME!
        */
  -    public void init(Configuration doctypeConf);
  +    void init(Configuration doctypeConf);
   
       /**
        * Return the type of node this creator will create. It can be
  @@ -131,6 +131,8 @@
        * @param childId the document id of the new document
        * @param childType the type of the new document.
        * @param childName the name of the new document.
  +     * @param parameters additional parameters that can be used when creating the child
  +     * 
        * @exception Exception if an error occurs
        */
       void create(File samplesDir, File parentDir, String childId, short childType, String childName,
  
  
  
  1.20      +53 -11    cocoon-lenya/src/java/org/apache/lenya/cms/authoring/DefaultCreator.java
  
  Index: DefaultCreator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/authoring/DefaultCreator.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- DefaultCreator.java	30 Jun 2003 11:43:33 -0000	1.19
  +++ DefaultCreator.java	4 Jul 2003 14:25:51 -0000	1.20
  @@ -1,5 +1,5 @@
   /*
  -$Id
  +$Id$
   <License>
   
    ============================================================================
  @@ -74,20 +74,21 @@
    * @author <a href="mailto:juergen.bigalke@lenya.org">Juergen Bigalke</a>
    */
   public class DefaultCreator implements ParentChildCreatorInterface {
  -    static Category log = Category.getInstance(DefaultCreator.class);
  -    protected final String RESOURCE_NAME = "resource-name";
  -    protected final String RESOURCE_META_NAME = "resource-meta-name";
  -    protected final String SAMPLE_NAME = "sample-name";
  -    protected final String SAMPLE_META_NAME = "sample-meta-name";
  -    protected String resourceName = null;
  -    protected String resourceMetaName = null;
  -    protected String sampleResourceName = null;
  -    protected String sampleMetaName = null;
  +    private static Category log = Category.getInstance(DefaultCreator.class);
  +    public static final String RESOURCE_NAME = "resource-name";
  +    public static final String RESOURCE_META_NAME = "resource-meta-name";
  +    public static final String SAMPLE_NAME = "sample-name";
  +    public static final String SAMPLE_META_NAME = "sample-meta-name";
  +    
  +    private String resourceName = null;
  +    private String resourceMetaName = null;
  +    private String sampleResourceName = null;
  +    private String sampleMetaName = null;
   
       /**
        * DOCUMENT ME!
        *
  -     * @param creatorNode DOCUMENT ME!
  +     * @param conf DOCUMENT ME!
        */
       public void init(Configuration conf) {
           if (conf == null) {
  @@ -163,6 +164,9 @@
         * @param parentDir DOCUMENT ME!
         * @param childId DOCUMENT ME!
         * @param childType DOCUMENT ME!
  +      * @param childName the name of the child
  +      * @param parameters additional parameters that can be considered when 
  +      *  creating the child
         *
         * @throws Exception DOCUMENT ME!
         */
  @@ -216,18 +220,56 @@
           }
       }
   
  +	/**
  +	 * Apply some transformation on the newly created child.
  +	 * 
  +	 * @param doc the xml document
  +	 * @param childId the id of the child
  +	 * @param childType the type of child
  +	 * @param childName the name of the child
  +	 * @param parameters additional parameters that can be used in the transformation
  +	 * 
  +	 * @throws Exception if the transformation fails
  +	 */
       protected void transformXML(Document doc, String childId, short childType, String childName,
           Map parameters) throws Exception {
       }
   
  +	/**
  +	 * Apply some transformation on the meta file of newly created child.
  +	 * 
  +	 * @param doc the xml document
  +	 * @param childId the id of the child
  +	 * @param childType the type of child
  +	 * @param childName the name of the child
  +	 * @param parameters additional parameters that can be used in the transformation
  +	 * 
  +	 * @throws Exception if the transformation fails
  +	 */
       protected void transformMetaXML(Document doc, String childId, short childType,
           String childName, Map parameters) throws Exception {
       }
   
  +	/**
  +	 * Get the file name of the child
  +	 * 
  +	 * @param parentDir the parent directory
  +	 * @param childId the id of the child
  +	 * 
  +	 * @return the file name of the child
  +	 */
       protected String getChildFileName(File parentDir, String childId) {
           return null;
       }
   
  +	/**
  +	 * Get the file name of the meta file
  +	 * 
  +	 * @param parentDir the parent directory
  +	 * @param childId the id of the child
  +	 * 
  +	 * @return the name of the meta file
  +	 */
       protected String getChildMetaFileName(File parentDir, String childId) {
           return null;
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org