Interface NPLProgramIfc

All Known Implementing Classes:
BaseNPLProgram

public interface NPLProgramIfc
  • Field Details

  • Method Details

    • processData

      DCFieldContainer[] processData(DCFieldContainer input, Class out_type) throws NPLException
      Process the given input fields with this NPL program. If this NPL program is creating any output records, the specified output type is used.
      Parameters:
      input - input fields to process
      out_type - type of any output records created by this NPL program (must implement DCFieldContainer interface)
      Throws:
      NPLException - if error while processing data
    • getLogger

      LoggerIfc getLogger()
    • setLogger

      void setLogger(LoggerIfc logger)
    • getDataReceiver

      DataReceiverIfc getDataReceiver()
    • setDataReceiver

      void setDataReceiver(DataReceiverIfc ireceiver)
    • setMethodHandler

      void setMethodHandler(IDCMethodHandler mh) throws NPLException
      Set the method handler object of the NPL program corresponding to the method handler imported by the NPL program.
      Parameters:
      mh - object that implements sub-interface of IDCMethodHandler
      Throws:
      NPLException - if object passed to this method does not implement interface imported in NPL file
    • getMethodHandler

      IDCMethodHandler getMethodHandler()
      Returns the method handler imported by the NPL program and set using setMethodHandler(IDCMethodHandler mh).
    • getMethodHandler

      IDCMethodHandler getMethodHandler(String name)
      Returns the method handler with the specified name. Use IMPORTED_JAVA_HANDLER_NAME to retrieve the imported method handler. For method handlers declared using the JavaHook declaration, use the name given to identify the method handler in the JavaHook declaration.
      Parameters:
      name - name of method handler to get
      Returns:
      method handler with given name or null if no method handler with given name
    • getInputFields

      ArrayList getInputFields()
      Gets a list of the input fields defined in the input records.
      Returns:
      List of input fields. The elements in this ArrayList are actually other ArrayLists, one for each input record. The elements of these ArrayLists are FieldDescriptor objects, one for each field in the input record.
    • getOutputFields

      ArrayList getOutputFields()
      Gets a list of the output fields defined in the output records.
      Returns:
      List of output fields. The elements in this ArrayList are actually other ArrayLists, one for each output record. The elements of these ArrayLists are FieldDescriptor objects, one for each field in the output record.
    • getExposedFields

      ArrayList getExposedFields(String reason)
      Gets a list of the fields defined in the expose clause for the reason provided.
      Parameters:
      reason - Reason the fields are being exposed.
      Returns:
      List of exposed fields. The elements in the ArrayList are FieldDescriptor objects, one for each field in the expose clause matching the reason provided.
    • getConfigValue

      String getConfigValue(String key)
      Gets the value of a configuration attribute.
      Parameters:
      key - Configuration attribute to get the value of.
      Returns:
      Value of the attribute. Returns null if the attribute does not exist.