uk.ac.ed.inf.ogsaconfig.garm.collections
Class LayoutCollection

java.lang.Object
  |
  +--uk.ac.ed.inf.ogsaconfig.garm.collections.ConcreteCollection
        |
        +--uk.ac.ed.inf.ogsaconfig.garm.collections.LayoutCollection
All Implemented Interfaces:
FileCollection

public class LayoutCollection
extends ConcreteCollection

A layout collection classifies an underlying raw (untyped) collection according to its file layout. It then supplies this typed collection.


Constructor Summary
LayoutCollection(FileCollection base, FileLayout layout, PersistenceMechanism store)
           
 
Method Summary
 void destroy()
          Informs the collection of an impending shutdown, and instructs it to save all necessary state.
 VFile performAdd(VFile vfile)
          performAdd is the interface subclasses should use to perform any logic they need to do when a file is added to the collection.
 VFile performRemove(VFile vfile)
          performRemove is the interface subclasses should use to perform any logic they need when a file is removed from the collection.
 
Methods inherited from class uk.ac.ed.inf.ogsaconfig.garm.collections.ConcreteCollection
add, bases, contents, contents, includeAll, includeFile, remove, retrieve, root
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutCollection

public LayoutCollection(FileCollection base,
                        FileLayout layout,
                        PersistenceMechanism store)
Parameters:
base - is the untyped collection to build on
layout - is the layout to apply to that collection
store - is the persistence mechanism to use for metadata
Method Detail

destroy

public void destroy()
Description copied from interface: FileCollection
Informs the collection of an impending shutdown, and instructs it to save all necessary state. This is guaranteed to be called before the collection is destroyed.

Specified by:
destroy in interface FileCollection
Overrides:
destroy in class ConcreteCollection

performAdd

public VFile performAdd(VFile vfile)
Description copied from class: ConcreteCollection
performAdd is the interface subclasses should use to perform any logic they need to do when a file is added to the collection.

Specified by:
performAdd in class ConcreteCollection
Parameters:
vfile - is the file that is being added
Returns:
is the new file that was actually added, or null

performRemove

public VFile performRemove(VFile vfile)
Description copied from class: ConcreteCollection
performRemove is the interface subclasses should use to perform any logic they need when a file is removed from the collection.

Specified by:
performRemove in class ConcreteCollection
Parameters:
vfile - is the file that is being added
Returns:
is the file that was actually removed, or null