org.edg.security.authorization.map
Interface FileMap.FileTypeHandler

All Known Implementing Classes:
FileTableHandler, GridMapFileHandler, XmlFileHandler
Enclosing interface:
FileMap

public static interface FileMap.FileTypeHandler

Inner class that handles different file types


Method Summary
 void append(java.io.File file, java.lang.Object key, java.lang.Object value)
          Appends a given (key,value) pair to the given file.
 java.util.Map load(java.io.File file)
          Parses the file and turns it into a Map.
 void save(java.io.File file, java.util.Map map)
          Saves the map to the given file.
 

Method Detail

load

public java.util.Map load(java.io.File file)
Parses the file and turns it into a Map.

Implementor's notes:

Parameters:
file - the file to load from
Returns:
Map the newly created map, or an empty map if error

save

public void save(java.io.File file,
                 java.util.Map map)
Saves the map to the given file. If the file exists, it will be overwritten.

Parameters:
file - the file to save to
Returns:
map the map to save

append

public void append(java.io.File file,
                   java.lang.Object key,
                   java.lang.Object value)
Appends a given (key,value) pair to the given file.

Parameters:
file - the file to append to
key - the new key
value - the new value