org.sapia.soto
Class SotoContainer.EnvImpl

java.lang.Object
  extended by org.sapia.soto.SotoContainer.EnvImpl
All Implemented Interfaces:
Env
Enclosing class:
SotoContainer

public static final class SotoContainer.EnvImpl
extends java.lang.Object
implements Env


Method Summary
 void bind(java.lang.String id, java.lang.Object o)
           
 SotoContainer getContainer()
           
 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(java.lang.String uri)
           
 SotoResourceHandlerChain getResourceHandlers()
           
 Settings getSettings()
           
 java.lang.Object include(java.lang.String uri, java.util.Map params)
          Returns the object representation of the given resource, using the Confix API.
 java.lang.Object include(java.lang.String uri, org.sapia.util.text.TemplateContextIF context)
          Returns the object representation of the given resource, using the Confix API.
 org.sapia.resource.Resource includeResource(java.lang.String uri, java.util.Map params)
           
 java.lang.Object lookup(java.lang.Class instanceOf)
           
 java.util.List lookup(ServiceSelector selector, boolean returnMetadata)
           
 java.lang.Object lookup(java.lang.String serviceId)
           
 java.lang.Object resolveRef(java.lang.String id)
           
 org.sapia.resource.Resource resolveResource(java.lang.String uri)
          Resolves the resource corresponding to the given URI.
 java.io.InputStream resolveStream(java.lang.String uri)
          Resolves the resource corresponding to the given URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSettings

public Settings getSettings()
Specified by:
getSettings in interface Env
Returns:
this instance's Settings.
See Also:
SotoContainer.getSettings()

getResourceHandlerFor

public org.sapia.resource.ResourceHandler getResourceHandlerFor(java.lang.String uri)
Specified by:
getResourceHandlerFor in interface Env
See Also:
Env.getResourceHandlerFor(java.lang.String)

lookup

public java.lang.Object lookup(java.lang.String serviceId)
                        throws NotFoundException
Specified by:
lookup in interface Env
Throws:
NotFoundException
See Also:
Env.lookup(java.lang.String)

lookup

public java.lang.Object lookup(java.lang.Class instanceOf)
                        throws NotFoundException
Specified by:
lookup in interface Env
Throws:
NotFoundException
See Also:
Env.lookup(java.lang.Class)

lookup

public java.util.List lookup(ServiceSelector selector,
                             boolean returnMetadata)
Specified by:
lookup in interface Env
See Also:
Env.lookup(org.sapia.soto.ServiceSelector, boolean)

getResourceHandlers

public SotoResourceHandlerChain getResourceHandlers()
Specified by:
getResourceHandlers in interface Env
See Also:
Env.getResourceHandlers()

resolveStream

public java.io.InputStream resolveStream(java.lang.String uri)
                                  throws java.io.IOException
Description copied from interface: Env
Resolves the resource corresponding to the given URI. The path can have a protocol/scheme.

Specified by:
resolveStream in interface Env
Parameters:
uri - a URI.
Returns:
the InputStream corresponding to the given resource path.
Throws:
java.io.IOException
See Also:
Env.resolveStream(java.lang.String)

resolveResource

public org.sapia.resource.Resource resolveResource(java.lang.String uri)
                                            throws java.io.IOException
Description copied from interface: Env
Resolves the resource corresponding to the given URI. The path can have a protocol/scheme.

Specified by:
resolveResource in interface Env
Parameters:
uri - a URI.
Returns:
the Resource corresponding to the given uri.
Throws:
java.io.IOException
See Also:
Env.resolveResource(java.lang.String)

getObjectFactory

public org.sapia.util.xml.confix.ObjectFactoryIF getObjectFactory()
Description copied from interface: Env
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.

Specified by:
getObjectFactory in interface Env
Returns:
an ObjectFactoryIF.
See Also:
Env.getObjectFactory()

bind

public void bind(java.lang.String id,
                 java.lang.Object o)
Specified by:
bind in interface Env
See Also:
SotoContainer.bind(java.lang.String, java.lang.Object)

resolveRef

public java.lang.Object resolveRef(java.lang.String id)
                            throws NotFoundException
Specified by:
resolveRef in interface Env
Throws:
NotFoundException
See Also:
SotoContainer.resolveRef(java.lang.String)

include

public java.lang.Object include(java.lang.String uri,
                                java.util.Map params)
                         throws org.sapia.util.xml.confix.ConfigurationException
Description copied from interface: Env
Returns the object representation of the given resource, using the Confix API.

Specified by:
include in interface Env
Throws:
org.sapia.util.xml.confix.ConfigurationException

include

public java.lang.Object include(java.lang.String uri,
                                org.sapia.util.text.TemplateContextIF context)
                         throws org.sapia.util.xml.confix.ConfigurationException
Description copied from interface: Env
Returns the object representation of the given resource, using the Confix API.

Specified by:
include in interface Env
Throws:
org.sapia.util.xml.confix.ConfigurationException

includeResource

public org.sapia.resource.Resource includeResource(java.lang.String uri,
                                                   java.util.Map params)
                                            throws org.sapia.util.xml.confix.ConfigurationException
Throws:
org.sapia.util.xml.confix.ConfigurationException

getContainer

public SotoContainer getContainer()


Copyright © 2010 Sapia OSS. All Rights Reserved.