FileDocCategorySizeDatePackage
Content.javaAPI DocGlassfish v2 API3662Fri May 04 22:34:12 BST 2007com.sun.enterprise.appclient.jws

Content

public abstract class Content extends Object
Abstract superclass of all types of content.
author
tjquinn

Fields Summary
protected final String
lineSep
private String
path
The path to the content as specified in URLs. This is the "virtual" path.
protected String
contentKey
The key by which this content can be looked up in the content map.
private ContentOrigin
origin
The origin that owns this content.
Constructors Summary
public Content(ContentOrigin origin, String contentKey, String path)
Creates a new instance of Content


           
           
        this.origin = origin;
        this.contentKey = contentKey;
        this.path = path;
    
Methods Summary
public java.lang.StringgetContentKey()
Returns the content key for this content.

Prefixing a slash makes it easier to compare this to the pathInfo from an incoming HTTP request that is seeking content.

        return contentKey;
    
public ContentOrigingetOrigin()
Returns the content origin which owns this content.

return
ContentOrigin for the owning origin

        return origin;
    
public java.lang.StringgetPath()
Returns the virtual path within the content's subcategory to the content.

        return path;
    
public java.lang.StringtoString()
Returns a string representation of the content.

Even though Content is abstract, subclasses use super.toString().

        return getClass().getName() + ": content key=" + getContentKey() + ", path=" + getPath();