Coverage Report - net.sf.statcvs.output.UrlCssHandler
 
Classes in this File Line Coverage Branch Coverage Complexity
UrlCssHandler
0%
0/7
N/A
1
 
 1  
 /*
 2  
     StatCvs - CVS statistics generation 
 3  
     Copyright (C) 2002  Lukasz Pekacki <lukasz@pekacki.de>
 4  
     http://statcvs.sf.net/
 5  
     
 6  
     This library is free software; you can redistribute it and/or
 7  
     modify it under the terms of the GNU Lesser General Public
 8  
     License as published by the Free Software Foundation; either
 9  
     version 2.1 of the License, or (at your option) any later version.
 10  
 
 11  
     This library is distributed in the hope that it will be useful,
 12  
     but WITHOUT ANY WARRANTY; without even the implied warranty of
 13  
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 14  
     Lesser General Public License for more details.
 15  
 
 16  
     You should have received a copy of the GNU Lesser General Public
 17  
     License along with this library; if not, write to the Free Software
 18  
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 19  
     
 20  
         $RCSfile: UrlCssHandler.java,v $
 21  
         $Date: 2008/04/02 11:22:15 $ 
 22  
 */
 23  
 package net.sf.statcvs.output;
 24  
 
 25  
 import java.io.IOException;
 26  
 import java.net.URL;
 27  
 
 28  
 /**
 29  
  * CSS handler for a CSS file specified by a HTTP URL.
 30  
  * 
 31  
  * @author Richard Cyganiak
 32  
  */
 33  
 public class UrlCssHandler implements CssHandler {
 34  
 
 35  
     private final URL url;
 36  
 
 37  
     /**
 38  
      * Creates a new UrlCssHandler for a CSS file located at a given URL.
 39  
      * @param url the url to the CSS file
 40  
      */
 41  0
     public UrlCssHandler(final URL url) {
 42  0
         this.url = url;
 43  0
     }
 44  
 
 45  
     /**
 46  
      * Simply return the URL
 47  
      * @see net.sf.statcvs.output.CssHandler#getLink()
 48  
      */
 49  
     public String getLink() {
 50  0
         return url.toString();
 51  
     }
 52  
 
 53  
     /**
 54  
      * We could check here if there is a real CSS file at the URL, but
 55  
      * this would require net access, so we just do nothing.
 56  
      * @see net.sf.statcvs.output.CssHandler#checkForMissingResources()
 57  
      */
 58  
     public void checkForMissingResources() throws ConfigurationException {
 59  
         // do nothing
 60  0
     }
 61  
 
 62  
     /**
 63  
      * We don't create any output files. We could copy the CSS file from
 64  
      * the URL to the output dir, but this would require net access, so
 65  
      * we just do nothing.
 66  
      * @see net.sf.statcvs.output.CssHandler#createOutputFiles()
 67  
      */
 68  
     public void createOutputFiles() throws IOException {
 69  
         // do nothing
 70  0
     }
 71  
 
 72  
     /**
 73  
      * toString
 74  
      * @return string
 75  
      */
 76  
     public String toString() {
 77  0
         return "remote CSS file (" + url + ")";
 78  
     }
 79  
 }