Class TdbFormat

All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink, TdbControlObjectProvider, Iterable<String>
Direct Known Subclasses:
TdbEntryForm, TdbOutputFormat, TdbSearchForm

public abstract class TdbFormat extends TdbSerializableObject implements com.tietoenator.trip.jxp.internal.utils.DOMSink, Iterable<String>
This is an abstract base class for all types of forms exposed by the TRIP server (output formats or reports, TRIPclassic data entry forms, and TRIPclassic search forms).
  • Method Details

    • getOwnerName

      public String getOwnerName()
      Retrieve the name of the creator of the form
      Returns:
      Owning user's name
    • getDatabase

      public String getDatabase() throws TdbException
      Retrieve the name of the database or thesaurus with which this form is associated
      Returns:
      Name of database or thesaurus
      Throws:
      TdbException
    • setDatabase

      public void setDatabase(String db) throws TdbException
      Establish the name of the database or thesaurus with which this form is associated
      Parameters:
      db - Database or thesaurus name
      Throws:
      TdbException
    • getName

      public String getName()
      Retrieve the name of the format
      Returns:
      Format name
    • setName

      public void setName(String name)
      Establish the name of the format
      Parameters:
      name - Format name
    • content

      public List<String> content()
      Retrieve the content of the format, i.e. its definition
      Returns:
      The lines that make up the format's definition
    • iterator

      public Iterator<String> iterator()
      Retrieve the content of the format, i.e. its definition
      Specified by:
      iterator in interface Iterable<String>
      Returns:
      An iterator over the lines that make up the format's definition
    • setContent

      public void setContent(Collection<String> lines)
      Establish the content of the format, i.e. its definition
      Parameters:
      lines - The lines that make up the format's definition
    • getComment

      public String getComment()
      Retrieve any comment associated with the format
      Returns:
      The comment, if any
    • setComment

      public void setComment(String comment)
      Establish the comment associated with the format
      Parameters:
      comment - The format's new comment
    • create

      public void create(String frmname, String dbname) throws TdbException
      Create a new format with the specified name, for the specified database.

      This method causes network I/O.

      Parameters:
      frmname - The name of the format to create
      dbname - The database for which the format should be created.
      Throws:
      TdbException
    • create

      public void create(String frmname) throws TdbException
      Create a new format with the specified name, of a type that doesn't require a qualifying database name (e.g. a TRIPclassic search form).

      This method causes network I/O.

      Parameters:
      frmname - The name of the format to create
      Throws:
      TdbException
    • delete

      public void delete(String frmname, String dbname) throws TdbException
      Delete a named format from a named database.

      This method causes network I/O.

      Parameters:
      frmname - The format to delete
      dbname - The database from which to delete the format
      Throws:
      TdbException
    • delete

      public void delete(String frmname) throws TdbException
      Delete a named format, which must be of a type that doesn't require a qualifying database.

      This method causes network I/O.

      Parameters:
      frmname - The format to delete
      Throws:
      TdbException
    • delete

      public void delete() throws TdbException
      Remove the current form from the server; requires this object to have been created using a TdbControlObject reference.

      This method causes network I/O.

      Throws:
      TdbException
    • get

      public void get(String frmname, String dbname) throws TdbException
      Retrieve the content of a form from the server.

      This method causes network I/O.

      Parameters:
      frmname - The name of the form to retrieve
      dbname - The name of the database to which the form being retrieved is attached.
      Throws:
      TdbException
    • get

      public void get(String frmname) throws TdbException
      Retrieve the content of a form from the server.

      This method causes network I/O.

      Parameters:
      frmname - Name of the form to retrieve, must refer to a form that doesn't require a qualifying database, e.g. a search form
      Throws:
      TdbException
    • get

      public void get() throws TdbException
      Retrieve the content of the current form.

      This method causes network I/O.

      Throws:
      TdbException
    • export

      public void export(String filename, String frmname, String dbname) throws TdbException
      Export a format definition to a named file.

      This method causes network I/O.

      Parameters:
      filename - The name of the file to which the definition should be written
      frmname - The name of the format to export
      dbname - The name of the database with which the format is associated
      Throws:
      TdbException
    • export

      public void export(String filename, String frmname) throws TdbException
      Export a format definition to a named file.

      This method causes network I/O.

      Parameters:
      filename - The name of the file to which the definition should be written
      frmname - The name of the format to export
      Throws:
      TdbException
    • export

      public void export(String filename) throws TdbException
      Export the current format definition to a named file.

      This method causes network I/O.

      Parameters:
      filename - The name of the file to which the definition should be written
      Throws:
      TdbException
    • put

      public void put() throws TdbException
      Store a potentially updated output format -- in order to make the commit stick, you must have called one of the setXxx() methods first.

      This method causes network I/O.

      Throws:
      TdbException
    • importUpdate

      public void importUpdate(String filename, String frmname, String dbname) throws TdbException
      Update a format with a definition read from a named file

      This method causes network I/O.

      Parameters:
      filename - The name of the file from which to read the updated format definition
      frmname - The name of the format to be updated
      dbname - The name of the database with which the form to be updated is associated
      Throws:
      TdbException
    • importUpdate

      public void importUpdate(String filename, String frmname) throws TdbException
      Update a format with a definition read from a named file

      This method causes network I/O.

      Parameters:
      filename - The name of the file from which to read the updated format definition
      frmname - The name of the format to be updated, assumes a form type that doesn't require a qualifying database name
      Throws:
      TdbException
    • importUpdate

      public void importUpdate(String filename) throws TdbException
      Updates the current format with a definition read from a named file

      This method causes network I/O.

      Parameters:
      filename - The name of the file from which to read the updated format definition
      Throws:
      TdbException
    • copy

      public void copy(String newdb, String newname, TdbControlObject ob) throws TdbException
      Copy the current format to a new database and new name.

      This method causes network I/O.

      Parameters:
      newdb - The name of the database to which the form should be copied
      newname - The name of the new copy of the form
      ob - If non-null, will receive the Control information for the newly created form
      Throws:
      TdbException
    • rename

      public void rename(String newname) throws TdbException
      Rename the format to the newly specified name

      This method causes network I/O.

      Parameters:
      newname - The name for the format
      Throws:
      TdbException