org.compass.core.config.binding
Class AbstractInputStreamMappingBinding

java.lang.Object
  extended by org.compass.core.config.binding.AbstractInputStreamMappingBinding
All Implemented Interfaces:
MappingBinding
Direct Known Subclasses:
AbstractClassMetaDataMappingBinding, AbstractXmlMappingBinding

public abstract class AbstractInputStreamMappingBinding
extends Object
implements MappingBinding

Author:
kimchy

Field Summary
protected  org.apache.commons.logging.Log log
           
protected  CompassMapping mapping
           
protected  CompassMetaData metaData
           
protected  CompassSettings settings
           
 
Constructor Summary
AbstractInputStreamMappingBinding()
           
 
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 addResoruceMapping(ResourceMapping resourceMapping)
           
 boolean addResource(String path)
           
 boolean addResource(String path, ClassLoader classLoader)
           
 boolean addURL(URL url)
           
protected abstract  boolean doAddInputStream(InputStream is, String resourceName)
           
 void setUpBinding(CompassMapping mapping, CompassMetaData metaData, CompassSettings settings)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.compass.core.config.binding.MappingBinding
getSuffixes
 

Field Detail

log

protected final org.apache.commons.logging.Log log

mapping

protected CompassMapping mapping

metaData

protected CompassMetaData metaData

settings

protected CompassSettings settings
Constructor Detail

AbstractInputStreamMappingBinding

public AbstractInputStreamMappingBinding()
Method Detail

setUpBinding

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

addResoruceMapping

public boolean addResoruceMapping(ResourceMapping resourceMapping)
                           throws ConfigurationException,
                                  MappingException
Specified by:
addResoruceMapping 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

doAddInputStream

protected abstract boolean doAddInputStream(InputStream is,
                                            String resourceName)
                                     throws ConfigurationException,
                                            MappingException
Throws:
ConfigurationException
MappingException


Copyright (c) 2004-2008 The Compass Project.