edu.isi.pegasus.planner.transfer.mapper

## Interface OutputMapper

All Known Implementing Classes:
  AbstractFileFactoryBasedMapper, Fixed, Flat, Hashed, Replica

    public interface OutputMapper

The interface that defines how to map the output files to a stage out site.

Author:
  vahi

### Field Summary

Fields
`static java.lang.String` `VERSION` The version of the API of the Output Mapper

### Method Summary

All Methods Instance Methods Abstract Methods
`java.lang.String` `description()` Returns a short description of the mapper.
`void` `initialize(PegasusBag bag, ADag workflow)` Initializes the mappers.
`java.lang.String` `map(java.lang.String lfn, java.lang.String site, FileServerType.OPERATION operation)` Maps a LFN to a location on the filsystem of a site and returns a single externally accessible URL corresponding to that location.
`java.lang.String` `map(java.lang.String lfn, java.lang.String site, FileServerType.OPERATION operation, boolean existing)` Maps a LFN to a location on the filsystem of a site and returns a single externally accessible URL corresponding to that location.
`java.util.List<java.lang.String>` `mapAll(java.lang.String lfn, java.lang.String site, FileServerType.OPERATION operation)` Maps a LFN to a location on the filsystem of a site and returns all the possible equivalent externally accessible URL corresponding to that location.

### Field Detail

#### VERSION

    static final java.lang.String VERSION

The version of the API of the Output Mapper

See Also:
  Constant Field Values

### Method Detail

#### initialize

    void initialize(PegasusBag bag,
                    ADag workflow)
             throws MapperException

Initializes the mappers.

Parameters:
  `bag` - the bag of objects that is useful for initialization.
  `workflow` - the workflow refined so far.
Throws:
  `MapperException` - if unable to construct URL for any reason

#### map

    java.lang.String map(java.lang.String lfn,
                         java.lang.String site,
                         FileServerType.OPERATION operation)
                  throws MapperException

Maps a LFN to a location on the filsystem of a site and returns a single externally accessible URL corresponding to that location.

Parameters:
  `lfn` - the lfn
  `site` - the output site
  `operation` - whether we want a GET or a PUT URL
Returns:
  the URL to file that was mapped
Throws:
  `MapperException` - if unable to construct URL for any reason

#### map

    java.lang.String map(java.lang.String lfn,
                         java.lang.String site,
                         FileServerType.OPERATION operation,
                         boolean existing)
                  throws MapperException

Maps a LFN to a location on the filsystem of a site and returns a single externally accessible URL corresponding to that location.

Parameters:
  `lfn` - the lfn
  `site` - the output site
  `operation` - whether we want a GET or a PUT URL
  `existing` - indicates whether to create a new location/placement for a file, or rely on existing placement on the site.
Returns:
  externally accessible URL to the mapped file.
Throws:
  `MapperException` - if unable to construct URL for any reason

#### mapAll

    java.util.List<java.lang.String> mapAll(java.lang.String lfn,
                                            java.lang.String site,
                                            FileServerType.OPERATION operation)
                                     throws MapperException

Maps a LFN to a location on the filsystem of a site and returns all the possible equivalent externally accessible URL corresponding to that location. For example, if a file on the filesystem is accessible via multiple file servers it should return externally accessible URL's from all the File Servers on the site.

Parameters:
  `lfn` - the lfn
  `site` - the output site
  `operation` - whether we want a GET or a PUT URL
Returns:
  List<String> of externally accessible URLs to the mapped file.
Throws:
  `MapperException` - if unable to construct URL for any reason

#### description

    java.lang.String description()

Returns a short description of the mapper.

Returns: