org.edg.security.authorization.map
Class GridMapFileHandler

java.lang.Object
  |
  +--org.edg.security.authorization.map.GridMapFileHandler
All Implemented Interfaces:
FileMap.FileTypeHandler

public class GridMapFileHandler
extends java.lang.Object
implements FileMap.FileTypeHandler

A FileTypeHandler that understands gridmap files

Author:
Olle Mulmo
See Also:
FileMap, FileMap.FileTypeHandler

Field Summary
protected static org.apache.log4j.Logger logger
           
protected static char theComment
           
 
Constructor Summary
GridMapFileHandler()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger

theComment

protected static final char theComment
See Also:
Constant Field Values
Constructor Detail

GridMapFileHandler

public GridMapFileHandler()
Method Detail

load

public java.util.Map load(java.io.File file)
Description copied from interface: FileMap.FileTypeHandler
Parses the file and turns it into a Map.

Implementor's notes:

Specified by:
load in interface FileMap.FileTypeHandler
Parameters:
file - the file to load from
Returns:
Map the newly created map, or an empty map if error
See Also:
FileMap.FileTypeHandler.load(File)

save

public void save(java.io.File file,
                 java.util.Map map)
Description copied from interface: FileMap.FileTypeHandler
Saves the map to the given file. If the file exists, it will be overwritten.

Specified by:
save in interface FileMap.FileTypeHandler
Parameters:
file - the file to save to
Returns:
map the map to save
See Also:
FileMap.FileTypeHandler.save(File, Map)

append

public void append(java.io.File file,
                   java.lang.Object key,
                   java.lang.Object value)
Description copied from interface: FileMap.FileTypeHandler
Appends a given (key,value) pair to the given file.

Specified by:
append in interface FileMap.FileTypeHandler
Parameters:
file - the file to append to
key - the new key
value - the new value
See Also:
FileMap.FileTypeHandler.append(File, Object, Object)