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

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

public class PolicyCollection
extends MetaCollection

A policy collection is a meta layer that will block file additions if they conflict with the supplied policy


Constructor Summary
PolicyCollection(FileCollection base, Policy policy)
           
PolicyCollection(FileCollection base, Policy policy, FileTypeSet types)
           
 
Method Summary
 boolean add(VFile vfile)
          Adds a new file to the collection, which may or may not replace the existing file.
 
Methods inherited from class uk.ac.ed.inf.ogsaconfig.garm.collections.MetaCollection
bases, contents, contents, destroy, remove, retrieve, root
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyCollection

public PolicyCollection(FileCollection base,
                        Policy policy)
Parameters:
base - is the collection below this in the layering
policy - is the policy to apply

PolicyCollection

public PolicyCollection(FileCollection base,
                        Policy policy,
                        FileTypeSet types)
Parameters:
base - is the collection below this in the layering
policy - is the policy to apply
types - is the set of FileTypes the policy applies to
Method Detail

add

public boolean add(VFile vfile)
Description copied from interface: FileCollection
Adds a new file to the collection, which may or may not replace the existing file. Returns true if the operation was successful, false otherwise.

Specified by:
add in interface FileCollection
Overrides:
add in class MetaCollection