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

ContentOrigin

public abstract class ContentOrigin extends Object
Represents the origin of some content to be served to Java Web Start.
author
tjquinn

Fields Summary
protected static final String
lineSep
protected Map
pathToContent
Map from URL path to the content for each file this app or app client supports.
private boolean
adhocPathRegistered
boolean indicating whether adhoc path is registered with container
Constructors Summary
public ContentOrigin()
Creates a new instance of the Entry class to record an app client or J2EE application.

param
the application (descriptor) for the app client or J2EE app


                                 
      
        pathToContent = new HashMap<String,Content>();
    
Methods Summary
protected DynamicContentaddDynamicContent(java.lang.String path, java.lang.String template, java.util.Properties tokenValues, java.lang.String mimeType)

        return addDynamicContent(path, template, tokenValues, mimeType, false /* requiresElevatedPrivs */);
    
protected DynamicContentaddDynamicContent(java.lang.String path, java.lang.String template, java.util.Properties tokenValues, java.lang.String mimeType, boolean requiresElevatedPrivs)

        // merge - future
        String docText = Util.replaceTokens(template, tokenValues);
        String contentKey = getContentKeyPrefix() + path;
        DynamicContent result = new DynamicContent(this, contentKey, path, docText, mimeType, requiresElevatedPrivs);
        pathToContent.put(result.getContentKey(), result);
        return result;
    
protected DynamicContentaddDynamicContent(DynamicContent content)

        pathToContent.put(content.getContentKey(), content);
        return content;
    
protected StaticContentaddStaticContent(java.lang.String path, java.net.URI installRootURI, java.io.File file)

        String contentKey = getContentKeyPrefix() + path;
        StaticContent result = new StaticContent(this, contentKey, path, file, installRootURI, false /* isMainJar */);
        return addStaticContent(result);
    
protected StaticContentaddStaticContent(StaticContent content)

        pathToContent.put(content.getContentKey(), content);
        return content;
    
voidadhocPathRegistered()
Mark the origin as registered with webcontainer.

        adhocPathRegistered=true;
    
protected ContentgetContent(java.lang.String contentKey)

        return pathToContent.get(contentKey);
    
protected abstract java.lang.StringgetContentKeyPrefix()
Returns the prefix for content keys for content from this origin.

return
the content key prefix for this origin

public java.util.CollectiongetContents()
Returns a collection of this origin's contents.

param
map from content keys to contents

        return pathToContent.values();
    
booleanisAdhocPathRegistered()
Return a boolean indicating whether this is registerd with the webcontainer.

        return adhocPathRegistered;
    
public abstract booleanisEnabled()
Returns whether the administrator has enabled this content origin (either a Java EE application or a stand-alone app client) for Java Web Start access.

return
boolean indicating whether the module's app clients are enabled for JWS access

public java.lang.StringtoLongString()
Returns a longer display of information about this origin

return
detailed summary of this instance

        return toString() + pathToContent.toString();