View Javadoc

1   /*
2    * UML2MMBase module.
3    *
4    * The contents of this file are subject to the Mozilla Public License
5    * Version 1.0 (the "License"); you may not use this file except in
6    * compliance with the License. You may obtain a copy of the License at
7    * http://www.mozilla.org/MPL/
8    *
9    * Software distributed under the License is distributed on an "AS IS"
10   * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
11   * License for the specific language governing rights and limitations
12   * under the License.
13   */
14  
15  package com.finalist.mmbase.modules;
16  
17  /***
18   * The mmbase package interfaces has 3 methods that will be called by the MMbase package handler in the following order:
19   * -init
20   * -process
21   * -destroy
22   *
23   * @author Rudie Ekkelenkamp
24   * @version $Revision: 1.2 $, $Date: 2005/07/12 10:32:00 $
25   */
26  public class DefaultMMBasePackageGenerator implements MMBasePackageGenerator {
27  
28      /***
29       * Initialize the Package generation.
30       * @param config configuration settings.
31       */
32      public void init(MMBasePackageConfiguration config) {
33          System.out.println("Initializing package generator for package: " + config.getPackageName());
34          // Nothing to do.
35      }
36  
37      /***
38       * Do the actuall configuration.
39       * @param config  configuration settings.
40       */
41      public void process(MMBasePackageConfiguration config) {
42          // Has to be implemented.
43          // Probably this will be copying a package to the generated dir.
44          // For now just log that we are processing..
45          System.out.println("Processing package generator for package: " + config.getPackageName());
46      }
47  
48      /***
49       * Destroy resources that were setup during initialization or processing.
50       * @param config configuration settings.
51       */
52      public void destroy(MMBasePackageConfiguration config) {
53          // Nothing to do.
54          System.out.println("Destroying package generator for package: " + config.getPackageName());
55      }
56  }