org.sapia.soto
Interface Env

All Known Implementing Classes:
ServiceEnv, SotoContainer.EnvImpl

public interface Env

An instance of this interface provides an indirect hook into the container.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software . All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Method Summary
 void bind(String id, Object o)
           
 org.sapia.util.xml.confix.ObjectFactoryIF getObjectFactory()
          Returns the object factory that is used to create objects from XML configuration files.
 org.sapia.resource.ResourceHandler getResourceHandlerFor(String protocol)
           
 SotoResourceHandlerChain getResourceHandlers()
           
 Settings getSettings()
           
 Object include(String uri, Map params)
          Returns the object representation of the given resource, using the Confix API.
 Object include(String uri, org.sapia.util.text.TemplateContextIF params)
          Returns the object representation of the given resource, using the Confix API.
 Object lookup(Class instanceOf)
           
 List lookup(ServiceSelector selector, boolean returnMetadata)
           
 Object lookup(String serviceId)
           
 Object resolveRef(String id)
           
 org.sapia.resource.Resource resolveResource(String uri)
          Resolves the resource corresponding to the given URI.
 InputStream resolveStream(String uri)
          Resolves the resource corresponding to the given URI.
 

Method Detail

lookup

Object lookup(String serviceId)
              throws NotFoundException
Throws:
NotFoundException
See Also:
SotoContainer.lookup(String)

lookup

Object lookup(Class instanceOf)
              throws NotFoundException
Throws:
NotFoundException
See Also:
SotoContainer.lookup(Class)

lookup

List lookup(ServiceSelector selector,
            boolean returnMetadata)
See Also:
SotoContainer.lookup(ServiceSelector, boolean)

getResourceHandlers

SotoResourceHandlerChain getResourceHandlers()
See Also:
SotoContainer.getResourceHandlers()

getResourceHandlerFor

org.sapia.resource.ResourceHandler getResourceHandlerFor(String protocol)
See Also:
SotoContainer.getResourceHandlerFor(String)

resolveStream

InputStream resolveStream(String uri)
                          throws IOException
Resolves the resource corresponding to the given URI. The path can have a protocol/scheme.

Parameters:
uri - a URI.
Returns:
the InputStream corresponding to the given resource path.
Throws:
IOException

resolveResource

org.sapia.resource.Resource resolveResource(String uri)
                                            throws IOException
Resolves the resource corresponding to the given URI. The path can have a protocol/scheme.

Parameters:
uri - a URI.
Returns:
the Resource corresponding to the given uri.
Throws:
IOException

getObjectFactory

org.sapia.util.xml.confix.ObjectFactoryIF getObjectFactory()
Returns the object factory that is used to create objects from XML configuration files. The returned factory can be used by client applications that wish to process standalone configuration files with the Confix API.

Returns:
an ObjectFactoryIF.

include

Object include(String uri,
               Map params)
               throws org.sapia.util.xml.confix.ConfigurationException
Returns the object representation of the given resource, using the Confix API.

Throws:
org.sapia.util.xml.confix.ConfigurationException

include

Object include(String uri,
               org.sapia.util.text.TemplateContextIF params)
               throws org.sapia.util.xml.confix.ConfigurationException
Returns the object representation of the given resource, using the Confix API.

Throws:
org.sapia.util.xml.confix.ConfigurationException

bind

void bind(String id,
          Object o)
See Also:
SotoContainer.bind(java.lang.String, java.lang.Object)

resolveRef

Object resolveRef(String id)
                  throws NotFoundException
Throws:
NotFoundException
See Also:
SotoContainer.resolveRef(java.lang.String)

getSettings

Settings getSettings()
Returns:
this instance's Settings.


Copyright © 2002-2007 Sapia Open Community, Inc. All Rights Reserved.