Class TdbFormat

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

    public abstract class TdbFormat
    extends TdbSerializableObject
    implements com.tietoenator.trip.jxp.internal.utils.DOMSink, java.lang.Iterable<java.lang.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 Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> content()
      Retrieve the content of the format, i.e. its definition
      void copy​(java.lang.String newdb, java.lang.String newname, TdbControlObject ob)
      Copy the current format to a new database and new name.
      void create​(java.lang.String frmname)
      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).
      void create​(java.lang.String frmname, java.lang.String dbname)
      Create a new format with the specified name, for the specified database.
      void delete()
      Remove the current form from the server; requires this object to have been created using a TdbControlObject reference.
      void delete​(java.lang.String frmname)
      Delete a named format, which must be of a type that doesn't require a qualifying database.
      void delete​(java.lang.String frmname, java.lang.String dbname)
      Delete a named format from a named database.
      void export​(java.lang.String filename)
      Export the current format definition to a named file.
      void export​(java.lang.String filename, java.lang.String frmname)
      Export a format definition to a named file.
      void export​(java.lang.String filename, java.lang.String frmname, java.lang.String dbname)
      Export a format definition to a named file.
      void get()
      Retrieve the content of the current form.
      void get​(java.lang.String frmname)
      Retrieve the content of a form from the server.
      void get​(java.lang.String frmname, java.lang.String dbname)
      Retrieve the content of a form from the server.
      java.lang.String getComment()
      Retrieve any comment associated with the format
      java.lang.String getDatabase()
      Retrieve the name of the database or thesaurus with which this form is associated
      java.lang.String getName()
      Retrieve the name of the format
      java.lang.String getOwnerName()
      Retrieve the name of the creator of the form
      void importUpdate​(java.lang.String filename)
      Updates the current format with a definition read from a named file
      void importUpdate​(java.lang.String filename, java.lang.String frmname)
      Update a format with a definition read from a named file
      void importUpdate​(java.lang.String filename, java.lang.String frmname, java.lang.String dbname)
      Update a format with a definition read from a named file
      java.util.Iterator<java.lang.String> iterator()
      Retrieve the content of the format, i.e. its definition
      void put()
      Store a potentially updated output format -- in order to make the commit stick, you must have called one of the setXxx() methods first.
      void rename​(java.lang.String newname)
      Rename the format to the newly specified name
      void setComment​(java.lang.String comment)
      Establish the comment associated with the format
      void setContent​(java.util.Collection<java.lang.String> lines)
      Establish the content of the format, i.e. its definition
      void setDatabase​(java.lang.String db)
      Establish the name of the database or thesaurus with which this form is associated
      void setName​(java.lang.String name)
      Establish the name of the format
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Method Detail

      • getOwnerName

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

        public java.lang.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​(java.lang.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 java.lang.String getName()
        Retrieve the name of the format
        Returns:
        Format name
      • setName

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

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

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

        public void setContent​(java.util.Collection<java.lang.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 java.lang.String getComment()
        Retrieve any comment associated with the format
        Returns:
        The comment, if any
      • setComment

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

        public void create​(java.lang.String frmname,
                           java.lang.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​(java.lang.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​(java.lang.String frmname,
                           java.lang.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​(java.lang.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​(java.lang.String frmname,
                        java.lang.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​(java.lang.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​(java.lang.String filename,
                           java.lang.String frmname,
                           java.lang.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​(java.lang.String filename,
                           java.lang.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​(java.lang.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​(java.lang.String filename,
                                 java.lang.String frmname,
                                 java.lang.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​(java.lang.String filename,
                                 java.lang.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​(java.lang.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​(java.lang.String newdb,
                         java.lang.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​(java.lang.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