Class FileEnhMethodHandler

java.lang.Object
com.nt.udc.processor.FileEnhancer.FileEnhMethodHandler
All Implemented Interfaces:
IDCMethodHandler, FileEnhMethodHandlerIfc, LookupIfc

public class FileEnhMethodHandler extends Object implements FileEnhMethodHandlerIfc, LookupIfc
  • Constructor Details

    • FileEnhMethodHandler

      public FileEnhMethodHandler()
      Default Constructor.
    • FileEnhMethodHandler

      public FileEnhMethodHandler(Hashtable lt, String subValueSeparator)
      Constructor for the FileEnhMethodHandler. Sets up an NPLFieldProcessor and sets the DCFieldContainer to be a NAR. At the end of the constructor the node is started.
      Parameters:
      lt - the lookup table that will be used for lookup call
      It is expected this will be a Hashtable of Hashtables.
  • Method Details

    • setLookupTable

      public void setLookupTable(Hashtable lt)
      Method for setting the lookup table that will be used by the NPL program.
      Parameters:
      lt - the lookup table that will be used for lookup call
      It is expected this will be a Hashtable of Hashtables.
    • setLookupTable

      public void setLookupTable(String key, Hashtable lt)
      Specified by:
      setLookupTable in interface LookupIfc
    • getLookupTable

      public Hashtable getLookupTable()
      Gets the entire lookup table that is being used in the NPL java-hook lookup call. This table should be a Hashtable of Hashtables
      Returns:
      Returns the Hashtable representing the lookup table.
    • getLookupTable

      public Hashtable getLookupTable(String key)
      Specified by:
      getLookupTable in interface LookupIfc
    • lookup

      public StringField lookup(StringField tableName, StringField key)
      Method intended to be call from NPL as a "java-hook". This is specifically used for the purpose of table lookup. The structure of the object from which this lookup is being done is a Hashtable of Hashtables. Therefore, the call is made with a "tableName" parameter to select the sub-table to use, and then a "key" parameter to extract a specific field from that sub-table. Parameters and return values are all StringField, as NPL only allows java-hooks with DCField sub-classes.
      Specified by:
      lookup in interface FileEnhMethodHandlerIfc
      Parameters:
      tableName - the specific sub-table to look in
      key - the specific element in the sub-table
      Returns:
      Returns the StringField representing the element value.
    • getSubValue

      public StringField getSubValue(StringField lookup, StringField key)
      Specified by:
      getSubValue in interface FileEnhMethodHandlerIfc