com.sage.swt.client.ui.builder
Interface ExternalScriptCache

All Known Implementing Classes:
GlobalCache

public interface ExternalScriptCache

Interface for a cache of installed external scripts, which are keyed by their associated URL key (conceptually, the download URL).


Method Summary
 void addExternalScript(URLKey scriptURLKey, java.lang.String scriptContent)
          Adds an external script's content and its associated URL key to the cache.
 boolean containsExternalScript(URLKey scriptURLKey)
          Indicates whether or not the cache contains an external script with the specified URL key.
 java.lang.String getExternalScript(URLKey scriptURLKey)
          Gets the external script content associated with the specified URL key, or null if there is no such entry in the cache.
 

Method Detail

containsExternalScript

boolean containsExternalScript(URLKey scriptURLKey)
Indicates whether or not the cache contains an external script with the specified URL key.

Parameters:
scriptURLKey - The external script's URL key.
Returns:
Whether or not the cache contains an external script with the specified URL key.

getExternalScript

java.lang.String getExternalScript(URLKey scriptURLKey)
Gets the external script content associated with the specified URL key, or null if there is no such entry in the cache.

Parameters:
scriptURLKey - The external script's URL key.
Returns:
The external script content associated with the specified URL key, or null if there is no such entry in the cache.

addExternalScript

void addExternalScript(URLKey scriptURLKey,
                       java.lang.String scriptContent)
Adds an external script's content and its associated URL key to the cache. Duplicates and nulls are ignored (however, empty strings are not).

Parameters:
scriptURLKey - The external script's URL key.
scriptContent - The external script's content.


Copyright © 2011 Sage Software, Inc. All rights reserved.