org.compass.core.config.binding
Class MappingBindingSupport

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

public class MappingBindingSupport
extends Object
implements MappingBinding

A basic no op implementation of MappingBinding that allows for classes to extend it and implement only specific features.

Author:
kimchy

Constructor Summary
MappingBindingSupport()
           
 
Method Summary
 boolean addClass(Class clazz)
           
 boolean addDirectory(File dir)
           
 boolean addFile(File file)
           
 boolean addFile(String filePath)
           
 boolean addInputStream(InputStream is, String resourceName)
           
 boolean addJar(File jar)
           
 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

MappingBindingSupport

public MappingBindingSupport()
Method Detail

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

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-2008 The Compass Project.