View Javadoc

1   /*
2    * LibraryForm.java
3    *
4    * Created on December 12, 2006, 3:52 PM
5    *
6    * @version $Revision$ $Date$
7    */
8   
9   package org.sourceforge.vlibrary.user.forms;
10  
11  import org.apache.struts.action.ActionForm;
12  import org.sourceforge.vlibrary.user.logic.LibraryManager;
13  
14  import org.apache.log4j.Logger;
15  
16  /**
17   *
18   */
19  public abstract class LibraryForm extends ActionForm {
20      // static so it can injected by Spring at loading time,
21      // subsequently all instances will have access to a valid instance of LibraryManagerFacade
22      protected static LibraryManager libraryManager;
23      
24      /** log4j Logger */
25      protected Logger logger = Logger.getLogger(getClassName());
26      
27      /** Creates a new instance of LibraryForm */
28      public LibraryForm() {
29      }
30      
31      public void setLibraryManager( LibraryManager LibraryManager ) {
32          this.libraryManager = LibraryManager;
33          
34          if (logger.isDebugEnabled()) {
35              logger.debug( "Initializing LibraryManager in Form with:" + libraryManager);
36          }
37      }
38      
39      public abstract String getClassName();
40  }