Clover coverage report - AdWT - 1.0.0
Coverage timestamp: sam. déc. 27 2003 15:14:10 CET
file stats: LOC: 118   Methods: 8
NCLOC: 49   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ConsoleServiceProvider.java - 0% 0% 0%
coverage
 1   
 /*
 2   
  * EJTools, the Enterprise Java Tools
 3   
  *
 4   
  * Distributable under LGPL license.
 5   
  * See terms of license at www.gnu.org.
 6   
  */
 7   
 package org.ejtools.adwt.service;
 8   
 
 9   
 import java.beans.beancontext.BeanContextServices;
 10   
 import java.util.Iterator;
 11   
 import java.util.Vector;
 12   
 
 13   
 import org.apache.log4j.Logger;
 14   
 import org.ejtools.adwt.action.Command;
 15   
 import org.ejtools.adwt.action.view.ShowConsoleAction;
 16   
 import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider;
 17   
 
 18   
 /**
 19   
  * Description of the Class
 20   
  *
 21   
  * @author    Laurent Etiemble
 22   
  * @version   $Revision: 1.5 $
 23   
  * @todo      Javadoc to complete
 24   
  * @todo      I18N to complete
 25   
  */
 26   
 public class ConsoleServiceProvider extends CustomBeanContextServiceProvider
 27   
 {
 28   
    /** Description of the Field */
 29   
    protected ConsoleService service = null;
 30   
    /** Description of the Field */
 31   
    private static Logger logger = Logger.getLogger(ConsoleServiceProvider.class);
 32   
 
 33   
 
 34   
    /** Constructor for the AboutServiceProvider object */
 35  0
    public ConsoleServiceProvider()
 36   
    {
 37  0
       super();
 38   
    }
 39   
 
 40   
 
 41   
    /**
 42   
     * Gets the currentServiceSelectors attribute of the ApplicationServiceProvider object
 43   
     *
 44   
     * @param bcs           Description of the Parameter
 45   
     * @param serviceClass  Description of the Parameter
 46   
     * @return              The currentServiceSelectors value
 47   
     */
 48  0
    public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass)
 49   
    {
 50  0
       return (new Vector().iterator());
 51   
    }
 52   
 
 53   
 
 54   
    /**
 55   
     * Gets the service attribute of the ApplicationServiceProvider object
 56   
     *
 57   
     * @param bcs              Description of the Parameter
 58   
     * @param requestor        Description of the Parameter
 59   
     * @param serviceClass     Description of the Parameter
 60   
     * @param serviceSelector  Description of the Parameter
 61   
     * @return                 The service value
 62   
     */
 63  0
    public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector)
 64   
    {
 65  0
       return this.service;
 66   
    }
 67   
 
 68   
 
 69   
    /**
 70   
     * Returns the service.
 71   
     *
 72   
     * @return   ConsoleService
 73   
     */
 74  0
    public ConsoleService getService()
 75   
    {
 76  0
       return service;
 77   
    }
 78   
 
 79   
 
 80   
    /**
 81   
     * Description of the Method
 82   
     *
 83   
     * @param bcs        Description of the Parameter
 84   
     * @param requestor  Description of the Parameter
 85   
     * @param service    Description of the Parameter
 86   
     */
 87  0
    public void releaseService(BeanContextServices bcs, Object requestor, Object service) { }
 88   
 
 89   
 
 90   
    /**
 91   
     * @return   The serviceClass value
 92   
     */
 93  0
    protected Class[] getServiceClass()
 94   
    {
 95  0
       return new Class[]{ConsoleService.class};
 96   
    }
 97   
 
 98   
 
 99   
    /** */
 100  0
    protected void initializeBeanContextResources()
 101   
    {
 102  0
       super.initializeBeanContextResources();
 103  0
       this.service = new ConsoleServiceInternalFrame(this.getBeanContext());
 104   
 
 105  0
       this.add(new ShowConsoleAction(
 106   
          new Command()
 107   
          {
 108  0
             public void execute()
 109   
             {
 110  0
                ConsoleServiceProvider.this.service.show();
 111   
             }
 112   
          }
 113   
          ));
 114   
 
 115  0
       logger.debug("Console Service installed");
 116   
    }
 117   
 }
 118