/*- (non-Javadoc)
   * @see org.realtors.rets.server.config.RetsConfigDao#saveRetsConfig(org.realtors.rets.server.config.RetsConfig)
   */
  public void saveRetsConfig(RetsConfig retsConfig) throws RetsServerException {
    String filePath = getFilePath();
    if (filePath == null) {
      String errMsg =
          "The RETS configuration XML file "
              + "path has not been set. Please "
              + "ensure this is set before "
              + "attempting to load the "
              + "configuration.";
      throw new IllegalStateException(errMsg);
    }

    XmlRetsConfigUtils.toXml(retsConfig, filePath);
  }
  /*- (non-Javadoc)
   * @see org.realtors.rets.server.config.RetsConfigDao#loadRetsConfig()
   */
  public RetsConfig loadRetsConfig() throws RetsServerException {
    String filePath = getFilePath();
    if (filePath == null) {
      String errMsg =
          "The RETS configuration XML file "
              + "path has not been set. Please "
              + "ensure this is set before "
              + "attempting to load the "
              + "configuration.";
      throw new IllegalStateException(errMsg);
    }

    RetsConfig retsConfig = XmlRetsConfigUtils.initFromXmlFile(filePath);
    return retsConfig;
  }