Squeak Class Documentation category index | class index  
 
ResourceCollector
  category: System-Support
  superclass: Object
  subclasses:

The ResourceCollector collects resources that are encountered during project loading or publishing. It merely decouples the places where resources are held from the core object enumeration so that resources can be stored independently from what is enumerated for publishing.

instance methods
  accessing
  baseUrl
baseUrl:
localDirectory
localDirectory:
locatorMap
locators
locatorsDo:
noteResource:replacing:
objectForDataStream:fromForm:
removeLocator:
replaceAll
resourceDirectory
resourceFileNames
stubMap

  initialize
  forgetObsolete
initialize
initializeFrom:

  objects from disk
  objectForDataStream:

  resource writing
  writeResourceForm:fromLocator:
writeResourceForm:locator:

class methods
  accessing
  current
current:

  instance creation
  new

instance methods
  accessing top  
 

baseUrl


 

baseUrl:


 

localDirectory


 

localDirectory:


 

locatorMap

allow outsiders to store in it. For files that are not resources that do want to live in the resource directory locally and on the server. (.t files for example)


 

locators


 

locatorsDo:


 

noteResource:replacing:

Remember the fact that we need to load aResource which will replace anObject.


 

objectForDataStream:fromForm:

Return a replacement for aForm to be stored instead


 

removeLocator:


 

replaceAll

Replace all resources by their originals. Done after the resource have been collected to get back to the original state.


 

resourceDirectory


 

resourceFileNames

Return a list of all the resource files created


 

stubMap


  initialize top  
 

forgetObsolete

Forget obsolete locators, e.g., those that haven't been referenced and not been stored on a file.


 

initialize


 

initializeFrom:

Initialize the receiver from aResourceManager.


  objects from disk top  
 

objectForDataStream:

This should never happen; when projects get written they must be decoupled from the resource collector. If you get the error message below something is seriously broken.


  resource writing top  
 

writeResourceForm:fromLocator:

The given form has been externalized before. If it was reasonably compressed, use the bits of the original data - this allows us to recycle GIF, JPEG, PNG etc. data without using the internal compression (which is in most cases inferior). If necessary the data will be retrieved from its URL location. This retrieval is done only if the resouce comes from either
* the local disk (in which case the file has never been published)
* the browser cache (in which case we don't cache the resource locally)
In any other case we will *not* attempt to retrieve it, because doing so can cause the system to connect to the network which is probably not what we want. It should be a rare case anyways; could only happen if one clears the squeak cache selectively.


 

writeResourceForm:locator:

Store the given form on a file. Return an array with the name and the size of the file


class methods
  accessing top  
 

current


 

current:


  instance creation top  
 

new

Answer a new instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.