Clover coverage report - Code Coverage for tapestry release 3.1-alpha-1
Coverage timestamp: Mon Feb 21 2005 09:16:14 EST
file stats: LOC: 193   Methods: 0
NCLOC: 35   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
ILibrarySpecification.java - - - -
coverage
 1   
 // Copyright 2004, 2005 The Apache Software Foundation
 2   
 //
 3   
 // Licensed under the Apache License, Version 2.0 (the "License");
 4   
 // you may not use this file except in compliance with the License.
 5   
 // You may obtain a copy of the License at
 6   
 //
 7   
 //     http://www.apache.org/licenses/LICENSE-2.0
 8   
 //
 9   
 // Unless required by applicable law or agreed to in writing, software
 10   
 // distributed under the License is distributed on an "AS IS" BASIS,
 11   
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12   
 // See the License for the specific language governing permissions and
 13   
 // limitations under the License.
 14   
 
 15   
 package org.apache.tapestry.spec;
 16   
 
 17   
 import java.util.List;
 18   
 import java.util.Map;
 19   
 
 20   
 import org.apache.hivemind.ClassResolver;
 21   
 import org.apache.hivemind.LocationHolder;
 22   
 import org.apache.hivemind.Resource;
 23   
 import org.apache.tapestry.util.IPropertyHolder;
 24   
 
 25   
 /**
 26   
  * Interface for the Specification for a library.
 27   
  * {@link org.apache.tapestry.spec.ApplicationSpecification}is a specialized kind of library.
 28   
  * 
 29   
  * @author Geoffrey Longman
 30   
  * @since 2.2
 31   
  */
 32   
 
 33   
 public interface ILibrarySpecification extends IPropertyHolder, LocationHolder
 34   
 {
 35   
 
 36   
     /**
 37   
      * Returns the specification path (within the classpath) for an embedded library, or null if no
 38   
      * such library has been defined.
 39   
      */
 40   
 
 41   
     public String getLibrarySpecificationPath(String id);
 42   
 
 43   
     /**
 44   
      * Sets the specification path for an embedded library.
 45   
      * 
 46   
      * @throws IllegalArgumentException
 47   
      *             if a library with the given id already exists
 48   
      */
 49   
 
 50   
     public void setLibrarySpecificationPath(String id, String path);
 51   
 
 52   
     /**
 53   
      * Returns a sorted list of library ids (or the empty list, but not null).
 54   
      */
 55   
 
 56   
     public List getLibraryIds();
 57   
 
 58   
     public String getPageSpecificationPath(String name);
 59   
 
 60   
     public void setPageSpecificationPath(String name, String path);
 61   
 
 62   
     /**
 63   
      * Returns a sorted list of page names explicitly defined by this library, or an empty list (but
 64   
      * not null).
 65   
      */
 66   
 
 67   
     public List getPageNames();
 68   
 
 69   
     public void setComponentSpecificationPath(String type, String path);
 70   
 
 71   
     public String getComponentSpecificationPath(String type);
 72   
 
 73   
     /**
 74   
      * Returns the simple types of all components defined in this library. Returns a list of strings
 75   
      * in sorted order, or an empty list (but not null).
 76   
      * 
 77   
      * @since 3.0
 78   
      */
 79   
 
 80   
     public List getComponentTypes();
 81   
 
 82   
     /**
 83   
      * @throws UnsupportedOperationException always
 84   
      * @deprecated to be removed in release 3.2
 85   
      */
 86   
     
 87   
     public String getServiceClassName(String name);
 88   
 
 89   
     /**
 90   
      * Returns a sorted list of service names (or an empty list, but not null).
 91   
      * 
 92   
      * @returns an empty list (as of release 3.1)
 93   
      * @deprecated to be removed in release 3.2
 94   
      */
 95   
 
 96   
     public List getServiceNames();
 97   
 
 98   
     /**
 99   
      * @deprecated To be removed in release 3.2.
 100   
      * @throws UnsupportedOperationException always
 101   
      */
 102   
     public void setServiceClassName(String name, String className);
 103   
 
 104   
     /**
 105   
      * Returns the documentation for this library..
 106   
      */
 107   
 
 108   
     public String getDescription();
 109   
 
 110   
     /**
 111   
      * Sets the documentation for this library.
 112   
      */
 113   
 
 114   
     public void setDescription(String description);
 115   
 
 116   
     /**
 117   
      * Returns a Map of extensions; key is extension name, value is
 118   
      * {@link org.apache.tapestry.spec.IExtensionSpecification}. May return null. The returned Map
 119   
      * is immutable.
 120   
      */
 121   
 
 122   
     public Map getExtensionSpecifications();
 123   
 
 124   
     /**
 125   
      * Adds another extension specification.
 126   
      */
 127   
 
 128   
     public void addExtensionSpecification(String name, IExtensionSpecification extension);
 129   
 
 130   
     /**
 131   
      * Returns a sorted List of the names of all extensions. May return the empty list, but won't
 132   
      * return null.
 133   
      */
 134   
 
 135   
     public List getExtensionNames();
 136   
 
 137   
     /**
 138   
      * Returns the named IExtensionSpecification, or null if it doesn't exist.
 139   
      */
 140   
 
 141   
     public IExtensionSpecification getExtensionSpecification(String name);
 142   
 
 143   
     /**
 144   
      * Returns an instantiated extension. Extensions are created as needed and cached for later use.
 145   
      * 
 146   
      * @throws IllegalArgumentException
 147   
      *             if no extension specification exists for the given name.
 148   
      */
 149   
 
 150   
     public Object getExtension(String name);
 151   
 
 152   
     /**
 153   
      * Returns an instantiated extension, performing a check to ensure that the extension is a
 154   
      * subtype of the given class (or extends the given interface).
 155   
      * 
 156   
      * @throws IllegalArgumentException
 157   
      *             if no extension specification exists for the given name, or if the extension
 158   
      *             fails the type check.
 159   
      * @since 3.0
 160   
      */
 161   
 
 162   
     public Object getExtension(String name, Class typeConstraint);
 163   
 
 164   
     /**
 165   
      * Returns true if the named extension exists (or can be instantiated), returns false if the
 166   
      * named extension has no specification.
 167   
      */
 168   
 
 169   
     public boolean checkExtension(String name);
 170   
 
 171   
     /**
 172   
      * Invoked after the entire specification has been constructed to instantiate any extensions
 173   
      * marked immediate.
 174   
      */
 175   
 
 176   
     public void instantiateImmediateExtensions();
 177   
 
 178   
     public String getPublicId();
 179   
 
 180   
     public void setPublicId(String value);
 181   
 
 182   
     /**
 183   
      * Returns the location from which the specification was read.
 184   
      * 
 185   
      * @since 3.0
 186   
      */
 187   
 
 188   
     public Resource getSpecificationLocation();
 189   
 
 190   
     /** @since 3.0 * */
 191   
 
 192   
     public void setSpecificationLocation(Resource specificationLocation);
 193   
 }