    View Javadoc
    1   /*
    2    * Copyright (c) 2003
    3    * Information Desire GmbH
    4    * All rights reserved.
    5    */
    6   package com.infodesire.infobit.external.impl;
    7
    8   import com.infodesire.infobit.InfobitException;
    9   import com.infodesire.infobit.InfobitSecurityException;
    10
    11  import java.io.StringWriter;
    12  import java.io.Writer;
    13
    14  /***
    15   * This class buffers text content versions.
    16   *
    17   * @author    peter2
    18   * @created   1. September 2003
    19   * @version   $Revision: 1.1 $
    20   */
    21  class TextContentNode extends ContentNode {
    22
    23      /***
    24       * Collects input data (temporary solution)
    25       */
    26      private StringWriter _destination = new StringWriter();
    27
    28
    29      /***
    30       * Gets the destination for the buffered text content.
    31       *
    32       * @return   The Destination value
    33       */
    34      Writer getDestination() {
    35          return _destination;
    36      }
    37
    38
    39      /***
    40       * Adds a text version to the associated infobit.
    41       *
    42       * @return                              The created version of text content
    43       * @exception InfobitException          Description of Exception
    44       * @exception InfobitSecurityException  Description of Exception
    45       */
    46      Object persistBuffer() throws InfobitException, InfobitSecurityException {
    47          if (_infobit == null) {
    48              throw new IllegalStateException("unresolved dependency");
    49          }
    50
    51          String text = _destination.toString();
    52          _manager.createText(_infobit, _name, text, _keywords);
    53
    54          return resolveVersion();
    55      }
    56  }

This page was automatically generated by Maven