Class DirectoryKeyPropertiesParser

java.lang.Object
com.nt.udc.util.DirectoryKeyPropertiesParser

public class DirectoryKeyPropertiesParser extends Object
  • Constructor Details

    • DirectoryKeyPropertiesParser

      public DirectoryKeyPropertiesParser(String filePath, Logger logger, String osaHomeDir)
  • Method Details

    • getUploadLocation

      public String getUploadLocation(com.nt.udc.admin.NodeInfo nodeInfo) throws NodeChainTestException
      This method returns the location a node reads from
      Throws:
      NodeChainTestException - if uploadDirKey not found
    • getOutputPaths

      public Map<String,String> getOutputPaths(com.nt.udc.admin.NodeInfo nodeInfo) throws NodeChainTestException
      This method returns a map with the output directory paths and their corresponding keys a node writes to. For the node type "OI", the directory keys are fetched from the node context. For all other node types, the directory key is set as output.
      Throws:
      NodeChainTestException - if outputDirKey(s) not found
    • getCompletedFileSubstrs

      public Map.Entry<List<String>,DirectoryKeyPropertiesParser.SubstringType> getCompletedFileSubstrs(com.nt.udc.admin.NodeInfo nodeInfo)
      Gets a list of completed file substrings and their type based on the given nodeInfo. If the node type is OI or configurable non-OI, the method tries to find custom keys. If no custom keys are found, it looks for substring values instead. If no substring values found, it defaults to a COMPLETE substring type which will be considered everytime. If the node type is not "OI" and it is not configurable, it uses a default substring as '.arch'.
      Parameters:
      nodeInfo - The information about the node to get substrings and its type.
      Returns:
      A pair where the first item is a list of substrings and the second item is the substring type.