/**
   * Writes XML elements.
   *
   * @param writer the writer
   * @throws Exception the exception
   */
  @Override
  protected void writeElementsToXml(EwsServiceXmlWriter writer) throws Exception {
    final String EnumDelimiter = ",";

    // Write UserConfiguationName element
    UserConfiguration.writeUserConfigurationNameToXml(
        writer, XmlNamespace.Messages, this.name, this.parentFolderId);

    // Write UserConfigurationProperties element
    writer.writeElementValue(
        XmlNamespace.Messages,
        XmlElementNames.UserConfigurationProperties,
        this.properties.toString().replace(EnumDelimiter, "").replace("[", "").replace("]", ""));
  }
Exemplo n.º 2
0
 /**
  * Creates a new AtomCache object based on the provided UserConfiguration.
  *
  * @param config the UserConfiguration to use for this cache.
  */
 public AtomCache(UserConfiguration config) {
   this(config.getPdbFilePath(), config.getCacheFilePath());
   fetchBehavior = config.getFetchBehavior();
   obsoleteBehavior = config.getObsoleteBehavior();
   useMmCif = config.getFileFormat().equals(UserConfiguration.MMCIF_FORMAT);
 }