org.apache.tapestry.asset
Class PrivateAsset

java.lang.Object
  extended byorg.apache.tapestry.asset.AbstractAsset
      extended byorg.apache.tapestry.asset.PrivateAsset
All Implemented Interfaces:
IAsset, org.apache.hivemind.Locatable

public class PrivateAsset
extends AbstractAsset

An implementation of IAssetfor localizable assets within the JVM's classpath.

The localization code here is largely cut-and-paste from ContextAsset.

Author:
Howard Ship

Constructor Summary
PrivateAsset(org.apache.hivemind.util.ClasspathResource resourceLocation, IEngineService assetService, org.apache.hivemind.Location location)
           
PrivateAsset(org.apache.hivemind.util.ClasspathResource resourceLocation, org.apache.hivemind.Location location)
          Deprecated. To be removed (someday). Use PrivateAsset(ClasspathResource, IEngineService, Location) instead.
 
Method Summary
 java.lang.String buildURL()
          Gets the localized version of the resource.
 java.io.InputStream getResourceAsStream()
          Accesses the localized version of the resource (if possible) and returns it as an input stream.
 
Methods inherited from class org.apache.tapestry.asset.AbstractAsset
getLocation, getResourceLocation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrivateAsset

public PrivateAsset(org.apache.hivemind.util.ClasspathResource resourceLocation,
                    org.apache.hivemind.Location location)
Deprecated. To be removed (someday). Use PrivateAsset(ClasspathResource, IEngineService, Location) instead.


PrivateAsset

public PrivateAsset(org.apache.hivemind.util.ClasspathResource resourceLocation,
                    IEngineService assetService,
                    org.apache.hivemind.Location location)
Method Detail

buildURL

public java.lang.String buildURL()
Gets the localized version of the resource. Build the URL for the resource. If possible, the application's AssetExternalizerImplis located, to copy the resource to a directory visible to the web server.


getResourceAsStream

public java.io.InputStream getResourceAsStream()
Description copied from interface: IAsset
Accesses the localized version of the resource (if possible) and returns it as an input stream. A version of the resource localized to the current pageis returned.