Class CdbTxtFiles

java.lang.Object
org.eso.ias.cdb.structuredtext.CdbTxtFiles
All Implemented Interfaces:
CdbFiles

public class CdbTxtFiles extends Object implements CdbFiles
  • Field Details

    • fileExtension

      public final String fileExtension
      The extension of file names
    • filesType

      public final TextFileType filesType
      The types of the files in the CDB
    • confFileExtension

      public static final String confFileExtension
      The extension of configuration files of the clients
      See Also:
    • iasFileName

      public final String iasFileName
      The name of the file containing all the templates
    • templatesFileName

      public final String templatesFileName
      The name of the file containing all the templates
    • iasiosFileName

      public final String iasiosFileName
      The name of the file containing all the IASIOs
    • transferFunsFileName

      public final String transferFunsFileName
      The name of the file containing all the transfer functions
  • Constructor Details

    • CdbTxtFiles

      public CdbTxtFiles(String parentFolder, TextFileType fType) throws IOException
      Constructor
      Parameters:
      parentFolder - The stringified path of the parent folder of the CDB
      fType - The type of the text files
      Throws:
      IOException - If the passed folder i snot valid
    • CdbTxtFiles

      public CdbTxtFiles(Path parentFolder, TextFileType fType) throws IOException
      Constructor
      Parameters:
      parentFolder - The path of the parent folder of the CDB
      fType - The type of the text files
      Throws:
      IOException - If the passed folder is not valid
    • CdbTxtFiles

      public CdbTxtFiles(File parentFolder, TextFileType fType) throws IOException
      Constructor
      Parameters:
      parentFolder - The file pointing to the parent folder of the CDB
      fType - The type of the text files
      Throws:
      IOException - If the passed folder is not valid
  • Method Details

    • getCdbFileType

      public TextFileType getCdbFileType()
      Specified by:
      getCdbFileType in interface CdbFiles
      Returns:
      The type of files in the CDB
    • getIasFilePath

      public Path getIasFilePath() throws IOException
      Specified by:
      getIasFilePath in interface CdbFiles
      Returns:
      The file to store ias configuration
      Throws:
      IOException - In case of IO error getting the path
      See Also:
    • getSuperivisorFilePath

      public Path getSuperivisorFilePath(String supervisorID) throws IOException
      Specified by:
      getSuperivisorFilePath in interface CdbFiles
      Parameters:
      supervisorID - The ID of the supervisor
      Returns:
      The path for the configuration of the supervisor with the passed ID
      Throws:
      IOException - In case of IO error getting the path
    • getDasuFilePath

      public Path getDasuFilePath(String dasuID) throws IOException
      Specified by:
      getDasuFilePath in interface CdbFiles
      Parameters:
      dasuID - The ID of the DASU
      Returns:
      The path for the configuration of the DASU with the passed ID
      Throws:
      IOException - In case of IO error getting the path
    • getAsceFilePath

      public Path getAsceFilePath(String asceID) throws IOException
      Specified by:
      getAsceFilePath in interface CdbFiles
      Parameters:
      asceID - The ID of the ASCE
      Returns:
      The path for the configuration of the ASCE with the passed ID
      Throws:
      IOException - In case of IO error getting the path
    • getIasioFilePath

      public Path getIasioFilePath(String iasioID) throws IOException
      Specified by:
      getIasioFilePath in interface CdbFiles
      Parameters:
      iasioID - The ID of the IASIO
      Returns:
      The path for the configuration of the IASIO with the passed ID
      Throws:
      IOException - In case of IO error getting the path
    • getTFFilePath

      public Path getTFFilePath(String tfID) throws IOException
      Specified by:
      getTFFilePath in interface CdbFiles
      Parameters:
      tfID - The ID of the transfer function
      Returns:
      The path for the configuration of the TF with the passed ID
      Throws:
      IOException - In case of IO error getting the path
    • getTemplateFilePath

      public Path getTemplateFilePath(String templateID) throws IOException
      Specified by:
      getTemplateFilePath in interface CdbFiles
      Parameters:
      templateID - The ID of the template
      Returns:
      The path for the configuration of the template with the passed ID
      Throws:
      IOException - In case of IO error getting the path
    • getClientFilePath

      public Path getClientFilePath(String clientID) throws IOException
      Specified by:
      getClientFilePath in interface CdbFiles
      Parameters:
      clientID - The identifier of the client
      Returns:
      The path for the configuration of the client with the passed ID
      Throws:
      IOException - In case of IO error getting the path
    • getPluginFilePath

      public Path getPluginFilePath(String clientID) throws IOException
      Specified by:
      getPluginFilePath in interface CdbFiles
      Parameters:
      clientID - The identifier of the plugin
      Returns:
      The path for the configuration of the plugin with the passed ID
      Throws:
      IOException - In case of IO error getting the path