Class ESIMapManager

java.lang.Object
com.ptc.windchill.esi.map.ESIMapManager

public final class ESIMapManager extends Object
Finds the instance of ESIMap associated with a file name. Implements the Singleton pattern to insure that only one instance is created in a java virtual machine.

Supported API: true

Extendable: false
  • Method Details

    • instance

      public static final ESIMapManager instance()
      Get the value of the _instance attribute. If it's null, create an instance and store it in the attribute before returning the result.

      Supported API: true
      Returns:
      ESIMapManager
    • getMap

      public final ESIMap getMap(File file) throws ESIMapException
      Returns the ESIMap object identified by the input argument. If the name of the input file exists as a key in maps, this method simply returns the corresponding value. Otherwise, it creates a new ESIMap instance, initializes it with the contents of the input map file, and returns the resulting object, besides creating an entry for the newly created object in maps.

      Supported API: true
      Parameters:
      file - File object that represents the input map file.
      Returns:
      ESIMap The ESIMap object corresponding to the input key, if the key was found in maps; otherwise, a newly created ESIMap object that represents the input map file.
      Throws:
      ESIMapException
    • getMap

      public final ESIMap getMap(String id) throws ESIMapException
      Returns the ESIMap object identified by the input argument. If there is an entry in the maps for the input key, the method returns the corresponding value i.e ESIMap. Othewise, it logs an error message and returns a null. This method works only for ESIMap objects that figure in the ESI response meta information file; for those objects that are represented by map files, use the overloaded version that takes in a File instance instead.

      Supported API: true
      Parameters:
      id - The key for which to return the ESIMap object. This is typically the value of the id attribute defined in the ESI response meta information file for the required ESIMap object.
      Returns:
      ESIMap The ESIMap object corresponding to the input key, if the key was found in maps; a null, otherwise.
      Throws:
      ESIMapException