org.compass.core.config
Class CompassMappingBinding

java.lang.Object
  extended by org.compass.core.config.CompassMappingBinding
All Implemented Interfaces:
MappingBinding

public class CompassMappingBinding
extends Object
implements MappingBinding

Compass MappingBinding is a mapping binding that holds a list of MappingBindings (ordered) and when trying to add mappings, it will iterate through them and try and add it to each one.

Author:
kimchy

Constructor Summary
CompassMappingBinding()
           
 
Method Summary
 boolean addClass(Class clazz)
           
 boolean addContractMaping(ContractMapping contractMapping)
           
 boolean addDirectory(File dir)
           
 boolean addFile(File file)
           
 boolean addFile(String filePath)
           
 boolean addInputStream(InputStream is, String resourceName)
           
 boolean addJar(File jar)
           
 void addMappingBinding(MappingBinding mappingBinding)
           
 boolean addMappingResolver(InputStreamMappingResolver mappingResolver)
           
 boolean addPackage(String packageName)
           
 boolean addResource(String path)
           
 boolean addResource(String path, ClassLoader classLoader)
           
 boolean addResourceMapping(ResourceMapping resourceMapping)
           
 boolean addURL(URL url)
           
 String[] getSuffixes()
           
 void setUpBinding(InternalCompassMapping mapping, CompassMetaData metaData, CompassSettings settings)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompassMappingBinding

public CompassMappingBinding()
Method Detail

addMappingBinding

public void addMappingBinding(MappingBinding mappingBinding)

setUpBinding

public void setUpBinding(InternalCompassMapping mapping,
                         CompassMetaData metaData,
                         CompassSettings settings)
Specified by:
setUpBinding in interface MappingBinding

addResourceMapping

public boolean addResourceMapping(ResourceMapping resourceMapping)
                           throws ConfigurationException,
                                  MappingException
Specified by:
addResourceMapping in interface MappingBinding
Throws:
ConfigurationException
MappingException

addContractMaping

public boolean addContractMaping(ContractMapping contractMapping)
                          throws ConfigurationException,
                                 MappingException
Specified by:
addContractMaping in interface MappingBinding
Throws:
ConfigurationException
MappingException

addResource

public boolean addResource(String path)
                    throws ConfigurationException,
                           MappingException
Specified by:
addResource in interface MappingBinding
Throws:
ConfigurationException
MappingException

addResource

public boolean addResource(String path,
                           ClassLoader classLoader)
                    throws ConfigurationException,
                           MappingException
Specified by:
addResource in interface MappingBinding
Throws:
ConfigurationException
MappingException

addURL

public boolean addURL(URL url)
               throws ConfigurationException,
                      MappingException
Specified by:
addURL in interface MappingBinding
Throws:
ConfigurationException
MappingException

addDirectory

public boolean addDirectory(File dir)
                     throws ConfigurationException,
                            MappingException
Specified by:
addDirectory in interface MappingBinding
Throws:
ConfigurationException
MappingException

addJar

public boolean addJar(File jar)
               throws ConfigurationException,
                      MappingException
Specified by:
addJar in interface MappingBinding
Throws:
ConfigurationException
MappingException

addFile

public boolean addFile(String filePath)
                throws ConfigurationException,
                       MappingException
Specified by:
addFile in interface MappingBinding
Throws:
ConfigurationException
MappingException

addFile

public boolean addFile(File file)
                throws ConfigurationException,
                       MappingException
Specified by:
addFile in interface MappingBinding
Throws:
ConfigurationException
MappingException

addPackage

public boolean addPackage(String packageName)
                   throws ConfigurationException,
                          MappingException
Specified by:
addPackage in interface MappingBinding
Throws:
ConfigurationException
MappingException

addClass

public boolean addClass(Class clazz)
                 throws ConfigurationException,
                        MappingException
Specified by:
addClass in interface MappingBinding
Throws:
ConfigurationException
MappingException

addMappingResolver

public boolean addMappingResolver(InputStreamMappingResolver mappingResolver)
                           throws ConfigurationException,
                                  MappingException
Specified by:
addMappingResolver in interface MappingBinding
Throws:
ConfigurationException
MappingException

addInputStream

public boolean addInputStream(InputStream is,
                              String resourceName)
                       throws ConfigurationException,
                              MappingException
Specified by:
addInputStream in interface MappingBinding
Throws:
ConfigurationException
MappingException

getSuffixes

public String[] getSuffixes()
Specified by:
getSuffixes in interface MappingBinding


Copyright (c) 2004-2009 The Compass Project.